0382 / argparse-f

Modern Fortran command line parser, implemented with OOP.
MIT License
23 stars 2 forks source link

An ifort/ifx bug caused short_name_index in the argparse-f constructor to fail #5

Closed zoziha closed 1 year ago

zoziha commented 1 year ago

Description

When argparse-f was compiled in visual-studio, the Intel compiler had a bug. image

After the type constructor initializes short_name_index with the value -1, the constructor pops out as if short_name_index will become 0! This is supposed to be an Intel compiler bug.

Solution

There are two solutions:

  1. Initializes the value of short_name_index at the type declaration: image

  2. Initialize to 0 in the type constructor instead of -1.

Other parts with adjustments.