From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17372 invoked by alias); 6 Jan 2008 10:35:27 -0000 Received: (qmail 17227 invoked by uid 48); 6 Jan 2008 10:34:43 -0000 Date: Sun, 06 Jan 2008 11:14:00 -0000 Message-ID: <20080106103443.17226.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug fortran/34683] Fortran FE generated IL pessimizes middle-end IL and analysis In-Reply-To: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "rguenth 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: 2008-01/txt/msg00485.txt.bz2 ------- Comment #9 from rguenth at gcc dot gnu dot org 2008-01-06 10:34 ------- Basically, not re-using array descriptor variables is as bad as not re-using I/O descriptor variables. I also wonder what this _gfortran_internal_{un,}pack is about? For taux=gn(p2+p4) gfortran generates real(kind=4) A.1[4]; struct array1_real(kind=4) atmp.0; atmp.0.dtype = 281; atmp.0.dim[0].stride = 1; atmp.0.dim[0].lbound = 0; atmp.0.dim[0].ubound = 3; atmp.0.data = (void *) &A.1; atmp.0.offset = 0; { integer(kind=4) S.2; S.2 = 0; while (1) { if (S.2 > 3) goto L.1; (*(real(kind=4)[0:] *) atmp.0.data)[S.2] = (*p2)[S.2] + (*p4)[S.2]; S.2 = S.2 + 1; } L.1:; } D.531 = _gfortran_internal_pack (&atmp.0); D.533 = gn (D.531); if ((real(kind=4)[0:] *) D.531 != (real(kind=4)[0:] *) atmp.0.data) { _gfortran_internal_unpack (&atmp.0, D.531); { void * D.532; D.532 = D.531; if (D.532 != 0B) { __builtin_free (D.532); } } } why does it not know the result of if ((real(kind=4)[0:] *) D.531 != (real(kind=4)[0:] *) atmp.0.data) at the point it creates the IL? I suppose this is about arrays with stride != 1? -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34683