Bug 35123 - [4.2 only] ICE in fold_convert, at fold-const.c:2248
Summary: [4.2 only] ICE in fold_convert, at fold-const.c:2248
Status: RESOLVED WONTFIX
Alias: None
Product: gcc
Classification: Unclassified
Component: fortran (show other bugs)
Version: 4.2.3
: P3 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords: ice-on-valid-code
Depends on:
Blocks:
 
Reported: 2008-02-07 12:01 UTC by Salvatore Filippone
Modified: 2008-02-10 17:58 UTC (History)
2 users (show)

See Also:
Host:
Target:
Build:
Known to work: 4.3.0
Known to fail:
Last reconfirmed:


Attachments
test case (527 bytes, text/plain)
2008-02-07 12:02 UTC, Salvatore Filippone
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Salvatore Filippone 2008-02-07 12:01:58 UTC
The test case produces the following output on both 4.2.3 and 4.2.2; works fine under 4.3-20080201
-------------------------------------------
[sfilippo@localhost bugtest]$ gfortran -v
Using built-in specs.
Target: i686-pc-linux-gnu
Configured with: ../gcc-4.2.3/configure --prefix=/usr/local/gcc42 --with-mpfr=/usr/local/mpfr --with-gmp=/usr/local/gmp
Thread model: posix
gcc version 4.2.3
[sfilippo@localhost bugtest]$ gfortran -c foo_bug.f90 
foo_bug.f90: In function 'foo_cdall':
foo_bug.f90:56: internal compiler error: in fold_convert, at fold-const.c:2248
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://gcc.gnu.org/bugs.html> for instructions.
Comment 1 Salvatore Filippone 2008-02-07 12:02:27 UTC
Created attachment 15114 [details]
test case
Comment 2 Richard Biener 2008-02-07 14:21:49 UTC
gfortran 4.1 errors with

 In file t.f90:3

    integer, allocatable :: md(:), g2l(:)
                       1
Error: Attribute at (1) is not allowed in a TYPE definition
 In file t.f90:4

  end type foo_type
                  1
Error: Derived type definition at (1) has no components
 In file t.f90:16

      use foo_type_mod
                     1
Fatal Error: Can't open module file 'foo_type_mod.mod' for reading at (1): No such file or directory

4.3 works.
Comment 3 Salvatore Filippone 2008-02-07 14:54:50 UTC
(In reply to comment #2)
> gfortran 4.1 errors with
> 
>  In file t.f90:3
> 
>     integer, allocatable :: md(:), g2l(:)
>                        1
> Error: Attribute at (1) is not allowed in a TYPE definition
>
 
The failure in 4.1 is due to the support of language extension TR 15581, which was only added in 4.2.0. 
Salvatore

Comment 4 Francois-Xavier Coudert 2008-02-10 15:16:47 UTC
It's 4.2 only and not a regression, so it will not be fixed. Closing as WONTFIX, if someone else has a reason to suggest otherwise please speak up and reopen it.

Sorry for the time you spent reducing it, Salvatore, and thanks for your report.
Comment 5 Salvatore Filippone 2008-02-10 17:58:38 UTC
(In reply to comment #4)
Fair enough. While reducing the test case I also found a workaround, so it's not a problem for me..