public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/27324] New: Initialized module equivalence member causes assembler error
@ 2006-04-26 14:29 paul dot thomas at jet dot uk
2006-04-26 16:39 ` [Bug fortran/27324] " tobi at gcc dot gnu dot org
` (5 more replies)
0 siblings, 6 replies; 7+ messages in thread
From: paul dot thomas at jet dot uk @ 2006-04-26 14:29 UTC (permalink / raw)
To: gcc-bugs
module a
real(8) :: reM, M =99d0
equivalence (M, reM)
end module a
use a
print *, M
end
produces
/tmp/ccaLXlcY.s: Assembler messages:
/tmp/ccaLXlcY.s:42: Error: symbol `a.eq.0_' is already defined
Paul
--
Summary: Initialized module equivalence member causes assembler
error
Product: gcc
Version: unknown
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: fortran
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: paul dot thomas at jet dot uk
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27324
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug fortran/27324] Initialized module equivalence member causes assembler error
2006-04-26 14:29 [Bug fortran/27324] New: Initialized module equivalence member causes assembler error paul dot thomas at jet dot uk
@ 2006-04-26 16:39 ` tobi at gcc dot gnu dot org
2006-04-27 10:44 ` paul dot thomas at jet dot uk
` (4 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: tobi at gcc dot gnu dot org @ 2006-04-26 16:39 UTC (permalink / raw)
To: gcc-bugs
--
tobi at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Ever Confirmed|0 |1
Keywords| |assemble-failure
Last reconfirmed|0000-00-00 00:00:00 |2006-04-26 16:38:59
date| |
Summary|Initialized module |Initialized module
|equivalence member causes |equivalence member causes
|assembler error |assembler error
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27324
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug fortran/27324] Initialized module equivalence member causes assembler error
2006-04-26 14:29 [Bug fortran/27324] New: Initialized module equivalence member causes assembler error paul dot thomas at jet dot uk
2006-04-26 16:39 ` [Bug fortran/27324] " tobi at gcc dot gnu dot org
@ 2006-04-27 10:44 ` paul dot thomas at jet dot uk
2006-04-27 13:24 ` paul dot thomas at jet dot uk
` (3 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: paul dot thomas at jet dot uk @ 2006-04-27 10:44 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from paul dot thomas at jet dot uk 2006-04-27 10:44 -------
This one is marvelous - it's one of Sherlock Holme's "three pipers".
If the initialization is removed, all works correctly. If the module is
compiled separately and the object file linked with the main program, it works
correctly, as it stands.....
The root of the problem is in build_common_decl, where the backend_decl for the
equivalence union seems to get lost for some reason. In consequence, two decls
get made, which possess ASSEMBLER_DECL_NAMEs. For some reason that I do not yet
see, it matters if they are initilized or not. This latter is slightly
academic, in that the solution will be to get the existing backend_decl to
subsequent calls.
Paul
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27324
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug fortran/27324] Initialized module equivalence member causes assembler error
2006-04-26 14:29 [Bug fortran/27324] New: Initialized module equivalence member causes assembler error paul dot thomas at jet dot uk
2006-04-26 16:39 ` [Bug fortran/27324] " tobi at gcc dot gnu dot org
2006-04-27 10:44 ` paul dot thomas at jet dot uk
@ 2006-04-27 13:24 ` paul dot thomas at jet dot uk
2006-05-02 14:13 ` sayle at gcc dot gnu dot org
` (2 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: paul dot thomas at jet dot uk @ 2006-04-27 13:24 UTC (permalink / raw)
To: gcc-bugs
------- Comment #2 from paul dot thomas at jet dot uk 2006-04-27 13:24 -------
Holmes was wrong - it was a one piper.
The symbol for the module equivalence was being scrubbed for the lack of a
gfc_commit_symbols. Interchanging lines 1061 and 1064 in trans-common.c does
the job. Thus:
/* Translate local equivalence. */
finish_equivalences (ns);
/* Commit the newly created symbols for common blocks and module
equivalences. */
gfc_commit_symbols ();
This regtests together with the fix for pr27269 on Cygwin_NT. As soon as I
figure out why I cannot free the gfc_expr's in this latter fix, I will submit a
combined patch and testcase.
Paul
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27324
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug fortran/27324] Initialized module equivalence member causes assembler error
2006-04-26 14:29 [Bug fortran/27324] New: Initialized module equivalence member causes assembler error paul dot thomas at jet dot uk
` (2 preceding siblings ...)
2006-04-27 13:24 ` paul dot thomas at jet dot uk
@ 2006-05-02 14:13 ` sayle at gcc dot gnu dot org
2006-05-02 14:27 ` roger at eyesopen dot com
2006-05-08 5:02 ` pault at gcc dot gnu dot org
5 siblings, 0 replies; 7+ messages in thread
From: sayle at gcc dot gnu dot org @ 2006-05-02 14:13 UTC (permalink / raw)
To: gcc-bugs
------- Comment #3 from sayle at gcc dot gnu dot org 2006-05-02 14:13 -------
Subject: Bug 27324
Author: sayle
Date: Tue May 2 14:13:17 2006
New Revision: 113465
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=113465
Log:
2006-05-02 Paul Thomas <pault@gcc.gnu.org>
PR fortran/27269
* module.c: Add static flag in_load_equiv.
(mio_expr_ref): Return if no symtree and in_load_equiv.
(load_equiv): If any of the equivalence members have no symtree, free
the equivalence and the associated expressions.
PR fortran/27324
* trans-common.c (gfc_trans_common): Invert the order of calls to
finish equivalences and gfc_commit_symbols.
PR fortran/27269
PR fortran/27324
* gfortran.dg/module_equivalence_2.f90: New test.
Added:
trunk/gcc/testsuite/gfortran.dg/module_equivalence_2.f90
Modified:
trunk/gcc/fortran/ChangeLog
trunk/gcc/fortran/module.c
trunk/gcc/fortran/trans-common.c
trunk/gcc/testsuite/ChangeLog
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27324
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug fortran/27324] Initialized module equivalence member causes assembler error
2006-04-26 14:29 [Bug fortran/27324] New: Initialized module equivalence member causes assembler error paul dot thomas at jet dot uk
` (3 preceding siblings ...)
2006-05-02 14:13 ` sayle at gcc dot gnu dot org
@ 2006-05-02 14:27 ` roger at eyesopen dot com
2006-05-08 5:02 ` pault at gcc dot gnu dot org
5 siblings, 0 replies; 7+ messages in thread
From: roger at eyesopen dot com @ 2006-05-02 14:27 UTC (permalink / raw)
To: gcc-bugs
------- Comment #4 from roger at eyesopen dot com 2006-05-02 14:26 -------
This should now be fixed on mainline by Paul's patch. Thanks.
--
roger at eyesopen dot com changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |FIXED
Target Milestone|--- |4.2.0
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27324
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug fortran/27324] Initialized module equivalence member causes assembler error
2006-04-26 14:29 [Bug fortran/27324] New: Initialized module equivalence member causes assembler error paul dot thomas at jet dot uk
` (4 preceding siblings ...)
2006-05-02 14:27 ` roger at eyesopen dot com
@ 2006-05-08 5:02 ` pault at gcc dot gnu dot org
5 siblings, 0 replies; 7+ messages in thread
From: pault at gcc dot gnu dot org @ 2006-05-08 5:02 UTC (permalink / raw)
To: gcc-bugs
------- Comment #5 from pault at gcc dot gnu dot org 2006-05-08 05:02 -------
Subject: Bug 27324
Author: pault
Date: Mon May 8 05:01:56 2006
New Revision: 113618
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=113618
Log:
2006-05-08 Paul Thomas <pault@gcc.gnu.org>
PR fortran/24813
* trans-array.c (get_array_ctor_strlen): Remove static attribute.
* trans.h: Add prototype for get_array_ctor_strlen.
* trans-intrinsic.c (gfc_conv_intrinsic_len): Switch on EXPR_ARRAY
and call get_array_ctor_strlen.
PR fortran/27269
* module.c: Add static flag in_load_equiv.
(mio_expr_ref): Return if no symtree and in_load_equiv.
(load_equiv): If any of the equivalence members have no symtree, free
the equivalence and the associated expressions.
PR fortran/27324
* trans-common.c (gfc_trans_common): Invert the order of calls to
finish equivalences and gfc_commit_symbols.
PR fortran/25099
* resolve.c (resolve_call): Check conformity of elemental
subroutine actual arguments.
2006-05-08 Paul Thomas <pault@gcc.gnu.org>
PR fortran/24813
* gfortran.dg/char_cons_len.f90: New test.
PR fortran/27269
PR fortran/27324
* gfortran.dg/module_equivalence_2.f90: New test.
PR fortran/25099
* gfortran.dg/elemental_subroutine_4.f90: New test.
* gfortran.dg/assumed_size_refs_1.f90: Add error to non-conforming
call sub (m, x).
Added:
branches/gcc-4_1-branch/gcc/testsuite/gfortran.dg/char_cons_len.f90
branches/gcc-4_1-branch/gcc/testsuite/gfortran.dg/elemental_subroutine_4.f90
branches/gcc-4_1-branch/gcc/testsuite/gfortran.dg/module_equivalence_2.f90
Modified:
branches/gcc-4_1-branch/gcc/fortran/ChangeLog
branches/gcc-4_1-branch/gcc/fortran/module.c
branches/gcc-4_1-branch/gcc/fortran/resolve.c
branches/gcc-4_1-branch/gcc/fortran/trans-array.c
branches/gcc-4_1-branch/gcc/fortran/trans-common.c
branches/gcc-4_1-branch/gcc/fortran/trans-intrinsic.c
branches/gcc-4_1-branch/gcc/fortran/trans.h
branches/gcc-4_1-branch/gcc/testsuite/ChangeLog
branches/gcc-4_1-branch/gcc/testsuite/gfortran.dg/assumed_size_refs_1.f90
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27324
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2006-05-08 5:02 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-04-26 14:29 [Bug fortran/27324] New: Initialized module equivalence member causes assembler error paul dot thomas at jet dot uk
2006-04-26 16:39 ` [Bug fortran/27324] " tobi at gcc dot gnu dot org
2006-04-27 10:44 ` paul dot thomas at jet dot uk
2006-04-27 13:24 ` paul dot thomas at jet dot uk
2006-05-02 14:13 ` sayle at gcc dot gnu dot org
2006-05-02 14:27 ` roger at eyesopen dot com
2006-05-08 5:02 ` pault 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).