From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15342 invoked by alias); 29 Jul 2013 22:16:22 -0000 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 Received: (qmail 15214 invoked by uid 48); 29 Jul 2013 22:16:18 -0000 From: "spop at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/14741] graphite with loop blocking and interchanging doesn't optimize a matrix multiplication loop Date: Mon, 29 Jul 2013 22:16:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: tree-optimization X-Bugzilla-Version: tree-ssa X-Bugzilla-Keywords: missed-optimization X-Bugzilla-Severity: enhancement X-Bugzilla-Who: spop at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2013-07/txt/msg01446.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D14741 --- Comment #28 from Sebastian Pop --- (In reply to Evgeniy Dushistov from comment #26) > void mult(const double * const __restrict__ A, const double * const > __restrict__ B, double * const __restrict__ C, const size_t N) > { > for (size_t j =3D 0; j < N; ++j) > for (size_t i =3D 0; i < N; ++i) > for (size_t k =3D 0; k < N; ++k) > C[i * N + j] +=3D A[i * N + k] + B[k * N + j]; This code has the same problem as the Fortran program: it has linearized me= mory access functions. This code won't be transformed by Graphite unless you instantiate N with a compile time constant, or otherwise you'll have to delinearize the array accesses, and we don't have code to do that yet. >>From gcc-bugs-return-426940-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Mon Jul 29 22:34:33 2013 Return-Path: Delivered-To: listarch-gcc-bugs@gcc.gnu.org Received: (qmail 6101 invoked by alias); 29 Jul 2013 22:34:32 -0000 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 Delivered-To: mailing list gcc-bugs@gcc.gnu.org Received: (qmail 6038 invoked by uid 48); 29 Jul 2013 22:34:29 -0000 From: "abensonca at gmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug fortran/58023] New: ICE on invalid with missing NOPASS Date: Mon, 29 Jul 2013 22:34:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: fortran X-Bugzilla-Version: 4.9.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: abensonca at gmail dot com X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2013-07/txt/msg01447.txt.bz2 Content-length: 2931 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58023 Bug ID: 58023 Summary: ICE on invalid with missing NOPASS Product: gcc Version: 4.9.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: fortran Assignee: unassigned at gcc dot gnu.org Reporter: abensonca at gmail dot com The following causes and ICE using gfortran 4.9.0 (r201320): module m implicit none abstract interface double precision function mr() end function mr end interface type :: sfd procedure(mr), pointer :: mr1 procedure(mr), pointer :: mr2 end type sfd contains subroutine go() implicit none type(sfd):: d write (0,*) d%mr2() return end subroutine go end module m $ gfortran -v Using built-in specs. COLLECT_GCC=gfortran COLLECT_LTO_WRAPPER=/home/abenson/Galacticus/Tools/libexec/gcc/x86_64-unknown-linux-gnu/4.9.0/lto-wrapper Target: x86_64-unknown-linux-gnu Configured with: ../gcc-trunk/configure --prefix=/home/abenson/Galacticus/Tools --enable-languages=c,c++,fortran --disable-multilib --with-gmp=/home/abenson/Galacticus/Tools Thread model: posix gcc version 4.9.0 20130729 (experimental) (GCC) $ gfortran -c bug.F90 -o bug.o bug.F90:10.34: procedure(mr), pointer :: mr1 1 Error: Procedure pointer component 'mr1' with PASS at (1) must have at least one argument f951: internal compiler error: in update_ppc_arglist, at fortran/resolve.c:5346 0x58332a update_ppc_arglist ../../gcc-trunk/gcc/fortran/resolve.c:5346 0x57f63c resolve_expr_ppc ../../gcc-trunk/gcc/fortran/resolve.c:6020 0x57f63c gfc_resolve_expr(gfc_expr*) ../../gcc-trunk/gcc/fortran/resolve.c:6119 0x5860bb resolve_code ../../gcc-trunk/gcc/fortran/resolve.c:9692 0x585e0b gfc_resolve_blocks(gfc_code*, gfc_namespace*) ../../gcc-trunk/gcc/fortran/resolve.c:9006 0x586099 resolve_code ../../gcc-trunk/gcc/fortran/resolve.c:9682 0x588c8e resolve_codes ../../gcc-trunk/gcc/fortran/resolve.c:14471 0x588b97 resolve_codes ../../gcc-trunk/gcc/fortran/resolve.c:14457 0x588d72 gfc_resolve ../../gcc-trunk/gcc/fortran/resolve.c:14499 0x5755bf gfc_parse_file() ../../gcc-trunk/gcc/fortran/parse.c:4645 0x5b1545 gfc_be_parse_file ../../gcc-trunk/gcc/fortran/f95-lang.c:189 Please submit a full bug report, with preprocessed source if appropriate. Please include the complete backtrace with any bug report. See for instructions. The code is invalid because both procedure pointers in the "sfd" derived type should have the NOPASS attribute (since the "mr" abstract interface declares no arguments). The ICE only occurs if two (or more) procedure points are declared in this way, AND the procedure pointer is accessed (via the write statement in this example).