public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/16336] New: ICE: Segmentation fault
@ 2004-07-02 20:59 schnetter at aei dot mpg dot de
2004-07-02 21:12 ` [Bug fortran/16336] " pinskia at gcc dot gnu dot org
` (13 more replies)
0 siblings, 14 replies; 15+ messages in thread
From: schnetter at aei dot mpg dot de @ 2004-07-02 20:59 UTC (permalink / raw)
To: gcc-bugs
I use GNU Fortran 95 (GCC 3.5.0 20040702 (experimental)) and compile with
/home/eschnett/gcc/bin/gfortran -ftrapv -march=pentium4 -malign-double -g3
-Wall -Wshadow -c -o $current_wd/ih_3determinant.F90.o
$current_wd/ih_3determinant.f90
and receive the error message
/home/eschnett/Calpha/Cactus/configs/einstein-gcc-debug/build/IsolatedHorizon/ih_3determinant.f90:0:
internal compiler error: Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.
--
Summary: ICE: Segmentation fault
Product: gcc
Version: 3.5.0
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: fortran
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: schnetter at aei dot mpg dot de
CC: gcc-bugs at gcc dot gnu dot org
GCC build triplet: i686-pc-linux-gnu
GCC host triplet: i686-pc-linux-gnu
GCC target triplet: i686-pc-linux-gnu
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16336
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug fortran/16336] ICE: Segmentation fault
2004-07-02 20:59 [Bug fortran/16336] New: ICE: Segmentation fault schnetter at aei dot mpg dot de
@ 2004-07-02 21:12 ` pinskia at gcc dot gnu dot org
2004-07-02 21:17 ` schnetter at aei dot mpg dot de
` (12 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-07-02 21:12 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2004-07-02 21:12 -------
Can you provide the source?
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16336
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug fortran/16336] ICE: Segmentation fault
2004-07-02 20:59 [Bug fortran/16336] New: ICE: Segmentation fault schnetter at aei dot mpg dot de
2004-07-02 21:12 ` [Bug fortran/16336] " pinskia at gcc dot gnu dot org
@ 2004-07-02 21:17 ` schnetter at aei dot mpg dot de
2004-07-02 21:17 ` schnetter at aei dot mpg dot de
` (11 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: schnetter at aei dot mpg dot de @ 2004-07-02 21:17 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From schnetter at aei dot mpg dot de 2004-07-02 21:17 -------
Created an attachment (id=6676)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=6676&action=view)
necessary module source
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16336
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug fortran/16336] ICE: Segmentation fault
2004-07-02 20:59 [Bug fortran/16336] New: ICE: Segmentation fault schnetter at aei dot mpg dot de
2004-07-02 21:12 ` [Bug fortran/16336] " pinskia at gcc dot gnu dot org
2004-07-02 21:17 ` schnetter at aei dot mpg dot de
@ 2004-07-02 21:17 ` schnetter at aei dot mpg dot de
2004-07-02 21:35 ` pinskia at gcc dot gnu dot org
` (10 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: schnetter at aei dot mpg dot de @ 2004-07-02 21:17 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From schnetter at aei dot mpg dot de 2004-07-02 21:17 -------
Created an attachment (id=6675)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=6675&action=view)
Failing source code
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16336
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug fortran/16336] ICE: Segmentation fault
2004-07-02 20:59 [Bug fortran/16336] New: ICE: Segmentation fault schnetter at aei dot mpg dot de
` (2 preceding siblings ...)
2004-07-02 21:17 ` schnetter at aei dot mpg dot de
@ 2004-07-02 21:35 ` pinskia at gcc dot gnu dot org
2004-07-02 22:20 ` reichelt at gcc dot gnu dot org
` (9 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-07-02 21:35 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2004-07-02 21:35 -------
hmm, we are trying to print out an error at this point.
Here is the backtrace:
#0 error_string (p=0x73 <Address 0x73 out of bounds>) at /home/gates/pinskia/src/gnu/gcc/src/
gcc/fortran/error.c:109
#1 0x0805b7b0 in error_print (type=0x8463fcd "Error:", format0=Variable "format0" is not available.
) at /home/gates/pinskia/src/gnu/gcc/src/gcc/fortran/error.c:425
#2 0x0805bbbe in gfc_error (format=0x8467948 "COMMON block '%s' at %C has already been USE-
associated")
at /home/gates/pinskia/src/gnu/gcc/src/gcc/fortran/error.c:596
#3 0x0806f1f6 in gfc_match_common () at /home/gates/pinskia/src/gnu/gcc/src/gcc/fortran/match.
c:2203
#4 0x08075837 in match_word (str=Variable "str" is not available.
) at /home/gates/pinskia/src/gnu/gcc/src/gcc/fortran/parse.c:66
#5 0x08075f2e in decode_statement () at /home/gates/pinskia/src/gnu/gcc/src/gcc/fortran/parse.c:
190
#6 0x08076285 in next_statement () at /home/gates/pinskia/src/gnu/gcc/src/gcc/fortran/parse.c:
353
#7 0x08076bac in parse_spec (st=ST_DATA_DECL) at /home/gates/pinskia/src/gnu/gcc/src/gcc/
fortran/parse.c:1534
#8 0x08077a5c in parse_progunit (st=Variable "st" is not available.
) at /home/gates/pinskia/src/gnu/gcc/src/gcc/fortran/parse.c:2255
#9 0x08078066 in gfc_parse_file () at /home/gates/pinskia/src/gnu/gcc/src/gcc/fortran/parse.c:
2551
#10 0x0808d41a in gfc_be_parse_file (set_yydebug=0) at /home/gates/pinskia/src/gnu/gcc/src/gcc/
fortran/f95-lang.c:264
#11 0x08391098 in toplev_main (argc=115, argv=0xbffec304) at /home/gates/pinskia/src/gnu/gcc/
src/gcc/toplev.c:981
#12 0x420174d9 in __libc_start_main () from /lib/i686/libc.so.6
#13 0x0804b071 in _start ()
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16336
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug fortran/16336] ICE: Segmentation fault
2004-07-02 20:59 [Bug fortran/16336] New: ICE: Segmentation fault schnetter at aei dot mpg dot de
` (3 preceding siblings ...)
2004-07-02 21:35 ` pinskia at gcc dot gnu dot org
@ 2004-07-02 22:20 ` reichelt at gcc dot gnu dot org
2004-07-03 9:21 ` [Bug fortran/16336] ICE with common block in module schnetter at aei dot mpg dot de
` (8 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: reichelt at gcc dot gnu dot org @ 2004-07-02 22:20 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From reichelt at gcc dot gnu dot org 2004-07-02 22:20 -------
Here's a reduced example.
It looks like the common COMMON block causes the trouble.
===================================
MODULE bar
INTEGER :: I
COMMON /X/I
END MODULE bar
SUBROUTINE foo()
USE bar
INTEGER :: J
COMMON /X/J
END SUBROUTINE foo
===================================
--
What |Removed |Added
----------------------------------------------------------------------------
CC| |reichelt at gcc dot gnu dot
| |org
Status|UNCONFIRMED |NEW
Ever Confirmed| |1
Keywords| |ice-on-valid-code
Last reconfirmed|0000-00-00 00:00:00 |2004-07-02 22:20:56
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16336
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug fortran/16336] ICE with common block in module
2004-07-02 20:59 [Bug fortran/16336] New: ICE: Segmentation fault schnetter at aei dot mpg dot de
` (4 preceding siblings ...)
2004-07-02 22:20 ` reichelt at gcc dot gnu dot org
@ 2004-07-03 9:21 ` schnetter at aei dot mpg dot de
2004-07-10 16:26 ` cvs-commit at gcc dot gnu dot org
` (7 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: schnetter at aei dot mpg dot de @ 2004-07-03 9:21 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From schnetter at aei dot mpg dot de 2004-07-03 09:21 -------
In my code, the common block in the module is declared private, so the names
should not clash.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16336
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug fortran/16336] ICE with common block in module
2004-07-02 20:59 [Bug fortran/16336] New: ICE: Segmentation fault schnetter at aei dot mpg dot de
` (5 preceding siblings ...)
2004-07-03 9:21 ` [Bug fortran/16336] ICE with common block in module schnetter at aei dot mpg dot de
@ 2004-07-10 16:26 ` cvs-commit at gcc dot gnu dot org
2004-07-10 16:34 ` tobi at gcc dot gnu dot org
` (6 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2004-07-10 16:26 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From cvs-commit at gcc dot gnu dot org 2004-07-10 16:26 -------
Subject: Bug 16336
CVSROOT: /cvs/gcc
Module name: gcc
Changes by: tobi@gcc.gnu.org 2004-07-10 16:26:06
Modified files:
gcc/fortran : ChangeLog match.c
Log message:
PR fortran/16336
* match.c (match_common): Fix error reporting for used common.
Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/fortran/ChangeLog.diff?cvsroot=gcc&r1=1.109&r2=1.110
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/fortran/match.c.diff?cvsroot=gcc&r1=1.15&r2=1.16
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16336
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug fortran/16336] ICE with common block in module
2004-07-02 20:59 [Bug fortran/16336] New: ICE: Segmentation fault schnetter at aei dot mpg dot de
` (6 preceding siblings ...)
2004-07-10 16:26 ` cvs-commit at gcc dot gnu dot org
@ 2004-07-10 16:34 ` tobi at gcc dot gnu dot org
2004-07-10 17:24 ` schnetter at aei dot mpg dot de
` (5 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: tobi at gcc dot gnu dot org @ 2004-07-10 16:34 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From tobi at gcc dot gnu dot org 2004-07-10 16:34 -------
This is invalid code: PRIVATE applies only to entities, a common block is no
entity. The segfault is the result of a bug in the call to the error handler.
Patch here: http://gcc.gnu.org/ml/fortran/2004-07/msg00085.html
--
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Keywords|ice-on-valid-code |ice-on-invalid-code, patch
Resolution| |FIXED
Target Milestone|--- |3.5.0
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16336
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug fortran/16336] ICE with common block in module
2004-07-02 20:59 [Bug fortran/16336] New: ICE: Segmentation fault schnetter at aei dot mpg dot de
` (7 preceding siblings ...)
2004-07-10 16:34 ` tobi at gcc dot gnu dot org
@ 2004-07-10 17:24 ` schnetter at aei dot mpg dot de
2004-07-10 19:48 ` tobi at gcc dot gnu dot org
` (4 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: schnetter at aei dot mpg dot de @ 2004-07-10 17:24 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From schnetter at aei dot mpg dot de 2004-07-10 17:24 -------
Section 11.2.1, "The USE statement and use association" of the draft of the
Fortran 2003 standard (J3/04-007) says
"The USE statement provides the means by which a scoping unit accesses [...]"
and then gives a list of what is accessed. This list does not include common
block names (except if common blocks are "named data objects", which I do not
think). That means that a module should never export common block names.
The standard speaks later in the same section of "accessible entities". If
common blocks are not entities, then they should not become accessible.
--
What |Removed |Added
----------------------------------------------------------------------------
Status|RESOLVED |REOPENED
Resolution|FIXED |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16336
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug fortran/16336] ICE with common block in module
2004-07-02 20:59 [Bug fortran/16336] New: ICE: Segmentation fault schnetter at aei dot mpg dot de
` (8 preceding siblings ...)
2004-07-10 17:24 ` schnetter at aei dot mpg dot de
@ 2004-07-10 19:48 ` tobi at gcc dot gnu dot org
2004-07-10 22:37 ` cvs-commit at gcc dot gnu dot org
` (3 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: tobi at gcc dot gnu dot org @ 2004-07-10 19:48 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From tobi at gcc dot gnu dot org 2004-07-10 19:48 -------
Given the discussion which followed the patch, I changed this to rejects-valid.
--
What |Removed |Added
----------------------------------------------------------------------------
Keywords|ice-on-invalid-code, patch |rejects-valid
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16336
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug fortran/16336] ICE with common block in module
2004-07-02 20:59 [Bug fortran/16336] New: ICE: Segmentation fault schnetter at aei dot mpg dot de
` (9 preceding siblings ...)
2004-07-10 19:48 ` tobi at gcc dot gnu dot org
@ 2004-07-10 22:37 ` cvs-commit at gcc dot gnu dot org
2004-07-10 22:43 ` tobi at gcc dot gnu dot org
` (2 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2004-07-10 22:37 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From cvs-commit at gcc dot gnu dot org 2004-07-10 22:37 -------
Subject: Bug 16336
CVSROOT: /cvs/gcc
Module name: gcc
Changes by: tobi@gcc.gnu.org 2004-07-10 22:37:16
Modified files:
gcc/fortran : ChangeLog decl.c gfortran.h match.c match.h
module.c symbol.c trans-common.c
Log message:
PR fortran/16336
* decl.c (gfc_match_save): Use-associated common block
doesn't collide.
* gfortran.h (gfc_common_head): Add new field 'name'.
Fix typo in comment after #endif.
* match.c (gfc_get_common): Add new argument from_common,
mangle name if flag is set, fill in new field in structure
gfc_common_head.
(match_common): Set new arg in call to gfc_get_common,
use-associated common block doesn't collide.
* match.h (gfc_get_common): Adapt prototype.
* module.c (load_commons): Set new arg in call to
gfc_get_common.
* symbol.c (free_common_tree): New function.
(gfc_free_namespace): Call new function.
* trans-common.c (several functions): Remove argument
'name', use name from gfc_common_head instead.
Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/fortran/ChangeLog.diff?cvsroot=gcc&r1=1.113&r2=1.114
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/fortran/decl.c.diff?cvsroot=gcc&r1=1.17&r2=1.18
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/fortran/gfortran.h.diff?cvsroot=gcc&r1=1.18&r2=1.19
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/fortran/match.c.diff?cvsroot=gcc&r1=1.16&r2=1.17
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/fortran/match.h.diff?cvsroot=gcc&r1=1.8&r2=1.9
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/fortran/module.c.diff?cvsroot=gcc&r1=1.10&r2=1.11
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/fortran/symbol.c.diff?cvsroot=gcc&r1=1.9&r2=1.10
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/fortran/trans-common.c.diff?cvsroot=gcc&r1=1.11&r2=1.12
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16336
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug fortran/16336] ICE with common block in module
2004-07-02 20:59 [Bug fortran/16336] New: ICE: Segmentation fault schnetter at aei dot mpg dot de
` (10 preceding siblings ...)
2004-07-10 22:37 ` cvs-commit at gcc dot gnu dot org
@ 2004-07-10 22:43 ` tobi at gcc dot gnu dot org
2004-07-10 23:00 ` cvs-commit at gcc dot gnu dot org
2004-07-12 5:57 ` pinskia at gcc dot gnu dot org
13 siblings, 0 replies; 15+ messages in thread
From: tobi at gcc dot gnu dot org @ 2004-07-10 22:43 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From tobi at gcc dot gnu dot org 2004-07-10 22:43 -------
Fixed. I hope Erik agrees this time :-)
--
What |Removed |Added
----------------------------------------------------------------------------
Status|REOPENED |RESOLVED
Resolution| |FIXED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16336
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug fortran/16336] ICE with common block in module
2004-07-02 20:59 [Bug fortran/16336] New: ICE: Segmentation fault schnetter at aei dot mpg dot de
` (11 preceding siblings ...)
2004-07-10 22:43 ` tobi at gcc dot gnu dot org
@ 2004-07-10 23:00 ` cvs-commit at gcc dot gnu dot org
2004-07-12 5:57 ` pinskia at gcc dot gnu dot org
13 siblings, 0 replies; 15+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2004-07-10 23:00 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From cvs-commit at gcc dot gnu dot org 2004-07-10 23:00 -------
Subject: Bug 16336
CVSROOT: /cvs/gcc
Module name: gcc
Changes by: tobi@gcc.gnu.org 2004-07-10 22:59:58
Modified files:
gcc/testsuite : ChangeLog
Added files:
gcc/testsuite/gfortran.fortran-torture/execute: common_2.f90
Log message:
PR fortran/16336
* gfortran.fortran-torture/execute/common_2.f90: New test.
Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&r1=1.3980&r2=1.3981
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gfortran.fortran-torture/execute/common_2.f90.diff?cvsroot=gcc&r1=NONE&r2=1.1
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16336
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug fortran/16336] ICE with common block in module
2004-07-02 20:59 [Bug fortran/16336] New: ICE: Segmentation fault schnetter at aei dot mpg dot de
` (12 preceding siblings ...)
2004-07-10 23:00 ` cvs-commit at gcc dot gnu dot org
@ 2004-07-12 5:57 ` pinskia at gcc dot gnu dot org
13 siblings, 0 replies; 15+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-07-12 5:57 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2004-07-12 05:57 -------
*** Bug 16479 has been marked as a duplicate of this bug. ***
--
What |Removed |Added
----------------------------------------------------------------------------
CC| |olchansk at panix dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16336
^ permalink raw reply [flat|nested] 15+ messages in thread
end of thread, other threads:[~2004-07-12 5:57 UTC | newest]
Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-07-02 20:59 [Bug fortran/16336] New: ICE: Segmentation fault schnetter at aei dot mpg dot de
2004-07-02 21:12 ` [Bug fortran/16336] " pinskia at gcc dot gnu dot org
2004-07-02 21:17 ` schnetter at aei dot mpg dot de
2004-07-02 21:17 ` schnetter at aei dot mpg dot de
2004-07-02 21:35 ` pinskia at gcc dot gnu dot org
2004-07-02 22:20 ` reichelt at gcc dot gnu dot org
2004-07-03 9:21 ` [Bug fortran/16336] ICE with common block in module schnetter at aei dot mpg dot de
2004-07-10 16:26 ` cvs-commit at gcc dot gnu dot org
2004-07-10 16:34 ` tobi at gcc dot gnu dot org
2004-07-10 17:24 ` schnetter at aei dot mpg dot de
2004-07-10 19:48 ` tobi at gcc dot gnu dot org
2004-07-10 22:37 ` cvs-commit at gcc dot gnu dot org
2004-07-10 22:43 ` tobi at gcc dot gnu dot org
2004-07-10 23:00 ` cvs-commit at gcc dot gnu dot org
2004-07-12 5:57 ` pinskia 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).