public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug lto/60607] New: Missing lto command line option handling causes build failures
@ 2014-03-21  8:43 trippels at gcc dot gnu.org
  2014-03-21 10:12 ` [Bug target/60607] -march=native command line option handling breaks LTO option machinery rguenth at gcc dot gnu.org
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: trippels at gcc dot gnu.org @ 2014-03-21  8:43 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60607

            Bug ID: 60607
           Summary: Missing lto command line option handling causes build
                    failures
           Product: gcc
           Version: 4.9.0
            Status: UNCONFIRMED
          Severity: enhancement
          Priority: P3
         Component: lto
          Assignee: unassigned at gcc dot gnu.org
          Reporter: trippels at gcc dot gnu.org

Consider (-march=native is amdfam10):

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 = __builtin_ia32_pmulld128 (a, b); }
markus@x4 tmp % g++ -flto -fPIC -march=native -O2 -c foo.ii
markus@x4 tmp % g++ -flto -fPIC -march=native -O2 -msse4.1 -c bar.ii
markus@x4 tmp % g++ -flto -march=native -O2 -shared foo.o bar.o
bar.ii: In function ‘dequant_scaling’:
bar.ii:3:61: error: ‘__builtin_ia32_pmulld128’ needs isa option -m32 -msse4.1
 void dequant_scaling () { c = __builtin_ia32_pmulld128 (a, b); }
                                                             ^
lto-wrapper: /usr/x86_64-pc-linux-gnu/gcc-bin/4.9.0/g++ returned 1 exit status

Adding -msse4.1 to the final link step would fix the issue.
This causes e.g. media-libs/x265 build failures see: PR60568 comment13.
>From gcc-bugs-return-447061-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Fri Mar 21 08:44:05 2014
Return-Path: <gcc-bugs-return-447061-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 7906 invoked by alias); 21 Mar 2014 08:44:05 -0000
Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm
Precedence: bulk
List-Id: <gcc-bugs.gcc.gnu.org>
List-Archive: <http://gcc.gnu.org/ml/gcc-bugs/>
List-Post: <mailto:gcc-bugs@gcc.gnu.org>
List-Help: <mailto:gcc-bugs-help@gcc.gnu.org>
Sender: gcc-bugs-owner@gcc.gnu.org
Delivered-To: mailing list gcc-bugs@gcc.gnu.org
Received: (qmail 7864 invoked by uid 48); 21 Mar 2014 08:44:01 -0000
From: "ramana at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug tree-optimization/45932] execute/pr37573.c fails after Neon misaligned patch.
Date: Fri, 21 Mar 2014 08:44: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: 4.6.0
X-Bugzilla-Keywords:
X-Bugzilla-Severity: normal
X-Bugzilla-Who: ramana at gcc dot gnu.org
X-Bugzilla-Status: RESOLVED
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_status resolution
Message-ID: <bug-45932-4-uLlRjmQncz@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-45932-4@http.gcc.gnu.org/bugzilla/>
References: <bug-45932-4@http.gcc.gnu.org/bugzilla/>
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/msg01930.txt.bz2
Content-length: 487

http://gcc.gnu.org/bugzilla/show_bug.cgi?idE932

Ramana Radhakrishnan <ramana at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |WONTFIX

--- Comment #4 from Ramana Radhakrishnan <ramana at gcc dot gnu.org> ---
updating based on c#3 and a recent set of testresults.


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug target/60607] -march=native command line option handling breaks LTO option machinery
  2014-03-21  8:43 [Bug lto/60607] New: Missing lto command line option handling causes build failures trippels at gcc dot gnu.org
@ 2014-03-21 10:12 ` rguenth at gcc dot gnu.org
  2014-03-22  8:12 ` trippels at gcc dot gnu.org
                   ` (5 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: rguenth at gcc dot gnu.org @ 2014-03-21 10:12 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60607

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Target|                            |x86_64-*-*, i?86-*-*
             Status|UNCONFIRMED                 |NEW
           Keywords|                            |lto
   Last reconfirmed|                            |2014-03-21
          Component|lto                         |target
     Ever confirmed|0                           |1
            Summary|Missing lto command line    |-march=native command line
                   |option handling causes      |option handling breaks LTO
                   |build failures              |option machinery
           Severity|enhancement                 |normal

--- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> ---
The issue is that -march=native "explodes" to explicit set options, including
negative ones such as -mno-sse4.1.  That's bad, as we now have conflicting
options for bar.o and foo.o which we merge like

          /* Do what the old LTO code did - collect exactly one option
             setting per OPT code, we pick the first we encounter.
             ???  This doesn't make too much sense, but when it doesn't
             then we should complain.  */

I think this option exploding done by -march=native is simply broken.

At least exploding to full positive _and_ negative lists is.  Either we
have a separate option for each target feature - then we don't need the
-mno-xxx stuff, or we don't - then we need to fix that.

Note that the plan for the future is to no longer "merge" any target options
for link-time but use target attributes more aggressively.  The current code
merely tries to make the link-step succeed somehow, not follow what the
user intended with setting specific target options on specific TUs.


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug target/60607] -march=native command line option handling breaks LTO option machinery
  2014-03-21  8:43 [Bug lto/60607] New: Missing lto command line option handling causes build failures trippels at gcc dot gnu.org
  2014-03-21 10:12 ` [Bug target/60607] -march=native command line option handling breaks LTO option machinery rguenth at gcc dot gnu.org
@ 2014-03-22  8:12 ` trippels at gcc dot gnu.org
  2014-04-23  5:55 ` trippels at gcc dot gnu.org
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: trippels at gcc dot gnu.org @ 2014-03-22  8:12 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60607

--- Comment #2 from Markus Trippelsdorf <trippels at gcc dot gnu.org> ---
Variation of the problem without -march=native:

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 = __builtin_ia32_pmulld128 (a, b); }
markus@x4 tmp % cat main.ii
void dequant_scaling();
int main () 
{
  dequant_scaling();
}
markus@x4 tmp % g++ -flto -fPIC -march=amdfam10 -O2 -c foo.ii
markus@x4 tmp % g++ -flto -fPIC -march=amdfam10 -O2 -msse4.1 -c bar.ii
markus@x4 tmp % g++ -flto -march=native -O2 -shared foo.o bar.o
markus@x4 tmp % ar cr test.a foo.o bar.o
markus@x4 tmp % g++ -march=amdfam10 -O2 main.ii test.a
bar.ii: In function ‘dequant_scaling’:
bar.ii:3:61: error: ‘__builtin_ia32_pmulld128’ needs isa option -m32 -msse4.1
 void dequant_scaling () { c = __builtin_ia32_pmulld128 (a, b); }
                                                             ^
lto-wrapper: /usr/x86_64-pc-linux-gnu/gcc-bin/4.9.0/g++ returned 1 exit status
/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: <gcc-bugs-return-447155-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
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: <gcc-bugs.gcc.gnu.org>
List-Archive: <http://gcc.gnu.org/ml/gcc-bugs/>
List-Post: <mailto:gcc-bugs@gcc.gnu.org>
List-Help: <mailto:gcc-bugs-help@gcc.gnu.org>
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" <gcc-bugzilla@gcc.gnu.org>
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: <bug-60429-4-SK2GJ4IeSl@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-60429-4@http.gcc.gnu.org/bugzilla/>
References: <bug-60429-4@http.gcc.gnu.org/bugzilla/>
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`429

Mikael Pettersson <mikpelinux at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |mikpelinux at gmail dot com

--- Comment #29 from Mikael Pettersson <mikpelinux at gmail dot com> ---
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);


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug target/60607] -march=native command line option handling breaks LTO option machinery
  2014-03-21  8:43 [Bug lto/60607] New: Missing lto command line option handling causes build failures trippels at gcc dot gnu.org
  2014-03-21 10:12 ` [Bug target/60607] -march=native command line option handling breaks LTO option machinery rguenth at gcc dot gnu.org
  2014-03-22  8:12 ` trippels at gcc dot gnu.org
@ 2014-04-23  5:55 ` trippels at gcc dot gnu.org
  2014-04-30 10:18 ` trippels at gcc dot gnu.org
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: trippels at gcc dot gnu.org @ 2014-04-23  5:55 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60607

Markus Trippelsdorf <trippels at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Version|4.9.0                       |4.9.1
   Target Milestone|---                         |4.9.1


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug target/60607] -march=native command line option handling breaks LTO option machinery
  2014-03-21  8:43 [Bug lto/60607] New: Missing lto command line option handling causes build failures trippels at gcc dot gnu.org
                   ` (2 preceding siblings ...)
  2014-04-23  5:55 ` trippels at gcc dot gnu.org
@ 2014-04-30 10:18 ` trippels at gcc dot gnu.org
  2014-07-16 13:26 ` jakub at gcc dot gnu.org
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: trippels at gcc dot gnu.org @ 2014-04-30 10:18 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60607

Markus Trippelsdorf <trippels at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |steffen at hauihau dot de

--- Comment #3 from Markus Trippelsdorf <trippels at gcc dot gnu.org> ---
*** Bug 60964 has been marked as a duplicate of this bug. ***


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug target/60607] -march=native command line option handling breaks LTO option machinery
  2014-03-21  8:43 [Bug lto/60607] New: Missing lto command line option handling causes build failures trippels at gcc dot gnu.org
                   ` (3 preceding siblings ...)
  2014-04-30 10:18 ` trippels at gcc dot gnu.org
@ 2014-07-16 13:26 ` jakub at gcc dot gnu.org
  2014-10-30 10:37 ` jakub at gcc dot gnu.org
  2015-02-07 10:42 ` trippels at gcc dot gnu.org
  6 siblings, 0 replies; 8+ messages in thread
From: jakub at gcc dot gnu.org @ 2014-07-16 13:26 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=60607

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|4.9.1                       |4.9.2

--- Comment #4 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
GCC 4.9.1 has been released.


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug target/60607] -march=native command line option handling breaks LTO option machinery
  2014-03-21  8:43 [Bug lto/60607] New: Missing lto command line option handling causes build failures trippels at gcc dot gnu.org
                   ` (4 preceding siblings ...)
  2014-07-16 13:26 ` jakub at gcc dot gnu.org
@ 2014-10-30 10:37 ` jakub at gcc dot gnu.org
  2015-02-07 10:42 ` trippels at gcc dot gnu.org
  6 siblings, 0 replies; 8+ messages in thread
From: jakub at gcc dot gnu.org @ 2014-10-30 10:37 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=60607

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|4.9.2                       |4.9.3

--- Comment #5 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
GCC 4.9.2 has been released.


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug target/60607] -march=native command line option handling breaks LTO option machinery
  2014-03-21  8:43 [Bug lto/60607] New: Missing lto command line option handling causes build failures trippels at gcc dot gnu.org
                   ` (5 preceding siblings ...)
  2014-10-30 10:37 ` jakub at gcc dot gnu.org
@ 2015-02-07 10:42 ` trippels at gcc dot gnu.org
  6 siblings, 0 replies; 8+ messages in thread
From: trippels at gcc dot gnu.org @ 2015-02-07 10:42 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=60607

Markus Trippelsdorf <trippels at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |FIXED
   Target Milestone|4.9.3                       |5.0

--- Comment #6 from Markus Trippelsdorf <trippels at gcc dot gnu.org> ---
Both issues are fixed on trunk. Closing.


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2015-02-07 10:42 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-03-21  8:43 [Bug lto/60607] New: Missing lto command line option handling causes build failures trippels at gcc dot gnu.org
2014-03-21 10:12 ` [Bug target/60607] -march=native command line option handling breaks LTO option machinery rguenth at gcc dot gnu.org
2014-03-22  8:12 ` trippels at gcc dot gnu.org
2014-04-23  5:55 ` trippels at gcc dot gnu.org
2014-04-30 10:18 ` trippels at gcc dot gnu.org
2014-07-16 13:26 ` jakub at gcc dot gnu.org
2014-10-30 10:37 ` jakub at gcc dot gnu.org
2015-02-07 10:42 ` trippels at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).