* [patch, fortran] PR32945 - ICE in initialization expression
@ 2007-08-01 11:03 Daniel Franke
2007-08-01 11:47 ` Tobias Burnus
0 siblings, 1 reply; 2+ messages in thread
From: Daniel Franke @ 2007-08-01 11:03 UTC (permalink / raw)
To: fortran; +Cc: gcc-patches
[-- Attachment #1: Type: text/plain, Size: 543 bytes --]
Attached patch fixes the ICE initially reported by Florian Ladtstaedter:
http://gcc.gnu.org/ml/fortran/2007-07/msg00587.html
:ADDPATCH fortran:
gcc/fortran:
2007-08-01 Daniel Franke <franke.daniel@gmail.com>
PR fortran/32945
* expr.c (check_specification_function): Skip check if no symtree
is available.
gcc/testsuite:
2007-08-01 Daniel Franke <franke.daniel@gmail.com>
PR fortran/32945
* gfortran.dg/initialization_12.f90: New test.
Bootstrapped and regression tested on i686-pc-linux-gnu. Ok for trunk?
Regards
Daniel
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: pr32945.patch --]
[-- Type: text/x-diff; charset="us-ascii"; name="pr32945.patch", Size: 1429 bytes --]
Index: fortran/expr.c
===================================================================
--- fortran/expr.c (revision 127062)
+++ fortran/expr.c (working copy)
@@ -693,6 +693,10 @@ static match
check_specification_function (gfc_expr *e)
{
gfc_symbol *sym;
+
+ if (!e->symtree)
+ return MATCH_NO;
+
sym = e->symtree->n.sym;
/* F95, 7.1.6.2; F2003, 7.1.7 */
Index: testsuite/gfortran.dg/initialization_12.f90
===================================================================
--- testsuite/gfortran.dg/initialization_12.f90 (revision 0)
+++ testsuite/gfortran.dg/initialization_12.f90 (revision 0)
@@ -0,0 +1,29 @@
+! { dg-do compile }
+! PR fortran/32945 - ICE in init expressions
+!
+! Contributed by Florian Ladstaedter <flad AT gmx DOT at>
+!
+
+MODULE EGOPS_Utilities
+CONTAINS
+ FUNCTION dirname(fullfilename)
+ Character(LEN=*), Intent(In) :: fullfilename
+ Character(LEN=LEN(fullfilename)) :: dirname
+ dirname = ''
+ END FUNCTION
+END MODULE EGOPS_Utilities
+
+MODULE AtmoIono
+ CHARACTER(LEN=10), PARAMETER :: ComputeDryAtmModel = 'Dry Atm. '
+
+ type AtmModel
+ character (len=len(ComputeDryAtmModel)) :: moistDryStr
+ end type AtmModel
+END MODULE AtmoIono
+
+module AtmoIonoSphere
+ use EGOPS_Utilities
+ use AtmoIono
+end module AtmoIonoSphere
+
+! { dg-final { cleanup-modules "EGOPS_Utilities AtmoIono AtmoIonoSphere" } }
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [patch, fortran] PR32945 - ICE in initialization expression
2007-08-01 11:03 [patch, fortran] PR32945 - ICE in initialization expression Daniel Franke
@ 2007-08-01 11:47 ` Tobias Burnus
0 siblings, 0 replies; 2+ messages in thread
From: Tobias Burnus @ 2007-08-01 11:47 UTC (permalink / raw)
To: Daniel Franke; +Cc: fortran, gcc-patches
:REVIEWMAIL:
Daniel Franke wrote:
> Bootstrapped and regression tested on i686-pc-linux-gnu. Ok for trunk?
>
OK -- the fix is obvious.
Thanks,
Tobias
PS: Does anyone have the time to look at the patch for Florian's other
problem (allocate & STAT=function result),
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32936 ?
The patch is here:
http://gcc.gnu.org/ml/gcc-patches/2007-07/msg02125.html
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2007-08-01 11:47 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-08-01 11:03 [patch, fortran] PR32945 - ICE in initialization expression Daniel Franke
2007-08-01 11:47 ` Tobias Burnus
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).