From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8379 invoked by alias); 22 Mar 2014 08:12: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 8351 invoked by uid 48); 22 Mar 2014 08:12:18 -0000 From: "trippels at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/60607] -march=native command line option handling breaks LTO option machinery Date: Sat, 22 Mar 2014 08:12: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: lto X-Bugzilla-Severity: normal X-Bugzilla-Who: trippels at gcc dot gnu.org 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: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2014-03/txt/msg02023.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D60607 --- Comment #2 from Markus Trippelsdorf --- Variation of the problem without -march=3Dnative: markus@x4 tmp % cat foo.ii markus@x4 tmp % cat bar.ii typedef int __m128i __attribute__ ((__vector_size__ (16))); __m128i a, b, c; void dequant_scaling () { c =3D __builtin_ia32_pmulld128 (a, b); } markus@x4 tmp % cat main.ii void dequant_scaling(); int main ()=20 { dequant_scaling(); } markus@x4 tmp % g++ -flto -fPIC -march=3Damdfam10 -O2 -c foo.ii markus@x4 tmp % g++ -flto -fPIC -march=3Damdfam10 -O2 -msse4.1 -c bar.ii markus@x4 tmp % g++ -flto -march=3Dnative -O2 -shared foo.o bar.o markus@x4 tmp % ar cr test.a foo.o bar.o markus@x4 tmp % g++ -march=3Damdfam10 -O2 main.ii test.a bar.ii: In function =E2=80=98dequant_scaling=E2=80=99: bar.ii:3:61: error: =E2=80=98__builtin_ia32_pmulld128=E2=80=99 needs isa op= tion -m32 -msse4.1 void dequant_scaling () { c =3D __builtin_ia32_pmulld128 (a, b); } ^ lto-wrapper: /usr/x86_64-pc-linux-gnu/gcc-bin/4.9.0/g++ returned 1 exit sta= tus /usr/lib/gcc/x86_64-pc-linux-gnu/4.9.0/../../../../x86_64-pc-linux-gnu/bin/= ld: fatal error: lto-wrapper failed collect2: error: ld returned 1 exit status >>From gcc-bugs-return-447155-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Sat Mar 22 10:57:55 2014 Return-Path: Delivered-To: listarch-gcc-bugs@gcc.gnu.org Received: (qmail 4557 invoked by alias); 22 Mar 2014 10:57:53 -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 4479 invoked by uid 48); 22 Mar 2014 10:57:48 -0000 From: "mikpelinux at gmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug middle-end/60429] [4.7 Regression] Miscompilation (aliasing) with -finline-functions Date: Sat, 22 Mar 2014 10:57:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: middle-end X-Bugzilla-Version: 4.8.2 X-Bugzilla-Keywords: wrong-code X-Bugzilla-Severity: normal X-Bugzilla-Who: mikpelinux at gmail dot com X-Bugzilla-Status: ASSIGNED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: rguenth at gcc dot gnu.org X-Bugzilla-Target-Milestone: 4.7.4 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: cc 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/msg02024.txt.bz2 Content-length: 970 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60429 Mikael Pettersson changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |mikpelinux at gmail dot com --- Comment #29 from Mikael Pettersson --- Richard, your 4.8 backport performs the same call twice in a row on lines 3017 and 3018 in tree-ssa-structalias.c; is that really intentional? + /* We have to include all fields that overlap the current + field shifted by rhsoffset. And we include at least + the last or the first field of the variable to represent + reachability of off-bound addresses, in particular &object + 1, + conservatively correct. */ + temp = first_or_preceding_vi_for_offset (curr, offset); + temp = first_or_preceding_vi_for_offset (curr, offset);