public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/66347] New: Seg fault (ICE) on compile
@ 2015-05-30 19:42 wbrisken at gmail dot com
2015-06-05 17:11 ` [Bug fortran/66347] " kargl at gcc dot gnu.org
` (8 more replies)
0 siblings, 9 replies; 10+ messages in thread
From: wbrisken at gmail dot com @ 2015-05-30 19:42 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66347
Bug ID: 66347
Summary: Seg fault (ICE) on compile
Product: gcc
Version: 5.1.1
Status: UNCONFIRMED
Severity: major
Priority: P3
Component: fortran
Assignee: unassigned at gcc dot gnu.org
Reporter: wbrisken at gmail dot com
Target Milestone: ---
Created attachment 35656
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=35656&action=edit
fortran test case causing ICE
I have an example of code that would compile without problem with gfortran
4.4.7 and gfortran 4.8.4 but causes ICE on the recent gfortran SVN 5.1 branch.
This is not my own code and I know little of fortran programming so apologies
if the code is ugly or if it is not a minimal test case.
Compiler version causing crash:
wbrisken@shiitake sked> gfortran -v
Using built-in specs.
COLLECT_GCC=gfortran
COLLECT_LTO_WRAPPER=/export/home/shiitake/gcc/libexec/gcc/x86_64-unknown-linux-gnu/5.1.1/lto-wrapper
Target: x86_64-unknown-linux-gnu
Configured with: ../gcc/configure --prefix=/export/home/shiitake/gcc/
Thread model: posix
gcc version 5.1.1 20150523 (GCC)
System type:
Linux RHEL 6.6 running on x86-64 CPU
GCC build options:
../gcc/configure --prefix=/export/home/shiitake/gcc/
Compile command:
gfortran -save-temps -finit-local-zero -fno-automatic -fno-underscoring -C -w
-g -O2 -c -o crash.o crash3.f
Compiler output to screen:
f951: internal compiler error: Segmentation fault
0xa7f86f crash_signal
../../gcc/gcc/toplev.c:383
0x6a08c2 apply_default_init_local
../../gcc/gcc/fortran/resolve.c:10951
0x6a08c2 resolve_fl_variable
../../gcc/gcc/fortran/resolve.c:11213
0x6a08c2 resolve_symbol
../../gcc/gcc/fortran/resolve.c:13756
0x6b6f0b do_traverse_symtree
../../gcc/gcc/fortran/symbol.c:3646
0x6a16f2 resolve_types
../../gcc/gcc/fortran/resolve.c:14977
0x69d320 gfc_resolve(gfc_namespace*)
../../gcc/gcc/fortran/resolve.c:15081
0x688c46 gfc_parse_file()
../../gcc/gcc/fortran/parse.c:5476
0x6c83d5 gfc_be_parse_file
../../gcc/gcc/fortran/f95-lang.c:228
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <http://gcc.gnu.org/bugs.html> for instructions.
Preprocessed output file:
Not generated. Perhaps Seg Fault happened too early.
I hope this bug report is useful and complete.
Cheers,
Walter
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug fortran/66347] Seg fault (ICE) on compile
2015-05-30 19:42 [Bug fortran/66347] New: Seg fault (ICE) on compile wbrisken at gmail dot com
@ 2015-06-05 17:11 ` kargl at gcc dot gnu.org
2015-06-05 17:14 ` kargl at gcc dot gnu.org
` (7 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: kargl at gcc dot gnu.org @ 2015-06-05 17:11 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66347
kargl at gcc dot gnu.org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Last reconfirmed| |2015-06-05
CC| |kargl at gcc dot gnu.org
Ever confirmed|0 |1
--- Comment #1 from kargl at gcc dot gnu.org ---
(In reply to Walter Brisken from comment #0)
>
> gfortran -save-temps -finit-local-zero -fno-automatic -fno-underscoring -C
> -w -g -O2 -c -o crash.o crash3.f
>
The problem is related to the -finit-local-zero option.
The obvious workaround is to not use that option. I'll
also recommend not using the -fno-underscoring option
as the documentation warns about its use.
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug fortran/66347] Seg fault (ICE) on compile
2015-05-30 19:42 [Bug fortran/66347] New: Seg fault (ICE) on compile wbrisken at gmail dot com
2015-06-05 17:11 ` [Bug fortran/66347] " kargl at gcc dot gnu.org
@ 2015-06-05 17:14 ` kargl at gcc dot gnu.org
2015-06-05 17:17 ` kargl at gcc dot gnu.org
` (6 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: kargl at gcc dot gnu.org @ 2015-06-05 17:14 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66347
--- Comment #2 from kargl at gcc dot gnu.org ---
(In reply to kargl from comment #1)
> (In reply to Walter Brisken from comment #0)
> >
> > gfortran -save-temps -finit-local-zero -fno-automatic -fno-underscoring -C
> > -w -g -O2 -c -o crash.o crash3.f
> >
>
> The problem is related to the -finit-local-zero option.
> The obvious workaround is to not use that option. I'll
> also recommend not using the -fno-underscoring option
> as the documentation warns about its use.
Dang misread my terminal output. -fno-automatic is the
guilty option. Drop that option and things compile.
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug fortran/66347] Seg fault (ICE) on compile
2015-05-30 19:42 [Bug fortran/66347] New: Seg fault (ICE) on compile wbrisken at gmail dot com
2015-06-05 17:11 ` [Bug fortran/66347] " kargl at gcc dot gnu.org
2015-06-05 17:14 ` kargl at gcc dot gnu.org
@ 2015-06-05 17:17 ` kargl at gcc dot gnu.org
2015-06-05 17:53 ` kargl at gcc dot gnu.org
` (5 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: kargl at gcc dot gnu.org @ 2015-06-05 17:17 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66347
kargl at gcc dot gnu.org changed:
What |Removed |Added
----------------------------------------------------------------------------
Severity|major |normal
--- Comment #3 from kargl at gcc dot gnu.org ---
(In reply to kargl from comment #2)
> (In reply to kargl from comment #1)
> > (In reply to Walter Brisken from comment #0)
> > >
> > > gfortran -save-temps -finit-local-zero -fno-automatic -fno-underscoring -C
> > > -w -g -O2 -c -o crash.o crash3.f
> > >
> >
> > The problem is related to the -finit-local-zero option.
> > The obvious workaround is to not use that option. I'll
> > also recommend not using the -fno-underscoring option
> > as the documentation warns about its use.
>
> Dang misread my terminal output. -fno-automatic is the
> guilty option. Drop that option and things compile.
Clearly not my day! One needs both -finit-local-zero
and -fno-automatic to cause the ICE. Time for more coffee!
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug fortran/66347] Seg fault (ICE) on compile
2015-05-30 19:42 [Bug fortran/66347] New: Seg fault (ICE) on compile wbrisken at gmail dot com
` (2 preceding siblings ...)
2015-06-05 17:17 ` kargl at gcc dot gnu.org
@ 2015-06-05 17:53 ` kargl at gcc dot gnu.org
2015-06-05 21:36 ` sgk at troutmask dot apl.washington.edu
` (4 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: kargl at gcc dot gnu.org @ 2015-06-05 17:53 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66347
--- Comment #4 from kargl at gcc dot gnu.org ---
Reduced testcase.
block data
integer n
parameter (n=1)
character*2 s1(n)
character*8 s2(n)
data (s1(i),s2(i),i=1,n)/"ab","12345678"/
end
% gfc6 -c -fno-automatic -finit-local-zero block.f
f951: internal compiler error: Segmentation fault
0xb4971f crash_signal
../../gcc6/gcc/toplev.c:380
0x62abf3 apply_default_init_local
../../gcc6/gcc/fortran/resolve.c:10952
0x62abf3 resolve_fl_variable
../../gcc6/gcc/fortran/resolve.c:11214
0x62abf3 resolve_symbol
../../gcc6/gcc/fortran/resolve.c:13757
0x64155b do_traverse_symtree
../../gcc6/gcc/fortran/symbol.c:3646
0x62c002 resolve_types
../../gcc6/gcc/fortran/resolve.c:14978
0x627cc0 gfc_resolve(gfc_namespace*)
../../gcc6/gcc/fortran/resolve.c:15082
0x613889 gfc_parse_file()
../../gcc6/gcc/fortran/parse.c:5475
0x6536a5 gfc_be_parse_file
../../gcc6/gcc/fortran/f95-lang.c:225
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug fortran/66347] Seg fault (ICE) on compile
2015-05-30 19:42 [Bug fortran/66347] New: Seg fault (ICE) on compile wbrisken at gmail dot com
` (3 preceding siblings ...)
2015-06-05 17:53 ` kargl at gcc dot gnu.org
@ 2015-06-05 21:36 ` sgk at troutmask dot apl.washington.edu
2015-06-05 22:18 ` kargl at gcc dot gnu.org
` (3 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: sgk at troutmask dot apl.washington.edu @ 2015-06-05 21:36 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66347
--- Comment #5 from Steve Kargl <sgk at troutmask dot apl.washington.edu> ---
On Fri, Jun 05, 2015 at 05:53:24PM +0000, kargl at gcc dot gnu.org wrote:
> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66347
>
> --- Comment #4 from kargl at gcc dot gnu.org ---
> Reduced testcase.
>
> block data
> integer n
> parameter (n=1)
> character*2 s1(n)
> character*8 s2(n)
common /foo/ s1, s2
>
> data (s1(i),s2(i),i=1,n)/"ab","12345678"/
> end
4.8.x and 4.9.x flag the missing common statement.
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug fortran/66347] Seg fault (ICE) on compile
2015-05-30 19:42 [Bug fortran/66347] New: Seg fault (ICE) on compile wbrisken at gmail dot com
` (4 preceding siblings ...)
2015-06-05 21:36 ` sgk at troutmask dot apl.washington.edu
@ 2015-06-05 22:18 ` kargl at gcc dot gnu.org
2015-06-05 23:01 ` kargl at gcc dot gnu.org
` (2 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: kargl at gcc dot gnu.org @ 2015-06-05 22:18 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66347
kargl at gcc dot gnu.org changed:
What |Removed |Added
----------------------------------------------------------------------------
Priority|P3 |P4
Known to work| |4.8.4, 4.9.2
Assignee|unassigned at gcc dot gnu.org |kargl at gcc dot gnu.org
Known to fail| |5.1.1, 6.0
--- Comment #6 from kargl at gcc dot gnu.org ---
I have a patch
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug fortran/66347] Seg fault (ICE) on compile
2015-05-30 19:42 [Bug fortran/66347] New: Seg fault (ICE) on compile wbrisken at gmail dot com
` (5 preceding siblings ...)
2015-06-05 22:18 ` kargl at gcc dot gnu.org
@ 2015-06-05 23:01 ` kargl at gcc dot gnu.org
2015-06-05 23:17 ` kargl at gcc dot gnu.org
2015-06-05 23:18 ` kargl at gcc dot gnu.org
8 siblings, 0 replies; 10+ messages in thread
From: kargl at gcc dot gnu.org @ 2015-06-05 23:01 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66347
--- Comment #7 from kargl at gcc dot gnu.org ---
Author: kargl
Date: Fri Jun 5 23:01:22 2015
New Revision: 224175
URL: https://gcc.gnu.org/viewcvs?rev=224175&root=gcc&view=rev
Log:
2015-06-05 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/66347
* resolve.c (apply_default_init_local): Do not dereference a NULL
pointer.
2015-06-05 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/66347
* gfortran.dg/blockdata_9.f: New test.
Added:
trunk/gcc/testsuite/gfortran.dg/blockdata_9.f
Modified:
trunk/gcc/fortran/ChangeLog
trunk/gcc/fortran/resolve.c
trunk/gcc/testsuite/ChangeLog
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug fortran/66347] Seg fault (ICE) on compile
2015-05-30 19:42 [Bug fortran/66347] New: Seg fault (ICE) on compile wbrisken at gmail dot com
` (6 preceding siblings ...)
2015-06-05 23:01 ` kargl at gcc dot gnu.org
@ 2015-06-05 23:17 ` kargl at gcc dot gnu.org
2015-06-05 23:18 ` kargl at gcc dot gnu.org
8 siblings, 0 replies; 10+ messages in thread
From: kargl at gcc dot gnu.org @ 2015-06-05 23:17 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66347
--- Comment #8 from kargl at gcc dot gnu.org ---
Author: kargl
Date: Fri Jun 5 23:16:57 2015
New Revision: 224176
URL: https://gcc.gnu.org/viewcvs?rev=224176&root=gcc&view=rev
Log:
2015-06-05 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/66347
* resolve.c (apply_default_init_local): Do not dereference a NULL
pointer.
2015-06-05 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/66347
* gfortran.dg/blockdata_9.f: New test.
Added:
branches/gcc-5-branch/gcc/testsuite/gfortran.dg/blockdata_9.f
Modified:
branches/gcc-5-branch/gcc/fortran/ChangeLog
branches/gcc-5-branch/gcc/fortran/resolve.c
branches/gcc-5-branch/gcc/testsuite/ChangeLog
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug fortran/66347] Seg fault (ICE) on compile
2015-05-30 19:42 [Bug fortran/66347] New: Seg fault (ICE) on compile wbrisken at gmail dot com
` (7 preceding siblings ...)
2015-06-05 23:17 ` kargl at gcc dot gnu.org
@ 2015-06-05 23:18 ` kargl at gcc dot gnu.org
8 siblings, 0 replies; 10+ messages in thread
From: kargl at gcc dot gnu.org @ 2015-06-05 23:18 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66347
kargl at gcc dot gnu.org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution|--- |FIXED
Target Milestone|--- |5.2
--- Comment #9 from kargl at gcc dot gnu.org ---
Fixed on trunk and 5-branch. Thanks for the bug report.
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2015-06-05 23:18 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-05-30 19:42 [Bug fortran/66347] New: Seg fault (ICE) on compile wbrisken at gmail dot com
2015-06-05 17:11 ` [Bug fortran/66347] " kargl at gcc dot gnu.org
2015-06-05 17:14 ` kargl at gcc dot gnu.org
2015-06-05 17:17 ` kargl at gcc dot gnu.org
2015-06-05 17:53 ` kargl at gcc dot gnu.org
2015-06-05 21:36 ` sgk at troutmask dot apl.washington.edu
2015-06-05 22:18 ` kargl at gcc dot gnu.org
2015-06-05 23:01 ` kargl at gcc dot gnu.org
2015-06-05 23:17 ` kargl at gcc dot gnu.org
2015-06-05 23:18 ` kargl at gcc dot gnu.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).