[Bug fortran/69395] ICE on declaring array with more than 7 dimensions+codimensions

2018-03-16 Thread kargl at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69395

--- Comment #7 from kargl at gcc dot gnu.org ---
Author: kargl
Date: Fri Mar 16 19:20:15 2018
New Revision: 258607

URL: https://gcc.gnu.org/viewcvs?rev=258607=gcc=rev
Log:
2018-03-16  Steven G. Kargl  

PR fortran/69395
* decl.c (merge_array_spec): Correct the error condition.

2018-03-16  Steven G. Kargl  

PR fortran/69395
* gfortran.dg/pr69395.f90: Add test for max dimensions

Modified:
trunk/gcc/fortran/ChangeLog
trunk/gcc/fortran/decl.c
trunk/gcc/testsuite/ChangeLog
trunk/gcc/testsuite/gfortran.dg/pr69395.f90

[Bug fortran/69395] ICE on declaring array with more than 7 dimensions+codimensions

2018-03-15 Thread kargl at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69395

kargl at gcc dot gnu.org changed:

   What|Removed |Added

   Target Milestone|--- |8.0

[Bug fortran/69395] ICE on declaring array with more than 7 dimensions+codimensions

2018-03-15 Thread kargl at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69395

kargl at gcc dot gnu.org changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |FIXED

--- Comment #6 from kargl at gcc dot gnu.org ---
Closed on trunk.  Thanks for bug report.

[Bug fortran/69395] ICE on declaring array with more than 7 dimensions+codimensions

2018-03-15 Thread kargl at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69395

kargl at gcc dot gnu.org changed:

   What|Removed |Added

   Priority|P3  |P4
   Assignee|unassigned at gcc dot gnu.org  |kargl at gcc dot gnu.org

[Bug fortran/69395] ICE on declaring array with more than 7 dimensions+codimensions

2018-03-15 Thread kargl at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69395

--- Comment #5 from kargl at gcc dot gnu.org ---
Author: kargl
Date: Fri Mar 16 02:43:02 2018
New Revision: 258580

URL: https://gcc.gnu.org/viewcvs?rev=258580=gcc=rev
Log:
2018-03-15  Steven G. Kargl  

PR fortran/69395
* decl.c (merge_array_spec): Limit the merging to maximum allowed
dimensions, and issue error message if limit is exceeded.

2018-03-15  Steven G. Kargl  

PR fortran/69395
* gfortran.dg/pr69395.f90: New test.

Added:
trunk/gcc/testsuite/gfortran.dg/pr69395.f90
Modified:
trunk/gcc/fortran/ChangeLog
trunk/gcc/fortran/decl.c
trunk/gcc/testsuite/ChangeLog

[Bug fortran/69395] ICE on declaring array with more than 7 dimensions+codimensions

2018-03-14 Thread kargl at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69395

kargl at gcc dot gnu.org changed:

   What|Removed |Added

 CC||kargl at gcc dot gnu.org

--- Comment #4 from kargl at gcc dot gnu.org ---
The problem is in decl.c (merge_array_spec).  There is
no check for rank+corank >= 15.  So, gfortran tries merging
2 array specs that exceed the static memory.

[Bug fortran/69395] ICE on declaring array with more than 7 dimensions+codimensions

2018-03-14 Thread gs...@t-online.de
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69395

G. Steinmetz  changed:

   What|Removed |Added

 CC||gs...@t-online.de

--- Comment #3 from G. Steinmetz  ---
The limit (sum of dimensions and codimensions) was recently
lifted from N=7 to N=15, but unfortunately the (N+1)-problem
remains. Adding 8 dims to testcases above, updated backtrace :


$ cat zz1.f90
program p
   real, dimension(1,2,1,2,1,2,1,2), codimension[1,2,1,2,1,2,1,*] :: z
end


$ gfortran-8-20180311 -c zz1.f90 -fcoarray=single
f951: internal compiler error: free_expr0(): Bad expr type
0x6a68ff gfc_internal_error(char const*, ...)
../../gcc/fortran/error.c:1358
0x6a76fb free_expr0
../../gcc/fortran/expr.c:499
0x6a775d gfc_free_expr(gfc_expr*)
../../gcc/fortran/expr.c:520
0x678ff9 gfc_free_array_spec(gfc_array_spec*)
../../gcc/fortran/array.c:329
0x699f1e gfc_match_data_decl()
../../gcc/fortran/decl.c:5834
0x6f5bb9 match_word_omp_simd
../../gcc/fortran/parse.c:93
0x6f92ae match_word
../../gcc/fortran/parse.c:376
0x6f92ae decode_statement
../../gcc/fortran/parse.c:376
0x6fb1d4 next_free
../../gcc/fortran/parse.c:1230
0x6fb1d4 next_statement
../../gcc/fortran/parse.c:1462
0x6fcfec parse_spec
../../gcc/fortran/parse.c:3670
0x6fefb3 parse_progunit
../../gcc/fortran/parse.c:5667
0x700594 gfc_parse_file()
../../gcc/fortran/parse.c:6207
0x74735f gfc_be_parse_file
../../gcc/fortran/f95-lang.c:204

[Bug fortran/69395] ICE on declaring array with more than 7 dimensions+codimensions

2016-01-20 Thread gerhard.steinmetz.fort...@t-online.de
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69395

--- Comment #1 from Gerhard Steinmetz  
---
Whereas, detected with this declaration variant :

$ cat z2.f90
program p
   real :: z4d(2,2,2,2)[2,2,2,*]
end


$ gfortran -fcoarray=single z2.f90
z2.f90:2:30:

real :: z4d(2,2,2,2)[2,2,2,*]
  1

Error: Array specification at (1) has more than 7 dimensions

[Bug fortran/69395] ICE on declaring array with more than 7 dimensions+codimensions

2016-01-20 Thread dominiq at lps dot ens.fr
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69395

Dominique d'Humieres  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2016-01-20
 Ever confirmed|0   |1

--- Comment #2 from Dominique d'Humieres  ---
Confirmed from 4.8 up to trunk (6.0).