------- Comment #6 from dfranke at gcc dot gnu dot org 2009-01-04 19:10 ------- (In reply to comment #5) > (In reply to comment #4) > > which detects invalid permutations in the case of constant(!) arguments. > > Closing as fixed. > > > No, it's not. Reopening. > The initial testcase is still not catch.
Note the emphasis on _constant_. To get the error, change the testcase to: integer, dimension(6), PARAMETER :: source1 = (/ 1, 2, 3, 4, 5, 6 /) integer, dimension(2), PARAMETER :: shape1 = (/ 2, 5/) integer, dimension(2), PARAMETER :: pad1 = (/ 0, 0/) write (unit=*,fmt=*) reshape(source1, shape1, pad1, (/2,1/)) ! Valid write (unit=*,fmt=*) reshape(source1, shape1, pad1, (/2,2/)) ! Invalid end And while trying to argue why this never will be caught as is, I realize that you are right. That SOURCE, SHAPE and PAD are variables doesn't matter as in this case ORDER is constant and can be checked. Stupidity needs to be punished. Assigning myself to fix it. -- dfranke at gcc dot gnu dot org changed: What |Removed |Added ---------------------------------------------------------------------------- AssignedTo|unassigned at gcc dot gnu |dfranke at gcc dot gnu dot |dot org |org Status|REOPENED |ASSIGNED Last reconfirmed|2008-08-23 14:11:59 |2009-01-04 19:10:33 date| | http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37203