public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/17917] New: gfortran ICE on "equivalence"
@ 2004-10-09 23:24 olchansk at panix dot com
2004-10-10 15:45 ` [Bug fortran/17917] " pinskia at gcc dot gnu dot org
` (16 more replies)
0 siblings, 17 replies; 18+ messages in thread
From: olchansk at panix dot com @ 2004-10-09 23:24 UTC (permalink / raw)
To: gcc-bugs
In "gcc version 4.0.0 20041009 (experimental)", the "equivalence" statement no
longer works. (I think it used to work). This is what I get:
[olchansk@tw15 gfortran_test]$ cat test_equiv.f90
module test_equiv
implicit none
private
real a(100)
integer b(100)
! Following error, unless "equivalence" is removed:
! /triumfcs/trshare/olchansk/gcc-tree-ssa/install/bin/gfortran -x f95 -c -o
test_equiv.o -O2 -g -Wall -Waliasing -Wline-truncation -Wsurprising
-Wunused-labels -fPIC -ffixed-line-length-132 test_equiv.f90
! test_equiv.f90:0: internal compiler error: backend decl for module variable
a already exists
! Please submit a full bug report,
! with preprocessed source if appropriate.
! See <URL:http://gcc.gnu.org/bugs.html> for instructions.
equivalence (a(1),b(1))
end module test_equiv
[olchansk@tw15 gfortran_test]$ make test_equiv.o
/triumfcs/trshare/olchansk/gcc-tree-ssa/install/bin/gfortran -x f95 -c -o
test_equiv.o -O2 -g -Wall -Waliasing -Wline-truncation -Wsurprising
-Wunused-labels -fPIC -ffixed-line-length-132 test_equiv.f90
Warning: test_equiv.f90:9: Line is being truncated
test_equiv.f90:0: internal compiler error: backend decl for module variable a
already exists
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://gcc.gnu.org/bugs.html> for instructions.
make: *** [test_equiv.o] Error 1
[olchansk@tw15 gfortran_test]$
/triumfcs/trshare/olchansk/gcc-tree-ssa/install/bin/gfortran -v
Reading specs from
/triumfcs/trshare/olchansk/gcc-tree-ssa/install-20041008/lib/gcc/i686-pc-linux-gnu/4.0.0/specs
Configured with: ../gcc/configure
--prefix=/triumfcs/trshare/olchansk/gcc-tree-ssa/install-20041008
--with-mpfr-dir=/triumfcs/trshare/olchansk/gcc-tree-ssa/mpfr/mpfr-2.0.3
--with-gmp-dir=/triumfcs/trshare/olchansk/gcc-tree-ssa/mpfr/gmp-4.1.3
--enable-languages=c,f95
Thread model: posix
gcc version 4.0.0 20041009 (experimental)
K.O.
--
Summary: gfortran ICE on "equivalence"
Product: gcc
Version: 4.0.0
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: fortran
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: olchansk at panix dot com
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=17917
^ permalink raw reply [flat|nested] 18+ messages in thread
* [Bug fortran/17917] gfortran ICE on "equivalence"
2004-10-09 23:24 [Bug fortran/17917] New: gfortran ICE on "equivalence" olchansk at panix dot com
@ 2004-10-10 15:45 ` pinskia at gcc dot gnu dot org
2004-10-10 16:54 ` tobi at gcc dot gnu dot org
` (15 subsequent siblings)
16 siblings, 0 replies; 18+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-10-10 15:45 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2004-10-10 15:45 -------
Confirmed.
--
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Ever Confirmed| |1
Keywords| |ice-on-valid-code
Last reconfirmed|0000-00-00 00:00:00 |2004-10-10 15:45:15
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17917
^ permalink raw reply [flat|nested] 18+ messages in thread
* [Bug fortran/17917] gfortran ICE on "equivalence"
2004-10-09 23:24 [Bug fortran/17917] New: gfortran ICE on "equivalence" olchansk at panix dot com
2004-10-10 15:45 ` [Bug fortran/17917] " pinskia at gcc dot gnu dot org
@ 2004-10-10 16:54 ` tobi at gcc dot gnu dot org
2004-10-10 17:45 ` tobi at gcc dot gnu dot org
` (14 subsequent siblings)
16 siblings, 0 replies; 18+ messages in thread
From: tobi at gcc dot gnu dot org @ 2004-10-10 16:54 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From tobi at gcc dot gnu dot org 2004-10-10 16:54 -------
This works with:
[tobi@marktplatz tests]$ /home/tobi/tmp/gcc/build/gcc/f951 pr17917.f90
Execution times (seconds)
parser : 0.00 ( 0%) usr 0.01 (100%) sys 0.06 (15%) wall
varconst : 0.00 ( 0%) usr 0.00 ( 0%) sys 0.01 ( 2%) wall
TOTAL : 0.02 0.01 0.41
Extra diagnostic checks enabled; compiler may run slowly.
Configure with --disable-checking to disable checks.
[tobi@marktplatz tests]$ /home/tobi/tmp/gcc/build/gcc/f951 --version
GNU F95 version 3.5.0 20040630 (experimental) (i686-pc-linux-gnu)
compiled by GNU C version 3.5.0 20040623 (experimental).
GGC heuristics: --param ggc-min-expand=30 --param ggc-min-heapsize=4096
[tobi@marktplatz tests]$
And is broken with:
[tobi@marktplatz tests]$ /home/tobi/usr/libexec/gcc/i686-pc-linux-gnu/3.5.0/f951
pr17917.f90
pr17917.f90:0: internal compiler error: backend decl for module variable a
already exists
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://gcc.gnu.org/bugs.html> for instructions.
[tobi@marktplatz tests]$ /home/tobi/usr/libexec/gcc/i686-pc-linux-gnu/3.5.0/f951
--version
GNU F95 version 3.5.0 20040829 (experimental) (i686-pc-linux-gnu)
compiled by GNU C version 3.5.0 20040822 (experimental).
GGC heuristics: --param ggc-min-expand=30 --param ggc-min-heapsize=4096
So a change somewhere in between 2004-06-23 and 2004-08-22 must have caused this.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17917
^ permalink raw reply [flat|nested] 18+ messages in thread
* [Bug fortran/17917] gfortran ICE on "equivalence"
2004-10-09 23:24 [Bug fortran/17917] New: gfortran ICE on "equivalence" olchansk at panix dot com
2004-10-10 15:45 ` [Bug fortran/17917] " pinskia at gcc dot gnu dot org
2004-10-10 16:54 ` tobi at gcc dot gnu dot org
@ 2004-10-10 17:45 ` tobi at gcc dot gnu dot org
2004-10-11 16:37 ` tobi at gcc dot gnu dot org
` (13 subsequent siblings)
16 siblings, 0 replies; 18+ messages in thread
From: tobi at gcc dot gnu dot org @ 2004-10-10 17:45 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From tobi at gcc dot gnu dot org 2004-10-10 17:44 -------
(In reply to comment #2)
> So a change somewhere in between 2004-06-23 and 2004-08-22 must have caused this.
^^ make that 29
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17917
^ permalink raw reply [flat|nested] 18+ messages in thread
* [Bug fortran/17917] gfortran ICE on "equivalence"
2004-10-09 23:24 [Bug fortran/17917] New: gfortran ICE on "equivalence" olchansk at panix dot com
` (2 preceding siblings ...)
2004-10-10 17:45 ` tobi at gcc dot gnu dot org
@ 2004-10-11 16:37 ` tobi at gcc dot gnu dot org
2004-12-18 11:37 ` paulthomas2 at wanadoo dot fr
` (12 subsequent siblings)
16 siblings, 0 replies; 18+ messages in thread
From: tobi at gcc dot gnu dot org @ 2004-10-11 16:37 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From tobi at gcc dot gnu dot org 2004-10-11 16:37 -------
The most suspicious commits are:
2004-07-10 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
Paul Brook <paul@codesourcery.com>
PR fortran/13415
* trans-common.c (calculate_length): Remove ...
(get_segment_info): Merge into here. Save field type.
(build_field): Use saved type.
(create_common, new_condition, new_segment, finish_equivalences):
Use new get_segment_info.
* trans-types.c: Update comment.
2004-07-10 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
* trans-decl.c (gfc_create_module_variable): Nothing to do if
symbol is in common, because we ...
(gfc_generate_module_vars): Call gfc_trans_common.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17917
^ permalink raw reply [flat|nested] 18+ messages in thread
* [Bug fortran/17917] gfortran ICE on "equivalence"
2004-10-09 23:24 [Bug fortran/17917] New: gfortran ICE on "equivalence" olchansk at panix dot com
` (3 preceding siblings ...)
2004-10-11 16:37 ` tobi at gcc dot gnu dot org
@ 2004-12-18 11:37 ` paulthomas2 at wanadoo dot fr
2005-01-10 13:40 ` aj at gcc dot gnu dot org
` (11 subsequent siblings)
16 siblings, 0 replies; 18+ messages in thread
From: paulthomas2 at wanadoo dot fr @ 2004-12-18 11:37 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From paulthomas2 at wanadoo dot fr 2004-12-18 11:37 -------
(In reply to comment #1)
> Confirmed.
Note that this bug is provoked by this minimalist version of the above
module test_equiv !Bug 17917
real a(2),b(4)
equivalence (a(1),b(3))
end module test_equiv
However, equivalence does what it should in programs, subroutines and
functions. For example, this works correctly:
PROGRAM test_equiv ! .not.Bug 17917
common b
real a(2)
INTEGER b(4)
equivalence (a(1),b(3))
b=(/1,2,3,4/)
PRINT *,a
end PROGRAM test_equiv
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17917
^ permalink raw reply [flat|nested] 18+ messages in thread
* [Bug fortran/17917] gfortran ICE on "equivalence"
2004-10-09 23:24 [Bug fortran/17917] New: gfortran ICE on "equivalence" olchansk at panix dot com
` (4 preceding siblings ...)
2004-12-18 11:37 ` paulthomas2 at wanadoo dot fr
@ 2005-01-10 13:40 ` aj at gcc dot gnu dot org
2005-03-12 0:15 ` tobi at gcc dot gnu dot org
` (10 subsequent siblings)
16 siblings, 0 replies; 18+ messages in thread
From: aj at gcc dot gnu dot org @ 2005-01-10 13:40 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From aj at gcc dot gnu dot org 2005-01-10 13:40 -------
This bug occurs also in a SPEC2004 candidate benchmark.
--
What |Removed |Added
----------------------------------------------------------------------------
CC| |aj at gcc dot gnu dot org
OtherBugsDependingO| |15502
nThis| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17917
^ permalink raw reply [flat|nested] 18+ messages in thread
* [Bug fortran/17917] gfortran ICE on "equivalence"
2004-10-09 23:24 [Bug fortran/17917] New: gfortran ICE on "equivalence" olchansk at panix dot com
` (5 preceding siblings ...)
2005-01-10 13:40 ` aj at gcc dot gnu dot org
@ 2005-03-12 0:15 ` tobi at gcc dot gnu dot org
2005-04-03 18:11 ` tcallawa at redhat dot com
` (9 subsequent siblings)
16 siblings, 0 replies; 18+ messages in thread
From: tobi at gcc dot gnu dot org @ 2005-03-12 0:15 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From tobi at gcc dot gnu dot org 2005-03-12 00:15 -------
*** Bug 20146 has been marked as a duplicate of this bug. ***
--
What |Removed |Added
----------------------------------------------------------------------------
CC| |dir at lanl dot gov
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17917
^ permalink raw reply [flat|nested] 18+ messages in thread
* [Bug fortran/17917] gfortran ICE on "equivalence"
2004-10-09 23:24 [Bug fortran/17917] New: gfortran ICE on "equivalence" olchansk at panix dot com
` (6 preceding siblings ...)
2005-03-12 0:15 ` tobi at gcc dot gnu dot org
@ 2005-04-03 18:11 ` tcallawa at redhat dot com
2005-04-12 18:33 ` koziol at ncsa dot uiuc dot edu
` (8 subsequent siblings)
16 siblings, 0 replies; 18+ messages in thread
From: tcallawa at redhat dot com @ 2005-04-03 18:11 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From tcallawa at redhat dot com 2005-04-03 18:11 -------
hdf5 is also hitting this ICE.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17917
^ permalink raw reply [flat|nested] 18+ messages in thread
* [Bug fortran/17917] gfortran ICE on "equivalence"
2004-10-09 23:24 [Bug fortran/17917] New: gfortran ICE on "equivalence" olchansk at panix dot com
` (7 preceding siblings ...)
2005-04-03 18:11 ` tcallawa at redhat dot com
@ 2005-04-12 18:33 ` koziol at ncsa dot uiuc dot edu
2005-05-06 22:49 ` pinskia at gcc dot gnu dot org
` (7 subsequent siblings)
16 siblings, 0 replies; 18+ messages in thread
From: koziol at ncsa dot uiuc dot edu @ 2005-04-12 18:33 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From koziol at ncsa dot uiuc dot edu 2005-04-12 18:33 -------
Are there any workarounds we can use to avoid this problem? Also, is there
anything we can do to help resolve it?
Quincey Koziol
HDF Development Team
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17917
^ permalink raw reply [flat|nested] 18+ messages in thread
* [Bug fortran/17917] gfortran ICE on "equivalence"
2004-10-09 23:24 [Bug fortran/17917] New: gfortran ICE on "equivalence" olchansk at panix dot com
` (8 preceding siblings ...)
2005-04-12 18:33 ` koziol at ncsa dot uiuc dot edu
@ 2005-05-06 22:49 ` pinskia at gcc dot gnu dot org
2005-06-16 16:38 ` tobi at gcc dot gnu dot org
` (6 subsequent siblings)
16 siblings, 0 replies; 18+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-05-06 22:49 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2005-05-06 22:49 -------
*** Bug 21429 has been marked as a duplicate of this bug. ***
--
What |Removed |Added
----------------------------------------------------------------------------
CC| |nicolas dot girard at nerim
| |dot net
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17917
^ permalink raw reply [flat|nested] 18+ messages in thread
* [Bug fortran/17917] gfortran ICE on "equivalence"
2004-10-09 23:24 [Bug fortran/17917] New: gfortran ICE on "equivalence" olchansk at panix dot com
` (9 preceding siblings ...)
2005-05-06 22:49 ` pinskia at gcc dot gnu dot org
@ 2005-06-16 16:38 ` tobi at gcc dot gnu dot org
2005-08-03 7:54 ` paulthomas2 at wanadoo dot fr
` (5 subsequent siblings)
16 siblings, 0 replies; 18+ messages in thread
From: tobi at gcc dot gnu dot org @ 2005-06-16 16:38 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From tobi at gcc dot gnu dot org 2005-06-16 16:38 -------
Patch posted here: http://gcc.gnu.org/ml/fortran/2005-06/msg00307.html
--
What |Removed |Added
----------------------------------------------------------------------------
CC| |tobi at gcc dot gnu dot org
URL| |http://gcc.gnu.org/ml/fortra
| |n/2005-06/msg00307.html
Keywords| |patch
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17917
^ permalink raw reply [flat|nested] 18+ messages in thread
* [Bug fortran/17917] gfortran ICE on "equivalence"
2004-10-09 23:24 [Bug fortran/17917] New: gfortran ICE on "equivalence" olchansk at panix dot com
` (10 preceding siblings ...)
2005-06-16 16:38 ` tobi at gcc dot gnu dot org
@ 2005-08-03 7:54 ` paulthomas2 at wanadoo dot fr
2005-08-30 19:14 ` pinskia at gcc dot gnu dot org
` (4 subsequent siblings)
16 siblings, 0 replies; 18+ messages in thread
From: paulthomas2 at wanadoo dot fr @ 2005-08-03 7:54 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From paulthomas2 at wanadoo dot fr 2005-08-03 07:54 -------
(In reply to comment #11)
> Patch posted here: http://gcc.gnu.org/ml/fortran/2005-06/msg00307.html
This is still not complete. The example below produces separate unions, which
represent the equivalences, in sub1 and sub2. They need to be promoted to a
more elevated namespace AND declared external, so that loaded procedures also
pick up the same union. The COMMON code is mostly OK, so I will be applying
that to module equivalences. I'm on to it, as promised on the list.....
Paul T
module equiv
real :: x(10), y(2)
equivalence (y(1), x(5))
end module equiv
subroutine sub1 ()
use equiv
x =(/(real (i), i = 1,10)/)
end subroutine sub1
subroutine sub2 ()
use equiv
print *, y
end subroutine sub2
program test_equiv
call sub1 ()
call sub2 ()
end program test_equiv
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17917
^ permalink raw reply [flat|nested] 18+ messages in thread
* [Bug fortran/17917] gfortran ICE on "equivalence"
2004-10-09 23:24 [Bug fortran/17917] New: gfortran ICE on "equivalence" olchansk at panix dot com
` (11 preceding siblings ...)
2005-08-03 7:54 ` paulthomas2 at wanadoo dot fr
@ 2005-08-30 19:14 ` pinskia at gcc dot gnu dot org
2005-09-03 12:05 ` pinskia at gcc dot gnu dot org
` (3 subsequent siblings)
16 siblings, 0 replies; 18+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-08-30 19:14 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2005-08-30 17:57 -------
*** Bug 23641 has been marked as a duplicate of this bug. ***
--
What |Removed |Added
----------------------------------------------------------------------------
CC| |David dot Webb at soc dot
| |soton dot ac dot uk
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17917
^ permalink raw reply [flat|nested] 18+ messages in thread
* [Bug fortran/17917] gfortran ICE on "equivalence"
2004-10-09 23:24 [Bug fortran/17917] New: gfortran ICE on "equivalence" olchansk at panix dot com
` (12 preceding siblings ...)
2005-08-30 19:14 ` pinskia at gcc dot gnu dot org
@ 2005-09-03 12:05 ` pinskia at gcc dot gnu dot org
2005-09-09 0:25 ` cvs-commit at gcc dot gnu dot org
` (2 subsequent siblings)
16 siblings, 0 replies; 18+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-09-03 12:05 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2005-09-03 12:05 -------
*** Bug 23713 has been marked as a duplicate of this bug. ***
--
What |Removed |Added
----------------------------------------------------------------------------
CC| |swhite at aei dot mpg dot de
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17917
^ permalink raw reply [flat|nested] 18+ messages in thread
* [Bug fortran/17917] gfortran ICE on "equivalence"
2004-10-09 23:24 [Bug fortran/17917] New: gfortran ICE on "equivalence" olchansk at panix dot com
` (13 preceding siblings ...)
2005-09-03 12:05 ` pinskia at gcc dot gnu dot org
@ 2005-09-09 0:25 ` cvs-commit at gcc dot gnu dot org
2005-09-09 9:07 ` cvs-commit at gcc dot gnu dot org
2005-09-09 22:15 ` pinskia at gcc dot gnu dot org
16 siblings, 0 replies; 18+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2005-09-09 0:25 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From cvs-commit at gcc dot gnu dot org 2005-09-09 00:24 -------
Subject: Bug 17917
CVSROOT: /cvs/gcc
Module name: gcc
Changes by: pault@gcc.gnu.org 2005-09-09 00:23:18
Modified files:
gcc/fortran : gfortran.h match.c module.c primary.c
trans-common.c trans-decl.c ChangeLog
gcc/testsuite : ChangeLog
Added files:
gcc/testsuite/gfortran.dg: module_blank_common.f90
module_double_reuse.f90
common_equivalence_1.f
common_equivalence_2.f
common_equivalence_3.f
contained_equivalence_1.f90
module_commons_1.f90
module_equivalence_1.f90
nested_modules_1.f90
Log message:
2005-09-09 Paul Thomas <pault@gcc.gnu.org>
PR fortran/18878
* module.c (find_use_name_n): Based on original
find_use_name. Either counts number of use names for a
given real name or returns use name n.
(find_use_name, number_use_names): Interfaces to the
function find_use_name_n.
(read_module): Add the logic and calls to these functions,
so that mutiple reuses of the same real name are loaded.
2005-09-09 Paul Thomas <pault@gcc.gnu.org>
PR fortran/22304
PR fortran/23270
PR fortran/18870
PR fortran/16511
PR fortran/17917
* gfortran.h: Move definition of BLANK_COMMON_NAME from trans-
common.c so that it is accessible to module.c. Add common_head
field to gfc_symbol structure. Add field for the equivalence
name AND new attr field, in_equivalence.
* match.c (gfc_match_common, gfc_match_equivalence): In loops
that flag common block equivalences, emit an error if the
common blocks are different, using sym->common_head as the
common block identifier. Ensure that symbols that are equivalence
associated with a common block are marked as being in_common.
* module.c (write_blank_common): New.
(write_common): Use unmangled common block name.
(load_equiv): New function ported from g95.
(read_module): Call load_equiv.
(write_equiv): New function ported from g95. Correct
string referencing for gfc functions. Give module
equivalences a unique name.
(write_module): Call write_equiv and write_blank_common.
* primary.c (match_variable) Old gfc_match_variable, made
static and third argument provided to indicate if parent
namespace to be visited or not.
(gfc_match_variable) New. Interface to match_variable.
(gfc_match_equiv_variable) New. Interface to match_variable.
* trans-common.c (finish_equivalences): Provide the call
to create_common with a gfc_common_header so that
module equivalences are made external, rather than local.
(find_equivalences): Ensure that all members in common block
equivalences are marked as used. This prevents the subsequent
call to this function from making local unions.
* trans-decl.c (gfc_generate_function_code): Move the call to
gfc_generate_contained_functions to after the call to
gfc_trans_common so the use-associated, contained common
blocks produce the correct references.
(gfc_create_module_variable): Return for equivalenced symbols
with existing backend declaration.
2005-09-09 Paul Thomas <pault@gcc.gnu.org>
PR fortran/18878
* gfortran.dg/module_double_reuse.f90: New.
2005-09-09 Paul Thomas <pault@gcc.gnu.org>
PR fortran/23270
PR fortran/22304
PR fortran/18870
PR fortran/17917
PR fortran/16511
* gfortran.dg/common_equivalence_1.f: New.
* gfortran.dg/common_equivalence_2.f: New.
* gfortran.dg/common_equivalence_3.f: New.
* gfortran.dg/contained_equivalence_1.f90: New.
* gfortran.dg/module_blank_common.f90: New.
* gfortran.dg/module_commons_1.f90: New.
* gfortran.dg/module_equivalence_1.f90: New.
* gfortran.dg/nested_modules_1.f90: New.
* gfortran.dg/g77/19990905-0.f: Remove XFAIL, rearrange
equivalences and add comment to connect the test with
the PR.
Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/fortran/gfortran.h.diff?cvsroot=gcc&r1=1.84&r2=1.85
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/fortran/match.c.diff?cvsroot=gcc&r1=1.44&r2=1.45
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/fortran/module.c.diff?cvsroot=gcc&r1=1.35&r2=1.36
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/fortran/primary.c.diff?cvsroot=gcc&r1=1.35&r2=1.36
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/fortran/trans-common.c.diff?cvsroot=gcc&r1=1.30&r2=1.31
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/fortran/trans-decl.c.diff?cvsroot=gcc&r1=1.67&r2=1.68
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/fortran/ChangeLog.diff?cvsroot=gcc&r1=1.543&r2=1.544
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gfortran.dg/module_blank_common.f90.diff?cvsroot=gcc&r1=NONE&r2=1.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gfortran.dg/module_double_reuse.f90.diff?cvsroot=gcc&r1=NONE&r2=1.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gfortran.dg/common_equivalence_1.f.diff?cvsroot=gcc&r1=NONE&r2=1.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gfortran.dg/common_equivalence_2.f.diff?cvsroot=gcc&r1=NONE&r2=1.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gfortran.dg/common_equivalence_3.f.diff?cvsroot=gcc&r1=NONE&r2=1.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gfortran.dg/contained_equivalence_1.f90.diff?cvsroot=gcc&r1=NONE&r2=1.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gfortran.dg/module_commons_1.f90.diff?cvsroot=gcc&r1=NONE&r2=1.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gfortran.dg/module_equivalence_1.f90.diff?cvsroot=gcc&r1=NONE&r2=1.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gfortran.dg/nested_modules_1.f90.diff?cvsroot=gcc&r1=NONE&r2=1.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&r1=1.6033&r2=1.6034
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17917
^ permalink raw reply [flat|nested] 18+ messages in thread
* [Bug fortran/17917] gfortran ICE on "equivalence"
2004-10-09 23:24 [Bug fortran/17917] New: gfortran ICE on "equivalence" olchansk at panix dot com
` (14 preceding siblings ...)
2005-09-09 0:25 ` cvs-commit at gcc dot gnu dot org
@ 2005-09-09 9:07 ` cvs-commit at gcc dot gnu dot org
2005-09-09 22:15 ` pinskia at gcc dot gnu dot org
16 siblings, 0 replies; 18+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2005-09-09 9:07 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From cvs-commit at gcc dot gnu dot org 2005-09-09 09:06 -------
Subject: Bug 17917
CVSROOT: /cvs/gcc
Module name: gcc
Branch: gcc-4_0-branch
Changes by: pault@gcc.gnu.org 2005-09-09 09:06:09
Modified files:
gcc/fortran : gfortran.h match.h match.c module.c primary.c
trans-common.c trans-decl.c ChangeLog
gcc/testsuite/gfortran.dg/g77: 19990905-0.f
gcc/testsuite : ChangeLog
Added files:
gcc/testsuite/gfortran.dg: module_blank_common.f90
module_double_reuse.f90
common_equivalence_1.f
common_equivalence_2.f
common_equivalence_3.f
contained_equivalence_1.f90
module_commons_1.f90
module_equivalence_1.f90
nested_modules_1.f90
Log message:
2005-09-09 Paul Thomas <pault@gcc.gnu.org>
PR fortran/18878
* module.c (find_use_name_n): Based on original
find_use_name. Either counts number of use names for a
given real name or returns use name n.
(find_use_name, number_use_names): Interfaces to the
function find_use_name_n.
(read_module): Add the logic and calls to these functions,
so that mutiple reuses of the same real name are loaded.
2005-09-09 Paul Thomas <pault@gcc.gnu.org>
PR fortran/22304
PR fortran/23270
PR fortran/18870
PR fortran/16511
PR fortran/17917
* gfortran.h: Move definition of BLANK_COMMON_NAME from trans-
common.c so that it is accessible to module.c. Add common_head
field to gfc_symbol structure. Add field for the equivalence
name AND new attr field, in_equivalence.
* match.c (gfc_match_common, gfc_match_equivalence): In loops
that flag common block equivalences, emit an error if the
common blocks are different, using sym->common_head as the
common block identifier. Ensure that symbols that are equivalence
associated with a common block are marked as being in_common.
* module.c (write_blank_common): New.
(write_common): Use unmangled common block name.
(load_equiv): New function ported from g95.
(read_module): Call load_equiv.
(write_equiv): New function ported from g95. Correct
string referencing for gfc functions. Give module
equivalences a unique name.
(write_module): Call write_equiv and write_blank_common.
* primary.c (match_variable) Old gfc_match_variable, made
static and third argument provided to indicate if parent
namespace to be visited or not.
(gfc_match_variable): New. Interface to match_variable.
(gfc_match_equiv_variable): New. Interface to match_variable.
* trans-common.c (finish_equivalences): Provide the call
to create_common with a gfc_common_header so that
module equivalences are made external, rather than local.
(find_equivalences): Ensure that all members in common block
equivalences are marked as used. This prevents the subsequent
call to this function from making local unions.
* trans-decl.c (gfc_generate_function_code): Move the call to
gfc_generate_contained_functions to after the call to
gfc_trans_common so the use-associated, contained common
blocks produce the correct references.
(gfc_create_module_variable): Return for equivalenced symbols
with existing backend declaration.
2005-09-09 Paul Thomas <pault@gcc.gnu.org>
PR fortran/18878
* gfortran.dg/module_double_reuse.f90: New.
2005-09-09 Paul Thomas <pault@gcc.gnu.org>
PR fortran/23270
PR fortran/22304
PR fortran/18870
PR fortran/17917
PR fortran/16511
* gfortran.dg/common_equivalence_1.f: New.
* gfortran.dg/common_equivalence_2.f: New.
* gfortran.dg/common_equivalence_3.f: New.
* gfortran.dg/contained_equivalence_1.f90: New.
* gfortran.dg/module_blank_common.f90: New.
* gfortran.dg/module_commons_1.f90: New.
* gfortran.dg/module_equivalence_1.f90: New.
* gfortran.dg/nested_modules_1.f90: New.
* gfortran.dg/g77/19990905-0.f: Remove XFAIL, rearrange
equivalences and add comment to connect the test with
the PR.
Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/fortran/gfortran.h.diff?cvsroot=gcc&only_with_tag=gcc-4_0-branch&r1=1.58.2.16&r2=1.58.2.17
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/fortran/match.h.diff?cvsroot=gcc&only_with_tag=gcc-4_0-branch&r1=1.10.36.1&r2=1.10.36.2
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/fortran/match.c.diff?cvsroot=gcc&only_with_tag=gcc-4_0-branch&r1=1.31.8.11&r2=1.31.8.12
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/fortran/module.c.diff?cvsroot=gcc&only_with_tag=gcc-4_0-branch&r1=1.31.2.2&r2=1.31.2.3
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/fortran/primary.c.diff?cvsroot=gcc&only_with_tag=gcc-4_0-branch&r1=1.22.2.10&r2=1.22.2.11
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/fortran/trans-common.c.diff?cvsroot=gcc&only_with_tag=gcc-4_0-branch&r1=1.23.2.4&r2=1.23.2.5
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/fortran/trans-decl.c.diff?cvsroot=gcc&only_with_tag=gcc-4_0-branch&r1=1.54.2.5&r2=1.54.2.6
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/fortran/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-4_0-branch&r1=1.335.2.114&r2=1.335.2.115
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gfortran.dg/module_blank_common.f90.diff?cvsroot=gcc&only_with_tag=gcc-4_0-branch&r1=NONE&r2=1.1.2.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gfortran.dg/module_double_reuse.f90.diff?cvsroot=gcc&only_with_tag=gcc-4_0-branch&r1=NONE&r2=1.1.2.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gfortran.dg/common_equivalence_1.f.diff?cvsroot=gcc&only_with_tag=gcc-4_0-branch&r1=NONE&r2=1.1.2.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gfortran.dg/common_equivalence_2.f.diff?cvsroot=gcc&only_with_tag=gcc-4_0-branch&r1=NONE&r2=1.1.2.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gfortran.dg/common_equivalence_3.f.diff?cvsroot=gcc&only_with_tag=gcc-4_0-branch&r1=NONE&r2=1.1.2.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gfortran.dg/contained_equivalence_1.f90.diff?cvsroot=gcc&only_with_tag=gcc-4_0-branch&r1=NONE&r2=1.1.2.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gfortran.dg/module_commons_1.f90.diff?cvsroot=gcc&only_with_tag=gcc-4_0-branch&r1=NONE&r2=1.1.2.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gfortran.dg/module_equivalence_1.f90.diff?cvsroot=gcc&only_with_tag=gcc-4_0-branch&r1=NONE&r2=1.1.2.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gfortran.dg/nested_modules_1.f90.diff?cvsroot=gcc&only_with_tag=gcc-4_0-branch&r1=NONE&r2=1.1.2.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gfortran.dg/g77/19990905-0.f.diff?cvsroot=gcc&only_with_tag=gcc-4_0-branch&r1=1.1&r2=1.1.48.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-4_0-branch&r1=1.5084.2.394&r2=1.5084.2.395
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17917
^ permalink raw reply [flat|nested] 18+ messages in thread
* [Bug fortran/17917] gfortran ICE on "equivalence"
2004-10-09 23:24 [Bug fortran/17917] New: gfortran ICE on "equivalence" olchansk at panix dot com
` (15 preceding siblings ...)
2005-09-09 9:07 ` cvs-commit at gcc dot gnu dot org
@ 2005-09-09 22:15 ` pinskia at gcc dot gnu dot org
16 siblings, 0 replies; 18+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-09-09 22:15 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2005-09-09 22:15 -------
Fixed.
--
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |FIXED
Target Milestone|--- |4.0.2
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17917
^ permalink raw reply [flat|nested] 18+ messages in thread
end of thread, other threads:[~2005-09-09 22:15 UTC | newest]
Thread overview: 18+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-10-09 23:24 [Bug fortran/17917] New: gfortran ICE on "equivalence" olchansk at panix dot com
2004-10-10 15:45 ` [Bug fortran/17917] " pinskia at gcc dot gnu dot org
2004-10-10 16:54 ` tobi at gcc dot gnu dot org
2004-10-10 17:45 ` tobi at gcc dot gnu dot org
2004-10-11 16:37 ` tobi at gcc dot gnu dot org
2004-12-18 11:37 ` paulthomas2 at wanadoo dot fr
2005-01-10 13:40 ` aj at gcc dot gnu dot org
2005-03-12 0:15 ` tobi at gcc dot gnu dot org
2005-04-03 18:11 ` tcallawa at redhat dot com
2005-04-12 18:33 ` koziol at ncsa dot uiuc dot edu
2005-05-06 22:49 ` pinskia at gcc dot gnu dot org
2005-06-16 16:38 ` tobi at gcc dot gnu dot org
2005-08-03 7:54 ` paulthomas2 at wanadoo dot fr
2005-08-30 19:14 ` pinskia at gcc dot gnu dot org
2005-09-03 12:05 ` pinskia at gcc dot gnu dot org
2005-09-09 0:25 ` cvs-commit at gcc dot gnu dot org
2005-09-09 9:07 ` cvs-commit at gcc dot gnu dot org
2005-09-09 22:15 ` 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).