From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21697 invoked by alias); 4 Jan 2009 19:10:47 -0000 Received: (qmail 21649 invoked by uid 48); 4 Jan 2009 19:10:33 -0000 Date: Sun, 04 Jan 2009 19:10:00 -0000 Message-ID: <20090104191033.21648.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug fortran/37203] Check ORDER= of RESHAPE In-Reply-To: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "dfranke at gcc dot gnu dot org" Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2009-01/txt/msg00388.txt.bz2 ------- 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