public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/36366] New: [4.3/4.4 Regression] ICE in gfc_conv_component_ref
@ 2008-05-29 11:08 jakub at gcc dot gnu dot org
2008-05-29 12:06 ` [Bug fortran/36366] " burnus at gcc dot gnu dot org
` (6 more replies)
0 siblings, 7 replies; 8+ messages in thread
From: jakub at gcc dot gnu dot org @ 2008-05-29 11:08 UTC (permalink / raw)
To: gcc-bugs
MODULE types
IMPLICIT NONE
TYPE :: inner
INTEGER, POINTER :: i(:)
END TYPE inner
TYPE :: outer
TYPE(inner), POINTER :: inr(:)
END TYPE outer
END MODULE types
MODULE mymod
IMPLICIT NONE
CONTAINS
FUNCTION test1()
USE types
IMPLICIT NONE
TYPE(outer), POINTER :: test1
NULLIFY(test1)
END FUNCTION test1
END MODULE mymod
MODULE test
IMPLICIT NONE
CONTAINS
SUBROUTINE test2(a)
USE mymod
USE types
IMPLICIT NONE
TYPE(outer), INTENT(INOUT) :: a
INTEGER :: i
i = a%inr(1)%i(1)
END SUBROUTINE test2
SUBROUTINE test3(a)
USE types
IMPLICIT NONE
TYPE(outer), INTENT(IN) :: a
END SUBROUTINE test3
END MODULE test
ICEs in gfc_conv_component_ref since 4.3 - backend_decl is NULL.
--
Summary: [4.3/4.4 Regression] ICE in gfc_conv_component_ref
Product: gcc
Version: 4.3.1
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: fortran
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: jakub at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36366
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug fortran/36366] [4.3/4.4 Regression] ICE in gfc_conv_component_ref
2008-05-29 11:08 [Bug fortran/36366] New: [4.3/4.4 Regression] ICE in gfc_conv_component_ref jakub at gcc dot gnu dot org
@ 2008-05-29 12:06 ` burnus at gcc dot gnu dot org
2008-06-04 21:16 ` pault at gcc dot gnu dot org
` (5 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: burnus at gcc dot gnu dot org @ 2008-05-29 12:06 UTC (permalink / raw)
To: gcc-bugs
--
burnus at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |burnus at gcc dot gnu dot
| |org
Status|UNCONFIRMED |NEW
Ever Confirmed|0 |1
Keywords| |ice-on-valid-code
Priority|P3 |P4
Last reconfirmed|0000-00-00 00:00:00 |2008-05-29 12:05:35
date| |
Target Milestone|--- |4.3.2
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36366
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug fortran/36366] [4.3/4.4 Regression] ICE in gfc_conv_component_ref
2008-05-29 11:08 [Bug fortran/36366] New: [4.3/4.4 Regression] ICE in gfc_conv_component_ref jakub at gcc dot gnu dot org
2008-05-29 12:06 ` [Bug fortran/36366] " burnus at gcc dot gnu dot org
@ 2008-06-04 21:16 ` pault at gcc dot gnu dot org
2008-06-05 19:46 ` pault at gcc dot gnu dot org
` (4 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: pault at gcc dot gnu dot org @ 2008-06-04 21:16 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from pault at gcc dot gnu dot org 2008-06-04 21:15 -------
(In reply to comment #0)
This PR is totally vexacious!
A number of things get rid of the ICE:
(i) Interchange test2 and test3;
(ii) Interchange the USE statements in test2; or
(iii) Make the component of outer a non-pointer array.
At the moment, I cannot see what draws these together. Nor can I see any
difference in the .mod files for the cases that work....
Paul
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36366
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug fortran/36366] [4.3/4.4 Regression] ICE in gfc_conv_component_ref
2008-05-29 11:08 [Bug fortran/36366] New: [4.3/4.4 Regression] ICE in gfc_conv_component_ref jakub at gcc dot gnu dot org
2008-05-29 12:06 ` [Bug fortran/36366] " burnus at gcc dot gnu dot org
2008-06-04 21:16 ` pault at gcc dot gnu dot org
@ 2008-06-05 19:46 ` pault at gcc dot gnu dot org
2008-06-07 9:06 ` pault at gcc dot gnu dot org
` (3 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: pault at gcc dot gnu dot org @ 2008-06-05 19:46 UTC (permalink / raw)
To: gcc-bugs
------- Comment #2 from pault at gcc dot gnu dot org 2008-06-05 19:45 -------
> At the moment, I cannot see what draws these together. Nor can I see any
> difference in the .mod files for the cases that work....
Ah... go it! gcc-4.2 had a derived type list for each namespace and care was
taken to apply the same backend_decl to each like derived type in all
namespaces, including formal namespaces. gcc-4.3 onwards uses a single list,
generate in resolve.c. This was failing to check derived type components, with
the result that they could be missed in formal namespaces.
This fixes the problem:
Index: gcc/fortran/resolve.c
===================================================================
*** gcc/fortran/resolve.c (revision 136412)
--- gcc/fortran/resolve.c (working copy)
*************** resolve_fl_derived (gfc_symbol *sym)
*** 7637,7642 ****
--- 7637,7647 ----
return FAILURE;
}
+ /* Ensure that all the derived type components are put on the
+ derived type list; even in formal namespaces. */
+ if (c->ts.type == BT_DERIVED && c->ts.derived)
+ resolve_fl_derived (c->ts.derived);
+
if (c->pointer || c->allocatable || c->as == NULL)
continue;
It's mine! If it regtests OK, I'll apply it as obvious.
Paul
--
pault at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
AssignedTo|unassigned at gcc dot gnu |pault at gcc dot gnu dot org
|dot org |
Status|NEW |ASSIGNED
Last reconfirmed|2008-05-29 12:05:35 |2008-06-05 19:45:48
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36366
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug fortran/36366] [4.3/4.4 Regression] ICE in gfc_conv_component_ref
2008-05-29 11:08 [Bug fortran/36366] New: [4.3/4.4 Regression] ICE in gfc_conv_component_ref jakub at gcc dot gnu dot org
` (2 preceding siblings ...)
2008-06-05 19:46 ` pault at gcc dot gnu dot org
@ 2008-06-07 9:06 ` pault at gcc dot gnu dot org
2008-06-17 18:09 ` pault at gcc dot gnu dot org
` (2 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: pault at gcc dot gnu dot org @ 2008-06-07 9:06 UTC (permalink / raw)
To: gcc-bugs
------- Comment #3 from pault at gcc dot gnu dot org 2008-06-07 09:05 -------
Index: gcc/fortran/resolve.c
> ===================================================================
> *** gcc/fortran/resolve.c (revision 136412)
> --- gcc/fortran/resolve.c (working copy)
> *************** resolve_fl_derived (gfc_symbol *sym)
> *** 7637,7642 ****
> --- 7637,7647 ----
> return FAILURE;
> }
>
> + /* Ensure that all the derived type components are put on the
> + derived type list; even in formal namespaces. */
> + if (c->ts.type == BT_DERIVED && c->ts.derived)
> + resolve_fl_derived (c->ts.derived);
> +
> if (c->pointer || c->allocatable || c->as == NULL)
> continue;
This patch broke some tests because it gets into a loop with pointer components
whose type is the same as the 'host' derived type. This was easily fixed. I
could not apply the patch because my tree update went pear-shaped. I'll fix it
all in a weeks time, when I'm back home.
Paul
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36366
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug fortran/36366] [4.3/4.4 Regression] ICE in gfc_conv_component_ref
2008-05-29 11:08 [Bug fortran/36366] New: [4.3/4.4 Regression] ICE in gfc_conv_component_ref jakub at gcc dot gnu dot org
` (3 preceding siblings ...)
2008-06-07 9:06 ` pault at gcc dot gnu dot org
@ 2008-06-17 18:09 ` pault at gcc dot gnu dot org
2008-07-19 18:35 ` [Bug fortran/36366] [4.3 " burnus at gcc dot gnu dot org
2008-07-19 18:37 ` burnus at gcc dot gnu dot org
6 siblings, 0 replies; 8+ messages in thread
From: pault at gcc dot gnu dot org @ 2008-06-17 18:09 UTC (permalink / raw)
To: gcc-bugs
------- Comment #4 from pault at gcc dot gnu dot org 2008-06-17 18:09 -------
Subject: Bug 36366
Author: pault
Date: Tue Jun 17 18:08:24 2008
New Revision: 136871
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=136871
Log:
2008-06-17 Paul Thomas <pault@gcc.gnu.org>
PR fortran/34396
* resolve.c (add_dt_to_dt_list): New function.
(resolve_fl_derived): Call new function for pointer components
and when derived type resolved.
2008-06-17 Paul Thomas <pault@gcc.gnu.org>
PR fortran/36366
* gfortran.dg/used_types_20.f90: New test.
Added:
trunk/gcc/testsuite/gfortran.dg/used_types_20.f90
Modified:
trunk/gcc/fortran/ChangeLog
trunk/gcc/fortran/resolve.c
trunk/gcc/testsuite/ChangeLog
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36366
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug fortran/36366] [4.3 Regression] ICE in gfc_conv_component_ref
2008-05-29 11:08 [Bug fortran/36366] New: [4.3/4.4 Regression] ICE in gfc_conv_component_ref jakub at gcc dot gnu dot org
` (4 preceding siblings ...)
2008-06-17 18:09 ` pault at gcc dot gnu dot org
@ 2008-07-19 18:35 ` burnus at gcc dot gnu dot org
2008-07-19 18:37 ` burnus at gcc dot gnu dot org
6 siblings, 0 replies; 8+ messages in thread
From: burnus at gcc dot gnu dot org @ 2008-07-19 18:35 UTC (permalink / raw)
To: gcc-bugs
------- Comment #5 from burnus at gcc dot gnu dot org 2008-07-19 18:35 -------
Subject: Bug 36366
Author: burnus
Date: Sat Jul 19 18:34:21 2008
New Revision: 137987
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=137987
Log:
2008-07-19 Paul Thomas <pault@gcc.gnu.org>
PR fortran/36366
* resolve.c (add_dt_to_dt_list): New function.
(resolve_fl_derived): Call new function for pointer components
and when derived type resolved.
2008-07-19 Paul Thomas <pault@gcc.gnu.org>
PR fortran/36366
* gfortran.dg/used_types_20.f90: New test.
Added:
branches/gcc-4_3-branch/gcc/testsuite/gfortran.dg/used_types_20.f90
Modified:
branches/gcc-4_3-branch/gcc/fortran/ChangeLog
branches/gcc-4_3-branch/gcc/fortran/resolve.c
branches/gcc-4_3-branch/gcc/testsuite/ChangeLog
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36366
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug fortran/36366] [4.3 Regression] ICE in gfc_conv_component_ref
2008-05-29 11:08 [Bug fortran/36366] New: [4.3/4.4 Regression] ICE in gfc_conv_component_ref jakub at gcc dot gnu dot org
` (5 preceding siblings ...)
2008-07-19 18:35 ` [Bug fortran/36366] [4.3 " burnus at gcc dot gnu dot org
@ 2008-07-19 18:37 ` burnus at gcc dot gnu dot org
6 siblings, 0 replies; 8+ messages in thread
From: burnus at gcc dot gnu dot org @ 2008-07-19 18:37 UTC (permalink / raw)
To: gcc-bugs
------- Comment #6 from burnus at gcc dot gnu dot org 2008-07-19 18:36 -------
FIXED on the branch (4.3) and on the trunk (4.4).
--
burnus at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution| |FIXED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36366
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2008-07-19 18:37 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-05-29 11:08 [Bug fortran/36366] New: [4.3/4.4 Regression] ICE in gfc_conv_component_ref jakub at gcc dot gnu dot org
2008-05-29 12:06 ` [Bug fortran/36366] " burnus at gcc dot gnu dot org
2008-06-04 21:16 ` pault at gcc dot gnu dot org
2008-06-05 19:46 ` pault at gcc dot gnu dot org
2008-06-07 9:06 ` pault at gcc dot gnu dot org
2008-06-17 18:09 ` pault at gcc dot gnu dot org
2008-07-19 18:35 ` [Bug fortran/36366] [4.3 " burnus at gcc dot gnu dot org
2008-07-19 18:37 ` burnus 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).