Bug 20971 - gfortran - internal compiler error on bad program -fdefault-integer-8
Summary: gfortran - internal compiler error on bad program -fdefault-integer-8
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: fortran (show other bugs)
Version: 4.0.0
: P2 normal
Target Milestone: 4.1.0
Assignee: Not yet assigned to anyone
URL:
Keywords: ice-on-invalid-code
: 20986 21415 23323 24179 (view as bug list)
Depends on:
Blocks:
 
Reported: 2005-04-12 15:52 UTC by Dale Ranta
Modified: 2005-10-03 19:43 UTC (History)
6 users (show)

See Also:
Host: powerpc-apple-darwin7.8.0
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed: 2005-04-13 10:03:48


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Dale Ranta 2005-04-12 15:52:27 UTC
I was trying to reduce a test case and I hit another error in the process -

[dranta:~/tests/gfortran] dir% gfortran -fdefault-integer-8 -o adini adini.f
adini.f: In function 'MAIN__':
adini.f:5: internal compiler error: in gfc_conv_string_tmp, at
fortran/trans-expr.c:736
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://gcc.gnu.org/bugs.html> for instructions.
[dranta:~/tests/gfortran] dir% cat adini.f
      program main
      character*6 hed
      character*6 final
      data final /'stop' /
      if (hed(1).eq.final) stop
      stop
      end
Comment 1 kargls 2005-04-12 16:09:08 UTC
(In reply to comment #0)
>       program main
>       character*6 hed
>       character*6 final
>       data final /'stop' /
>       if (hed(1).eq.final) stop

        if(hed(1:1).eq.final) stop

>       stop
>       end

ftnchek saystroutmask:sgk[221] ftnchek a.f

FTNCHEK Version 3.2 November 2002

File a.f:
 0 syntax errors detected in file a.f
Warning: Subprogram HED never defined
    Invoked in module MAIN line 6 file a.f
    (possibly it is an array which was not declared)

With the above modification, the program compiles fine.

Your original program does cause an ICE with 
-fdefault-integer-8, but it fails to link with
a missing subroutine hed_ with it.

troutmask:sgk[222] gfc41 -static -o z -fdefault-integer-8 a.f
a.f: In function 'MAIN__':
a.f:6: internal compiler error: in gfc_conv_string_tmp, at fortran/trans-expr.c:736
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://gcc.gnu.org/bugs.html> for instructions.

troutmask:sgk[223] gfc41 -static -o z a.f
/usr/home/sgk/tmp/ccj4VZrU.o(.text+0x17): In function `MAIN__':
: undefined reference to `hed_'
collect2: ld returned 1 exit status



Comment 2 Andrew Pinski 2005-04-13 10:03:11 UTC
*** Bug 20986 has been marked as a duplicate of this bug. ***
Comment 3 Andrew Pinski 2005-04-13 10:03:48 UTC
Confirmed.
Comment 4 Andrew Pinski 2005-05-06 13:52:15 UTC
*** Bug 21415 has been marked as a duplicate of this bug. ***
Comment 5 Andrew Pinski 2005-08-11 12:47:18 UTC
*** Bug 23323 has been marked as a duplicate of this bug. ***
Comment 6 Francois-Xavier Coudert 2005-09-11 22:01:03 UTC
Aren't these fixed? Trying to compile these testcases with an up-to-date
compiler, I don't get ICEs...
Comment 7 Andrew Pinski 2005-09-12 15:21:55 UTC
Fixed at least on the mainline.
Comment 8 Andrew Pinski 2005-10-03 19:43:16 UTC
*** Bug 24179 has been marked as a duplicate of this bug. ***