From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20816 invoked by alias); 25 Mar 2014 11:57:38 -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 20272 invoked by uid 48); 25 Mar 2014 11:57:33 -0000 From: "trippels at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/60648] [4.8 Regression] ICE (segmentation fault) in expand_binop Date: Tue, 25 Mar 2014 11:57:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: target X-Bugzilla-Version: 4.9.0 X-Bugzilla-Keywords: ice-on-valid-code X-Bugzilla-Severity: normal X-Bugzilla-Who: trippels at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Priority: P1 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: 4.9.0 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: priority bug_status cf_reconfirmed_on cc target_milestone everconfirmed 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: 2014-03/txt/msg02256.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D60648 Markus Trippelsdorf changed: What |Removed |Added ---------------------------------------------------------------------------- Priority|P3 |P1 Status|UNCONFIRMED |NEW Last reconfirmed| |2014-03-25 CC| |trippels at gcc dot gnu.org Target Milestone|--- |4.9.0 Ever confirmed|0 |1 --- Comment #1 from Markus Trippelsdorf --- markus@x4 tmp % cat test.ii enum component { Ex, Ez, Hy, Permeability }; enum derived_component {}; enum direction { X, Y, Z, R, P, NO_DIRECTION }; derived_component a; component *b; component c; direction d; inline direction fn1 (component p1) { switch (p1) { case 0: return Y; case 1: return Z; case Permeability: return NO_DIRECTION; } return X; } inline component fn2 (direction p1) { switch (p1) { case 0: case 1: return component (); case Z: case R: return component (1); case P: return component (3); } } void fn3 () { direction e; switch (0) case 0: switch (a) { case 0: c =3D Ex; b[1] =3D Hy; } e =3D fn1 (b[1]); b[1] =3D fn2 (e); d =3D fn1 (c); } markus@x4 tmp % g++ -m32 -O2 -fPIC -c test.ii test.ii: In function =E2=80=98void fn3()=E2=80=99: test.ii:39:3: internal compiler error: Segmentation fault switch (p1) ^ Please submit a full bug report, >>From gcc-bugs-return-447388-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Tue Mar 25 12:00:36 2014 Return-Path: Delivered-To: listarch-gcc-bugs@gcc.gnu.org Received: (qmail 23391 invoked by alias); 25 Mar 2014 12:00:35 -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 23344 invoked by uid 48); 25 Mar 2014 12:00:29 -0000 From: "bernd.edlinger at hotmail dot de" To: gcc-bugs@gcc.gnu.org Subject: [Bug fortran/60191] test case gfortran.dg/dynamic_dispatch_1/3.f03 fail on ARMv7 Date: Tue, 25 Mar 2014 12:00:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed 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: bernd.edlinger at hotmail dot de X-Bugzilla-Status: NEW 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: Message-ID: In-Reply-To: References: 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: 2014-03/txt/msg02257.txt.bz2 Content-length: 1073 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60191 --- Comment #9 from Bernd Edlinger --- Hmm, I debugged a bit and found this: the problem starts in gfc_get_function_type it is first called on sym->name = "make_real", and then recursively again on the same sym. So this is a recursive_type. The first call returns a build_function_type_vec (with full parameter list) But the recursive call returns a build_varargs_function_type_vec (with a shorter parameter list) The problem is that these declarations are not identical: So in the case of arm with --float-abi=hard this has a somewhat surprising effect: Varargs functions return a float result in r0 Normal functions returns a float result in s0. If there were float arguments they would not be passed on FPU-Registers for varargs functions, but because fortran passes every in-parameter by reference that is not visible. However that may well be different for other targets, for instance, pass the declared parameters in registers, and pass everything after "..." on stack.