This is the mail archive of the mailing list for the GCC project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Fix libgomp Fortran tests

Steve Kargl <> 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,

  DATA J / -2147493648 /

is permitted.  (Note that, line 25, explicitly states that "Any
integer value may be represented as a signed-int-literal-constant.")


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).

- 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.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]