public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/52622] New: ICE in gfortran 4.6.3, x86_64
@ 2012-03-19 17:15 adrian at llnl dot gov
2012-03-20 8:38 ` [Bug fortran/52622] " burnus at gcc dot gnu.org
` (10 more replies)
0 siblings, 11 replies; 12+ messages in thread
From: adrian at llnl dot gov @ 2012-03-19 17:15 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52622
Bug #: 52622
Summary: ICE in gfortran 4.6.3, x86_64
Classification: Unclassified
Product: gcc
Version: 4.6.3
Status: UNCONFIRMED
Severity: blocker
Priority: P3
Component: fortran
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: adrian@llnl.gov
Created attachment 26922
--> http://gcc.gnu.org/bugzilla/attachment.cgi?id=26922
delta-reduced testcase
I'm getting an ICE in gfortran 4.6.3 .
The machine is running Ubuntu 10.04, 64 bit on an Intel Xeon.
$ gfortran -I. -c -o test.o test.f03
f951: internal compiler error: Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.
I've attached a (nonsensical) delta-reduced test case.
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug fortran/52622] ICE in gfortran 4.6.3, x86_64
2012-03-19 17:15 [Bug fortran/52622] New: ICE in gfortran 4.6.3, x86_64 adrian at llnl dot gov
@ 2012-03-20 8:38 ` burnus at gcc dot gnu.org
2012-03-20 15:55 ` adrian at llnl dot gov
` (9 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: burnus at gcc dot gnu.org @ 2012-03-20 8:38 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52622
Tobias Burnus <burnus at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Attachment #26922|application/octet-stream |text/plain
mime type| |
--- Comment #1 from Tobias Burnus <burnus at gcc dot gnu.org> 2012-03-20 08:34:26 UTC ---
Comment on attachment 26922
--> http://gcc.gnu.org/bugzilla/attachment.cgi?id=26922
delta-reduced testcase
With GCC 4.8 I don't get an ICE. (I cannot test 4.6 at the moment.)
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug fortran/52622] ICE in gfortran 4.6.3, x86_64
2012-03-19 17:15 [Bug fortran/52622] New: ICE in gfortran 4.6.3, x86_64 adrian at llnl dot gov
2012-03-20 8:38 ` [Bug fortran/52622] " burnus at gcc dot gnu.org
@ 2012-03-20 15:55 ` adrian at llnl dot gov
2012-03-21 15:59 ` dominiq at lps dot ens.fr
` (8 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: adrian at llnl dot gov @ 2012-03-20 15:55 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52622
--- Comment #2 from Adrian Prantl <adrian at llnl dot gov> 2012-03-20 15:33:40 UTC ---
I'm getting the error with both gcc 4.6.2 and 4.6.3
Below is the stack trace.
Program received signal SIGSEGV, Segmentation fault.
resolve_symbol (sym=0x14091b0) at ../../gcc-4.6.2/gcc/fortran/resolve.c:12412
12412 sym->formal_ns->refs++;
(gdb) l
12407 formal = formal->next;
12408
12409 if (formal)
12410 {
12411 sym->formal_ns = formal->sym->ns;
12412 sym->formal_ns->refs++;
12413 }
12414 }
12415
12416 /* Check threadprivate restrictions. */
(gdb) bt
#0 resolve_symbol (sym=0x14091b0)
at ../../gcc-4.6.2/gcc/fortran/resolve.c:12412
#1 0x000000000052f157 in traverse_ns (st=<value optimized out>,
func=0x511340 <resolve_symbol>)
at ../../gcc-4.6.2/gcc/fortran/symbol.c:3333
#2 0x000000000052f146 in traverse_ns (st=<value optimized out>,
func=0x511340 <resolve_symbol>)
at ../../gcc-4.6.2/gcc/fortran/symbol.c:3330
#3 0x000000000051bd4c in resolve_types (ns=0x14087b0)
at ../../gcc-4.6.2/gcc/fortran/resolve.c:13543
#4 0x000000000051be28 in resolve_types (ns=0x13cd6e0)
at ../../gcc-4.6.2/gcc/fortran/resolve.c:13554
#5 0x0000000000510bf4 in gfc_resolve (ns=0x13cd6e0)
at ../../gcc-4.6.2/gcc/fortran/resolve.c:13642
#6 gfc_resolve (ns=0x13cd6e0) at ../../gcc-4.6.2/gcc/fortran/resolve.c:13630
#7 0x0000000000506229 in gfc_parse_file ()
at ../../gcc-4.6.2/gcc/fortran/parse.c:4404
#8 0x000000000053f366 in gfc_be_parse_file ()
at ../../gcc-4.6.2/gcc/fortran/f95-lang.c:250
#9 0x000000000079d6fc in compile_file (argc=13, argv=0x7fffffffdfc8)
at ../../gcc-4.6.2/gcc/toplev.c:579
#10 do_compile (argc=13, argv=0x7fffffffdfc8)
at ../../gcc-4.6.2/gcc/toplev.c:1900
---Type <return> to continue, or q <return> to quit---
#11 toplev_main (argc=13, argv=0x7fffffffdfc8)
at ../../gcc-4.6.2/gcc/toplev.c:1963
#12 0x00007ffff7874c4d in __libc_start_main (main=<value optimized out>,
argc=<value optimized out>, ubp_av=<value optimized out>,
init=<value optimized out>, fini=<value optimized out>,
rtld_fini=<value optimized out>, stack_end=0x7fffffffdfb8)
at libc-start.c:226
#13 0x000000000049f9b5 in _start ()
(gdb)
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug fortran/52622] ICE in gfortran 4.6.3, x86_64
2012-03-19 17:15 [Bug fortran/52622] New: ICE in gfortran 4.6.3, x86_64 adrian at llnl dot gov
2012-03-20 8:38 ` [Bug fortran/52622] " burnus at gcc dot gnu.org
2012-03-20 15:55 ` adrian at llnl dot gov
@ 2012-03-21 15:59 ` dominiq at lps dot ens.fr
2012-03-22 7:06 ` burnus at gcc dot gnu.org
` (7 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: dominiq at lps dot ens.fr @ 2012-03-21 15:59 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52622
--- Comment #3 from Dominique d'Humieres <dominiq at lps dot ens.fr> 2012-03-21 15:56:46 UTC ---
On x86_64-apple-darwin10, compiling the test with 4.6.3, 4.7.0RC2, or trunk
gives the follwoing errors
pr52622.f90:130.2:
function passeverywherefcomplex_impl(self, c1, c2, c3, exception) result(
&
1
Error: Unclassifiable statement at (1)
pr52622.f90:103.8:
if (b1) then
1
Error: IF clause at (1) requires a scalar LOGICAL expression
pr52622.f90:99.8:
if (b) then
1
Error: IF clause at (1) requires a scalar LOGICAL expression
but no ICE (w/wo -w). Fixing the errors with
--- pr52622.f90 2012-03-19 17:58:14.000000000 +0100
+++ pr52622_db.f90 2012-03-19 18:07:37.000000000 +0100
@@ -96,10 +96,12 @@ module Args_Basic_Impl
end type Args_Basic_impl_t
contains
function passinbool_impl(self, b, exception) result(retval)
+ logical :: b
if (b) then
endif
end function passinbool_impl
function passeverywherebool_impl(self, b1, b2, b3, exception) result(retval)
+ logical :: b1
if (b1) then
endif
end function passeverywherebool_impl
@@ -128,7 +130,10 @@ contains
retval)
end function passeverywheredouble_impl
function passeverywherefcomplex_impl(self, c1, c2, c3, exception) result(
&
+ retval)
complex (kind=sidl_fcomplex), intent(in) :: c1
+ end function passeverywherefcomplex_impl
function passindcomplex_impl(self, c, exception) result(retval)
end function passindcomplex_impl
end module Args_Basic_Impl
+end
the code is compiled without error.
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug fortran/52622] ICE in gfortran 4.6.3, x86_64
2012-03-19 17:15 [Bug fortran/52622] New: ICE in gfortran 4.6.3, x86_64 adrian at llnl dot gov
` (2 preceding siblings ...)
2012-03-21 15:59 ` dominiq at lps dot ens.fr
@ 2012-03-22 7:06 ` burnus at gcc dot gnu.org
2012-04-09 14:49 ` janus at gcc dot gnu.org
` (6 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: burnus at gcc dot gnu.org @ 2012-03-22 7:06 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52622
Tobias Burnus <burnus at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |ice-on-invalid-code
CC| |burnus at gcc dot gnu.org
--- Comment #4 from Tobias Burnus <burnus at gcc dot gnu.org> 2012-03-22 06:58:43 UTC ---
I can reproduce the failure with
gcc-Version 4.6.2 20111011 (prerelease) [gcc-4_6-branch revision 179784]
(GCC)
4.6.4 20120310 (prerelease) [gcc-4_6-branch revision 185168] (GCC)
however, for some reasons not with
gcc version 4.6.2 20111212 [gcc-4_6-branch revision 182222] (SUSE Linux)
However, also with 4.8.0 20120320, I do see a failure in valgrind:
==6587== Invalid read of size 4
==6587== at 0x5859C5: resolve_symbol(gfc_symbol*) (resolve.c:10613)
==6587== by 0x5A3253: do_traverse_symtree(gfc_symtree*, void
(*)(gfc_symtree*), void (*)(gfc_symbol*)) (symbol.c:3386)
==6587== by 0x58FC13: resolve_types(gfc_namespace*) (resolve.c:13961)
==6587== by 0x58FCF7: resolve_types(gfc_namespace*) (resolve.c:13972)
==6587== by 0x584043: gfc_resolve(gfc_namespace*) (resolve.c:14061)
* * *
In 4.6, I have sym->formal_ns == NULL, which crashes for
"sym->formal_ns->refs++;". In case of 4.8, it is more difficult as there is no
crash for me but just the valgrind warning.
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug fortran/52622] ICE in gfortran 4.6.3, x86_64
2012-03-19 17:15 [Bug fortran/52622] New: ICE in gfortran 4.6.3, x86_64 adrian at llnl dot gov
` (3 preceding siblings ...)
2012-03-22 7:06 ` burnus at gcc dot gnu.org
@ 2012-04-09 14:49 ` janus at gcc dot gnu.org
2013-12-29 14:22 ` dominiq at lps dot ens.fr
` (5 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: janus at gcc dot gnu.org @ 2012-04-09 14:49 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52622
janus at gcc dot gnu.org changed:
What |Removed |Added
----------------------------------------------------------------------------
Severity|blocker |normal
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug fortran/52622] ICE in gfortran 4.6.3, x86_64
2012-03-19 17:15 [Bug fortran/52622] New: ICE in gfortran 4.6.3, x86_64 adrian at llnl dot gov
` (4 preceding siblings ...)
2012-04-09 14:49 ` janus at gcc dot gnu.org
@ 2013-12-29 14:22 ` dominiq at lps dot ens.fr
2015-10-20 18:44 ` kargl at gcc dot gnu.org
` (4 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: dominiq at lps dot ens.fr @ 2013-12-29 14:22 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52622
Dominique d'Humieres <dominiq at lps dot ens.fr> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Last reconfirmed| |2013-12-29
Ever confirmed|0 |1
--- Comment #5 from Dominique d'Humieres <dominiq at lps dot ens.fr> ---
On x86_64-apple-darwin10, I don't get any ICE with the releases I have tested,
except 4.8.2 with -w. On x86_64-apple-darwin13, I get the ICE for 4.8.2 and
4.8.3 (r206161) and all 4.9 versions I have tested with -w, but not for 4.7.4
(r206161). May be a 4.8/4.9 regression.
For 4.8.3, the ICE is
f951: internal compiler error: in gfc_free_namespace, at fortran/symbol.c:3461
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug fortran/52622] ICE in gfortran 4.6.3, x86_64
2012-03-19 17:15 [Bug fortran/52622] New: ICE in gfortran 4.6.3, x86_64 adrian at llnl dot gov
` (5 preceding siblings ...)
2013-12-29 14:22 ` dominiq at lps dot ens.fr
@ 2015-10-20 18:44 ` kargl at gcc dot gnu.org
2015-10-24 12:49 ` dominiq at lps dot ens.fr
` (3 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: kargl at gcc dot gnu.org @ 2015-10-20 18:44 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=52622
kargl at gcc dot gnu.org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |WAITING
CC| |kargl at gcc dot gnu.org
--- Comment #6 from kargl at gcc dot gnu.org ---
The problem reported here seems to be fixed in 4.9.4,
5.2.1, and 6.0. No idea when or where it was fixed.
The original testcase gives
% gfc6 -w -c a3.f90
a3.f90:130:2:
function passeverywherefcomplex_impl(self, c1, c2, c3, exception) result(
&
1
Error: Unclassifiable statement at (1)
a3.f90:103:8:
if (b1) then
1
Error: IF clause at (1) requires a scalar LOGICAL expression
a3.f90:99:8:
if (b) then
1
Error: IF clause at (1) requires a scalar LOGICAL expression
Adding proper declarations for b and b1, then ends with
% gfc6 -w -c a3.f90
a3.f90:132:2:
function passeverywherefcomplex_impl(self, c1, c2, c3, exception) result(
&
1
Error: Unclassifiable statement at (1)
Adding the missing 'retval) and 'end function', then yields something
that compiles.
Does the problem still exist?
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug fortran/52622] ICE in gfortran 4.6.3, x86_64
2012-03-19 17:15 [Bug fortran/52622] New: ICE in gfortran 4.6.3, x86_64 adrian at llnl dot gov
` (6 preceding siblings ...)
2015-10-20 18:44 ` kargl at gcc dot gnu.org
@ 2015-10-24 12:49 ` dominiq at lps dot ens.fr
2020-07-01 20:16 ` [Bug fortran/52622] heap-use-after-free with instrumented compiler anlauf at gcc dot gnu.org
` (2 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: dominiq at lps dot ens.fr @ 2015-10-24 12:49 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=52622
--- Comment #7 from Dominique d'Humieres <dominiq at lps dot ens.fr> ---
> Does the problem still exist?
The change occurred between revisions r217100 (2014-11-04) and r217500
(2014-11-13), likely r217383 for pr44054.
Note that there is probably still a latent bug, an least with trunk (6.0) for
which I see some random ICEs:
[book15] f90/bug% gfc -w pr52622.f90
pr52622.f90:130:2:
function passeverywherefcomplex_impl(self, c1, c2, c3, exception) result(
&
1
Error: Unclassifiable statement at (1)
f951: internal compiler error: Segmentation fault: 11
...
[book15] f90/bug% gfc -w pr52622.f90
pr52622.f90:130:2:
function passeverywherefcomplex_impl(self, c1, c2, c3, exception) result(
&
1
Error: Unclassifiable statement at (1)
pr52622.f90:103:8:
if (b1) then
1
Error: IF clause at (1) requires a scalar LOGICAL expression
pr52622.f90:99:8:
if (b) then
1
Error: IF clause at (1) requires a scalar LOGICAL expression
f951: internal compiler error: Segmentation fault: 11
...
[book15] f90/bug% gfcp -w pr52622.f90
pr52622.f90:130:2:
function passeverywherefcomplex_impl(self, c1, c2, c3, exception) result(
&
1
Error: Unclassifiable statement at (1)
(null):0: confused by earlier errors, bailing out
[book15] f90/bug% gfca -w pr52622.f90
pr52622.f90:130:2:
function passeverywherefcomplex_impl(self, c1, c2, c3, exception) result(
&
1
Error: Unclassifiable statement at (1)
(null):0: confused by earlier errors, bailing out
gfc is r229284, gfcp is r229283 configured with --enable-checking=release, and
gfca is r229261 configured with --enable-checking=release.
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug fortran/52622] heap-use-after-free with instrumented compiler
2012-03-19 17:15 [Bug fortran/52622] New: ICE in gfortran 4.6.3, x86_64 adrian at llnl dot gov
` (7 preceding siblings ...)
2015-10-24 12:49 ` dominiq at lps dot ens.fr
@ 2020-07-01 20:16 ` anlauf at gcc dot gnu.org
2020-07-01 20:26 ` dominiq at lps dot ens.fr
2021-03-03 7:14 ` zeccav at gmail dot com
10 siblings, 0 replies; 12+ messages in thread
From: anlauf at gcc dot gnu.org @ 2020-07-01 20:16 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=52622
anlauf at gcc dot gnu.org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |WAITING
Priority|P3 |P4
--- Comment #14 from anlauf at gcc dot gnu.org ---
I only see errors on gcc-11 master. Anything left to do? Or close it?
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug fortran/52622] heap-use-after-free with instrumented compiler
2012-03-19 17:15 [Bug fortran/52622] New: ICE in gfortran 4.6.3, x86_64 adrian at llnl dot gov
` (8 preceding siblings ...)
2020-07-01 20:16 ` [Bug fortran/52622] heap-use-after-free with instrumented compiler anlauf at gcc dot gnu.org
@ 2020-07-01 20:26 ` dominiq at lps dot ens.fr
2021-03-03 7:14 ` zeccav at gmail dot com
10 siblings, 0 replies; 12+ messages in thread
From: dominiq at lps dot ens.fr @ 2020-07-01 20:26 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=52622
Dominique d'Humieres <dominiq at lps dot ens.fr> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|WAITING |NEW
--- Comment #15 from Dominique d'Humieres <dominiq at lps dot ens.fr> ---
> I only see errors on gcc-11 master. Anything left to do? Or close it?
You need an instrumented compiler to see the
==85033==ERROR: AddressSanitizer: heap-use-after-free on address 0x6130000aa8da
at pc 0x0001003fed9b bp 0x7ffeefbfe920 sp 0x7ffeefbfe918
...
error. With a regular compiler I see erratic errors:
in pp_quoted_string, at pretty-print.c:1838
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug fortran/52622] heap-use-after-free with instrumented compiler
2012-03-19 17:15 [Bug fortran/52622] New: ICE in gfortran 4.6.3, x86_64 adrian at llnl dot gov
` (9 preceding siblings ...)
2020-07-01 20:26 ` dominiq at lps dot ens.fr
@ 2021-03-03 7:14 ` zeccav at gmail dot com
10 siblings, 0 replies; 12+ messages in thread
From: zeccav at gmail dot com @ 2021-03-03 7:14 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=52622
Vittorio Zecca <zeccav at gmail dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |zeccav at gmail dot com
--- Comment #16 from Vittorio Zecca <zeccav at gmail dot com> ---
On my sanitized gfortran, trunk version, I do not see sanitizer errors.
Maybe must be compiled with some special options?
By the way the delta-reduced-testcase contains syntax errors that I had to fix.
^ permalink raw reply [flat|nested] 12+ messages in thread
end of thread, other threads:[~2021-03-03 7:14 UTC | newest]
Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-03-19 17:15 [Bug fortran/52622] New: ICE in gfortran 4.6.3, x86_64 adrian at llnl dot gov
2012-03-20 8:38 ` [Bug fortran/52622] " burnus at gcc dot gnu.org
2012-03-20 15:55 ` adrian at llnl dot gov
2012-03-21 15:59 ` dominiq at lps dot ens.fr
2012-03-22 7:06 ` burnus at gcc dot gnu.org
2012-04-09 14:49 ` janus at gcc dot gnu.org
2013-12-29 14:22 ` dominiq at lps dot ens.fr
2015-10-20 18:44 ` kargl at gcc dot gnu.org
2015-10-24 12:49 ` dominiq at lps dot ens.fr
2020-07-01 20:16 ` [Bug fortran/52622] heap-use-after-free with instrumented compiler anlauf at gcc dot gnu.org
2020-07-01 20:26 ` dominiq at lps dot ens.fr
2021-03-03 7:14 ` zeccav at gmail dot com
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).