public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/24188] New: WRITE(6,*) causes an ICE with -mcmodel=medium
@ 2005-10-04 12:13 fischer at td dot mw dot tum dot de
2005-10-21 22:38 ` [Bug target/24188] [4.1 Regression] " pinskia at gcc dot gnu dot org
` (10 more replies)
0 siblings, 11 replies; 12+ messages in thread
From: fischer at td dot mw dot tum dot de @ 2005-10-04 12:13 UTC (permalink / raw)
To: gcc-bugs
Trying to compile this code:
SUBROUTINE FOO
WRITE(6,*) ''
END
with the command:
gfortran -mcmodel=medium -c foo.F -o foo.o
Causes this ICE:
foo.F:2: internal compiler error: in named_section, at varasm.c:450
Compilation works normal without "-mcmodel=medium", also
WRITE (6,*) ' '
and
WRITE (6,*)
work.
Output of gfortran -v:
Using built-in specs.
Target: x86_64-unknown-linux-gnu
Configured with: ./configure --prefix=/home/fischer --enable-languages=f95 :
(reconfigured) ./configure --prefix=/home/fischer --enable-languages=c,fortran
--no-create --no-recursion
Thread model: posix
gcc version 4.1.0 20051004 (experimental)
gfortran was compiled with gcc from SuSE 9.3. Output of gcc -v:
Reading specs from /usr/lib64/gcc-lib/x86_64-suse-linux/3.3.5/specs
Configured with: ../configure --enable-threads=posix --prefix=/usr
--with-local-prefix=/usr/local --infodir=/usr/share/info
--mandir=/usr/share/man --enable-languages=c,c++,f77,objc,java,ada
--disable-checking --libdir=/usr/lib64 --enable-libgcj --with-slibdir=/lib64
--with-system-zlib --enable-shared --enable-__cxa_atexit x86_64-suse-linux
Thread model: posix
gcc version 3.3.5 20050117 (prerelease) (SUSE Linux)
--
Summary: WRITE(6,*) causes an ICE with -mcmodel=medium
Product: gcc
Version: 4.1.0
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: fortran
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: fischer at td dot mw dot tum dot de
GCC build triplet: x86_64-unknown-linux-gnu
GCC host triplet: x86_64-unknown-linux-gnu
GCC target triplet: x86_64-unknown-linux-gnu
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24188
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug target/24188] [4.1 Regression] WRITE(6,*) causes an ICE with -mcmodel=medium
2005-10-04 12:13 [Bug fortran/24188] New: WRITE(6,*) causes an ICE with -mcmodel=medium fischer at td dot mw dot tum dot de
@ 2005-10-21 22:38 ` pinskia at gcc dot gnu dot org
2005-10-30 23:21 ` pinskia at gcc dot gnu dot org
` (9 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-10-21 22:38 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from pinskia at gcc dot gnu dot org 2005-10-21 22:38 -------
Confirmed, a regression from 4.0.x.
--
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Ever Confirmed|0 |1
GCC build triplet|x86_64-unknown-linux-gnu |
GCC host triplet|x86_64-unknown-linux-gnu |
Keywords| |ice-on-valid-code
Last reconfirmed|0000-00-00 00:00:00 |2005-10-21 22:38:45
date| |
Summary|WRITE(6,*) causes an ICE |[4.1 Regression] WRITE(6,*)
|with -mcmodel=medium |causes an ICE with -
| |mcmodel=medium
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24188
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug target/24188] [4.1 Regression] WRITE(6,*) causes an ICE with -mcmodel=medium
2005-10-04 12:13 [Bug fortran/24188] New: WRITE(6,*) causes an ICE with -mcmodel=medium fischer at td dot mw dot tum dot de
2005-10-21 22:38 ` [Bug target/24188] [4.1 Regression] " pinskia at gcc dot gnu dot org
@ 2005-10-30 23:21 ` pinskia at gcc dot gnu dot org
2005-11-03 19:46 ` hubicka at gcc dot gnu dot org
` (8 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-10-30 23:21 UTC (permalink / raw)
To: gcc-bugs
--
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Priority|P2 |P5
Target Milestone|--- |4.1.0
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24188
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug target/24188] [4.1 Regression] WRITE(6,*) causes an ICE with -mcmodel=medium
2005-10-04 12:13 [Bug fortran/24188] New: WRITE(6,*) causes an ICE with -mcmodel=medium fischer at td dot mw dot tum dot de
2005-10-21 22:38 ` [Bug target/24188] [4.1 Regression] " pinskia at gcc dot gnu dot org
2005-10-30 23:21 ` pinskia at gcc dot gnu dot org
@ 2005-11-03 19:46 ` hubicka at gcc dot gnu dot org
2005-11-03 19:50 ` pinskia at gcc dot gnu dot org
` (7 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: hubicka at gcc dot gnu dot org @ 2005-11-03 19:46 UTC (permalink / raw)
To: gcc-bugs
------- Comment #2 from hubicka at gcc dot gnu dot org 2005-11-03 19:46 -------
SUBROUTINE FOO
WRITE(6,*) ''
END
balli:/usr/src/gcctest/install/gcc-base/bin # ./gfortran a.F90 -mcmodel=medium
-O1 -S
balli:/usr/src/gcctest/install/gcc-base/bin #
--
hubicka at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |WORKSFORME
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24188
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug target/24188] [4.1 Regression] WRITE(6,*) causes an ICE with -mcmodel=medium
2005-10-04 12:13 [Bug fortran/24188] New: WRITE(6,*) causes an ICE with -mcmodel=medium fischer at td dot mw dot tum dot de
` (2 preceding siblings ...)
2005-11-03 19:46 ` hubicka at gcc dot gnu dot org
@ 2005-11-03 19:50 ` pinskia at gcc dot gnu dot org
2005-11-03 19:59 ` pinskia at gcc dot gnu dot org
` (6 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-11-03 19:50 UTC (permalink / raw)
To: gcc-bugs
------- Comment #3 from pinskia at gcc dot gnu dot org 2005-11-03 19:50 -------
Still fails for me.
--
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|RESOLVED |REOPENED
Resolution|WORKSFORME |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24188
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug target/24188] [4.1 Regression] WRITE(6,*) causes an ICE with -mcmodel=medium
2005-10-04 12:13 [Bug fortran/24188] New: WRITE(6,*) causes an ICE with -mcmodel=medium fischer at td dot mw dot tum dot de
` (3 preceding siblings ...)
2005-11-03 19:50 ` pinskia at gcc dot gnu dot org
@ 2005-11-03 19:59 ` pinskia at gcc dot gnu dot org
2005-11-03 20:01 ` pinskia at gcc dot gnu dot org
` (5 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-11-03 19:59 UTC (permalink / raw)
To: gcc-bugs
------- Comment #4 from pinskia at gcc dot gnu dot org 2005-11-03 19:58 -------
We have a STRING_CST in named_section.
The call to named_section comes from output_constant_def_contents.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24188
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug target/24188] [4.1 Regression] WRITE(6,*) causes an ICE with -mcmodel=medium
2005-10-04 12:13 [Bug fortran/24188] New: WRITE(6,*) causes an ICE with -mcmodel=medium fischer at td dot mw dot tum dot de
` (4 preceding siblings ...)
2005-11-03 19:59 ` pinskia at gcc dot gnu dot org
@ 2005-11-03 20:01 ` pinskia at gcc dot gnu dot org
2005-11-03 20:52 ` hubicka at ucw dot cz
` (4 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-11-03 20:01 UTC (permalink / raw)
To: gcc-bugs
------- Comment #5 from pinskia at gcc dot gnu dot org 2005-11-03 20:01 -------
With x86_64_elf_select_section inbetween.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24188
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug target/24188] [4.1 Regression] WRITE(6,*) causes an ICE with -mcmodel=medium
2005-10-04 12:13 [Bug fortran/24188] New: WRITE(6,*) causes an ICE with -mcmodel=medium fischer at td dot mw dot tum dot de
` (5 preceding siblings ...)
2005-11-03 20:01 ` pinskia at gcc dot gnu dot org
@ 2005-11-03 20:52 ` hubicka at ucw dot cz
2005-12-04 21:33 ` [Bug target/24188] [4.1/4.2 " pinskia at gcc dot gnu dot org
` (3 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: hubicka at ucw dot cz @ 2005-11-03 20:52 UTC (permalink / raw)
To: gcc-bugs
------- Comment #6 from hubicka at ucw dot cz 2005-11-03 20:52 -------
Subject: Re: [4.1 Regression] WRITE(6,*) causes an ICE with -mcmodel=medium
OK, I think what is going on.
For some reason the code deciding whether data should be small or big
considers everything zero sized as unfinished potentially big. Not
quite sure why. This makes it to exceptionally consider zero sized
string constants small and to actually avoid named_section from
crashing...
I am not quite certain by both chunks, but it is best I can think of
today...
SUBROUTINE FOO
WRITE(6,*) ''
END
2005-11-03 Jan Hubicka <jh@suse.cz>
PR target/24188
* i386.c (x86_64_elf_select_section): Handle STRING_CST without crash.
(ix86_in_large_data_p): Zero sized STRING_CSTs are complette.
Index: gcc/config/i386/i386.c
===================================================================
--- gcc/config/i386/i386.c (revision 106422)
+++ gcc/config/i386/i386.c (working copy)
@@ -1741,6 +1741,10 @@ x86_64_elf_select_section (tree decl, in
}
if (sname)
{
+ /* We might get called with string constants, but named_section
+ don't like them as they are not DECLs. */
+ if (!DECL_P (decl))
+ decl = NULL;
named_section (decl, sname, reloc);
return;
}
@@ -17996,7 +18000,9 @@ ix86_in_large_data_p (tree exp)
/* If this is an incomplete type with size 0, then we can't put it
in data because it might be too big when completed. */
- if (!size || size > ix86_section_threshold)
+ if ((!size && TREE_CODE (exp) != STRING_CST)
+ || size < 0
+ || size > ix86_section_threshold)
return true;
}
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24188
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug target/24188] [4.1/4.2 Regression] WRITE(6,*) causes an ICE with -mcmodel=medium
2005-10-04 12:13 [Bug fortran/24188] New: WRITE(6,*) causes an ICE with -mcmodel=medium fischer at td dot mw dot tum dot de
` (6 preceding siblings ...)
2005-11-03 20:52 ` hubicka at ucw dot cz
@ 2005-12-04 21:33 ` pinskia at gcc dot gnu dot org
2005-12-14 11:01 ` jakub at gcc dot gnu dot org
` (2 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-12-04 21:33 UTC (permalink / raw)
To: gcc-bugs
--
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|REOPENED |NEW
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24188
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug target/24188] [4.1/4.2 Regression] WRITE(6,*) causes an ICE with -mcmodel=medium
2005-10-04 12:13 [Bug fortran/24188] New: WRITE(6,*) causes an ICE with -mcmodel=medium fischer at td dot mw dot tum dot de
` (8 preceding siblings ...)
2005-12-14 11:01 ` jakub at gcc dot gnu dot org
@ 2005-12-14 11:01 ` jakub at gcc dot gnu dot org
2005-12-14 13:36 ` jakub at gcc dot gnu dot org
10 siblings, 0 replies; 12+ messages in thread
From: jakub at gcc dot gnu dot org @ 2005-12-14 11:01 UTC (permalink / raw)
To: gcc-bugs
------- Comment #7 from jakub at gcc dot gnu dot org 2005-12-14 11:00 -------
Subject: Bug 24188
Author: jakub
Date: Wed Dec 14 11:00:50 2005
New Revision: 108506
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=108506
Log:
PR target/25254
PR target/24188
* config/i386/i386.c (x86_64_elf_select_section): If DECL is not
DECL_P, call get_section rather than get_named_section. Supply
section flags to it.
* gcc.target/i386/pr25254.c: New test.
* gfortran.dg/PR24188.f: New test.
Added:
trunk/gcc/testsuite/gcc.target/i386/pr25254.c
trunk/gcc/testsuite/gfortran.dg/PR24188.f
Modified:
trunk/gcc/ChangeLog
trunk/gcc/config/i386/i386.c
trunk/gcc/testsuite/ChangeLog
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24188
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug target/24188] [4.1/4.2 Regression] WRITE(6,*) causes an ICE with -mcmodel=medium
2005-10-04 12:13 [Bug fortran/24188] New: WRITE(6,*) causes an ICE with -mcmodel=medium fischer at td dot mw dot tum dot de
` (7 preceding siblings ...)
2005-12-04 21:33 ` [Bug target/24188] [4.1/4.2 " pinskia at gcc dot gnu dot org
@ 2005-12-14 11:01 ` jakub at gcc dot gnu dot org
2005-12-14 11:01 ` jakub at gcc dot gnu dot org
2005-12-14 13:36 ` jakub at gcc dot gnu dot org
10 siblings, 0 replies; 12+ messages in thread
From: jakub at gcc dot gnu dot org @ 2005-12-14 11:01 UTC (permalink / raw)
To: gcc-bugs
------- Comment #8 from jakub at gcc dot gnu dot org 2005-12-14 11:01 -------
Subject: Bug 24188
Author: jakub
Date: Wed Dec 14 11:01:15 2005
New Revision: 108507
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=108507
Log:
PR target/25254
PR target/24188
* config/i386/i386.c (x86_64_elf_select_section): If DECL is not
DECL_P, call named_section_flags rather than named_section. Supply
section flags to it.
* gcc.target/i386/pr25254.c: New test.
* gfortran.dg/PR24188.f: New test.
Added:
branches/gcc-4_1-branch/gcc/testsuite/gcc.target/i386/pr25254.c
branches/gcc-4_1-branch/gcc/testsuite/gfortran.dg/PR24188.f
Modified:
branches/gcc-4_1-branch/gcc/ChangeLog
branches/gcc-4_1-branch/gcc/config/i386/i386.c
branches/gcc-4_1-branch/gcc/testsuite/ChangeLog
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24188
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug target/24188] [4.1/4.2 Regression] WRITE(6,*) causes an ICE with -mcmodel=medium
2005-10-04 12:13 [Bug fortran/24188] New: WRITE(6,*) causes an ICE with -mcmodel=medium fischer at td dot mw dot tum dot de
` (9 preceding siblings ...)
2005-12-14 11:01 ` jakub at gcc dot gnu dot org
@ 2005-12-14 13:36 ` jakub at gcc dot gnu dot org
10 siblings, 0 replies; 12+ messages in thread
From: jakub at gcc dot gnu dot org @ 2005-12-14 13:36 UTC (permalink / raw)
To: gcc-bugs
------- Comment #9 from jakub at gcc dot gnu dot org 2005-12-14 13:36 -------
Fixed in CVS.
--
jakub at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |FIXED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24188
^ permalink raw reply [flat|nested] 12+ messages in thread
end of thread, other threads:[~2005-12-14 13:36 UTC | newest]
Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-10-04 12:13 [Bug fortran/24188] New: WRITE(6,*) causes an ICE with -mcmodel=medium fischer at td dot mw dot tum dot de
2005-10-21 22:38 ` [Bug target/24188] [4.1 Regression] " pinskia at gcc dot gnu dot org
2005-10-30 23:21 ` pinskia at gcc dot gnu dot org
2005-11-03 19:46 ` hubicka at gcc dot gnu dot org
2005-11-03 19:50 ` pinskia at gcc dot gnu dot org
2005-11-03 19:59 ` pinskia at gcc dot gnu dot org
2005-11-03 20:01 ` pinskia at gcc dot gnu dot org
2005-11-03 20:52 ` hubicka at ucw dot cz
2005-12-04 21:33 ` [Bug target/24188] [4.1/4.2 " pinskia at gcc dot gnu dot org
2005-12-14 11:01 ` jakub at gcc dot gnu dot org
2005-12-14 11:01 ` jakub at gcc dot gnu dot org
2005-12-14 13:36 ` jakub at gcc dot gnu dot org
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).