Message ID | 20190924224906.GA53331@troutmask.apl.washington.edu |
---|---|
State | New |
Headers | show |
Series | PR fortran/91802 -- rank+corank must be less than 16 | expand |
Committed as r276254.
On 9/28/19 10:11 AM, Steve Kargl wrote: > Committed as r276254. > I am getting this: gfc -c -fcoarray=single pr91802.f90 f951: internal compiler error: free_expr0(): Bad expr type 0x809fc9 gfc_report_diagnostic ../../trunk/gcc/fortran/error.c:776 0x80b62a gfc_internal_error(char const*, ...) ... I will do a rebuild and rerun in case I missed something. This is on x86_64-pc-linux-gnu. Jerry
On Sat, Sep 28, 2019 at 01:13:42PM -0700, Jerry DeLisle wrote: > On 9/28/19 10:11 AM, Steve Kargl wrote: > > Committed as r276254. > > > > I am getting this: > > gfc -c -fcoarray=single pr91802.f90 > f951: internal compiler error: free_expr0(): Bad expr type > 0x809fc9 gfc_report_diagnostic > ../../trunk/gcc/fortran/error.c:776 > 0x80b62a gfc_internal_error(char const*, ...) > ... > > I will do a rebuild and rerun in case I missed something. > Bummer. May be due to difference with --enable-checking.
On Sat, Sep 28, 2019 at 03:06:13PM -0700, Steve Kargl wrote: > On Sat, Sep 28, 2019 at 01:13:42PM -0700, Jerry DeLisle wrote: > > On 9/28/19 10:11 AM, Steve Kargl wrote: > > > Committed as r276254. > > > > > > > I am getting this: > > > > gfc -c -fcoarray=single pr91802.f90 > > f951: internal compiler error: free_expr0(): Bad expr type > > 0x809fc9 gfc_report_diagnostic > > ../../trunk/gcc/fortran/error.c:776 > > 0x80b62a gfc_internal_error(char const*, ...) > > ... > > > > I will do a rebuild and rerun in case I missed something. > > > > Bummer. May be due to difference with --enable-checking. > Just bootstrapped trunk in an empty directory. No issue. If it persists for you, you can chnage the 'goto cleanup' in the original patch to 'return m'. gfortran is exiting, so leaking memory isn't a concern.
Index: gcc/fortran/decl.c =================================================================== --- gcc/fortran/decl.c (revision 275969) +++ gcc/fortran/decl.c (working copy) @@ -8468,6 +8468,15 @@ attr_decl1 (void) goto cleanup; } + /* Check F2018:C822. */ + if (sym->attr.dimension && sym->attr.codimension + && sym->as && sym->as->rank + sym->as->corank > 15) + { + gfc_error ("rank + corank of %qs exceeds 15 at %C", sym->name); + m = MATCH_ERROR; + goto cleanup; + } + if (sym->attr.cray_pointee && sym->as != NULL) { /* Fix the array spec. */ Index: gcc/testsuite/gfortran.dg/pr91802.f90 =================================================================== --- gcc/testsuite/gfortran.dg/pr91802.f90 (nonexistent) +++ gcc/testsuite/gfortran.dg/pr91802.f90 (working copy) @@ -0,0 +1,9 @@ +! { dg-do compile } +! { dg-options "-fcoarray=single" } +! Code contributed by Gerhard Steinmetz +! PR fortran/91802 +module m + real :: x + dimension :: x(1,2,1,2,1,2,1,2) + codimension :: x[1,2,1,2,1,2,1,*] ! { dg-error "exceeds 15" } +end