ofc icon indicating copy to clipboard operation
ofc copied to clipboard

Misleading "Literal too large for compiler" error

Open dmikushin opened this issue 1 year ago • 3 comments

I get "Literal too large for compiler" error from the following contexts:

Error:./mma114.f:79,22:
   Literal too large for compiler
      ZDC( IDX4+J ) = (0.0,0.0)
                      ^
Error:./mma403.f:91,29:
   Literal too large for compiler
      IF ( ZC( INDXBV ) .EQ. 0.0D0 ) GO TO 1450
                             ^

Do you have an idea what this error means?

dmikushin avatar Nov 21 '23 12:11 dmikushin

So the code which handles this is here: https://github.com/CodethinkLabs/ofc/blob/b69ad37be62d580eabeb081e64b43afe3c0b3384/src/sema/typeval.c#L1270

The intention is that it reports when you have an integer that's over 64-bit (8 bytes) or a floating point type that's bigger than a long double (10 bytes) as these are not currently supported.

ben-brewer-codethink avatar Nov 21 '23 12:11 ben-brewer-codethink

Would it be possible to get a minimal test which triggers this issue?

ben-brewer-codethink avatar Nov 29 '23 11:11 ben-brewer-codethink

Hi @ben-brewer-codethink , I apologize that I won't be able to really minimize the test cases. But as you said the problem should be straight-forward. I'm attaching the original source file mentioned above, FYI it's a part of NASTRAN-95 distribution:

mma114.f.gz

dmikushin avatar Nov 29 '23 12:11 dmikushin