Fix libgomp Fortran tests

Tobias Schlüter tobias.schlueter@physik.uni-muenchen.de
Fri Sep 8 14:11:00 GMT 2006


Steve Kargl <sgk@troutmask.apl.washington.edu> wrote on Fri, 08 Sep 2006:
>> However, in a DATA statement, the values are not "constants", they are
>> "data-stmt-constants", defined in rule R540, and these use signed
>> literal constants (including signed-int-literal-constant) rather than
>> unsigned ones.  As expressions are not allowed as DATA statement values,
>> the interpretation of a negative integer remains unambiguous.
>>
>> Thus, while
>>
>>   INTEGER J = -2147493648
>>
>> is not permitted,
>>
>>   INTEGER J
>>   DATA J / -2147493648 /
>>
>> is permitted.  (Note that 4.3.1.1, line 25, explicitly states that "Any
>> integer value may be represented as a signed-int-literal-constant.")
>>
>
> Brooks,
>
> Can you open a PR?  I did not realize that there was
> this hair splitting.  Oh, and this isn't going to be
> easy to fix.

match_integer_constant() has a parameter signflag which -- if set in  
the right places, i.e. set everywhere a signed-integer-constant is  
expected -- should be making that difference automatically.

It's been a while since I touched the code, but I think that when we  
discussed this the last time, I looked a bit closer and found  
everything I looked at to be right (for my definition of right, which  
probably wasn't too pedantic at the time).

Cheers,
- Tobi

ps I plan to come back to gfortran development, but I still have too  
much on my plate.


----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.




More information about the Fortran mailing list