public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
* [Bug fortran/53329] New: ICE with deferred-length module variables @ 2012-05-12 10:45 burnus at gcc dot gnu.org 2012-05-14 16:46 ` [Bug fortran/53329] " burnus at gcc dot gnu.org 2012-05-14 16:51 ` burnus at gcc dot gnu.org 0 siblings, 2 replies; 3+ messages in thread From: burnus at gcc dot gnu.org @ 2012-05-12 10:45 UTC (permalink / raw) To: gcc-bugs http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53329 Bug #: 53329 Summary: ICE with deferred-length module variables Classification: Unclassified Product: gcc Version: 4.8.0 Status: UNCONFIRMED Keywords: ice-on-valid-code Severity: normal Priority: P3 Component: fortran AssignedTo: unassigned@gcc.gnu.org ReportedBy: burnus@gcc.gnu.org Blocks: 45170 The following code gives an ICE: module m character(len=:), allocatable :: str end module m Untested fix: --- a/gcc/fortran/trans-decl.c +++ b/gcc/fortran/trans-decl.c @@ -1103,2 +1103,10 @@ gfc_create_string_length (gfc_symbol * sym) sym->ts.u.cl->backend_decl = length; + + if (sym->attr.save + || (ns->parent && ns->parent->proc_name->attr.flavor == FL_MODULE)) + TREE_STATIC (length) = 1; + + if (ns->parent && ns->parent->proc_name->attr.flavor == FL_MODULE + && (sym->attr.access != ACCESS_PRIVATE || sym->attr.public_used)) + TREE_PUBLIC (length) = 1; } ^ permalink raw reply [flat|nested] 3+ messages in thread
* [Bug fortran/53329] ICE with deferred-length module variables 2012-05-12 10:45 [Bug fortran/53329] New: ICE with deferred-length module variables burnus at gcc dot gnu.org @ 2012-05-14 16:46 ` burnus at gcc dot gnu.org 2012-05-14 16:51 ` burnus at gcc dot gnu.org 1 sibling, 0 replies; 3+ messages in thread From: burnus at gcc dot gnu.org @ 2012-05-14 16:46 UTC (permalink / raw) To: gcc-bugs http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53329 --- Comment #1 from Tobias Burnus <burnus at gcc dot gnu.org> 2012-05-14 16:45:32 UTC --- Author: burnus Date: Mon May 14 16:45:16 2012 New Revision: 187472 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=187472 Log: 2012-05-14 Tobias Burnus <burnus@net-b.de> PR fortran/49110 PR fortran/51055 PR fortran/53329 * trans-expr.c (gfc_trans_assignment_1): Fix allocation handling for assignment of function results to allocatable deferred-length strings. * trans-decl.c (gfc_create_string_length): For deferred-length module variables, include module name in the assembler name. (gfc_get_symbol_decl): Don't override the assembler name. 2012-05-14 Tobias Burnus <burnus@net-b.de> PR fortran/49110 PR fortran/51055 PR fortran/53329 * gfortran.dg/deferred_type_param_4.f90: New. * gfortran.dg/deferred_type_param_6.f90: New. Added: trunk/gcc/testsuite/gfortran.dg/deferred_type_param_4.f90 trunk/gcc/testsuite/gfortran.dg/deferred_type_param_6.f90 Modified: trunk/gcc/fortran/ChangeLog trunk/gcc/fortran/trans-decl.c trunk/gcc/fortran/trans-expr.c trunk/gcc/testsuite/ChangeLog ^ permalink raw reply [flat|nested] 3+ messages in thread
* [Bug fortran/53329] ICE with deferred-length module variables 2012-05-12 10:45 [Bug fortran/53329] New: ICE with deferred-length module variables burnus at gcc dot gnu.org 2012-05-14 16:46 ` [Bug fortran/53329] " burnus at gcc dot gnu.org @ 2012-05-14 16:51 ` burnus at gcc dot gnu.org 1 sibling, 0 replies; 3+ messages in thread From: burnus at gcc dot gnu.org @ 2012-05-14 16:51 UTC (permalink / raw) To: gcc-bugs http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53329 Tobias Burnus <burnus at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |RESOLVED CC| |burnus at gcc dot gnu.org Resolution| |FIXED --- Comment #2 from Tobias Burnus <burnus at gcc dot gnu.org> 2012-05-14 16:46:14 UTC --- FIXED on the trunk (4.8). ^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2012-05-14 16:51 UTC | newest] Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2012-05-12 10:45 [Bug fortran/53329] New: ICE with deferred-length module variables burnus at gcc dot gnu.org 2012-05-14 16:46 ` [Bug fortran/53329] " burnus at gcc dot gnu.org 2012-05-14 16:51 ` burnus at gcc dot gnu.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).