public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug driver/47137] New: [4.6 Regression] gcc incorrectly combines assembly inputs
@ 2010-12-31 20:20 hjl.tools at gmail dot com
  2010-12-31 20:24 ` [Bug driver/47137] " hjl.tools at gmail dot com
                   ` (14 more replies)
  0 siblings, 15 replies; 16+ messages in thread
From: hjl.tools at gmail dot com @ 2010-12-31 20:20 UTC (permalink / raw)
  To: gcc-bugs

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

           Summary: [4.6 Regression] gcc incorrectly combines assembly
                    inputs
           Product: gcc
           Version: 4.6.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: driver
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: hjl.tools@gmail.com


[hjl@gnu-6 gcc]$ cat t1.s
    .globl main
main:
.L1:
    .word 9
[hjl@gnu-6 gcc]$ cat t2.s
.L1:
    .word 9
[hjl@gnu-6 gcc]$ ./xgcc -B./  t1.s t2.s
[hjl@gnu-6 gcc]$ ./xgcc -B./  t1.s t2.s -o foo
t2.s: Assembler messages:
t2.s:1: Error: symbol `.L1' is already defined
[hjl@gnu-6 gcc]$


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

* [Bug driver/47137] [4.6 Regression] gcc incorrectly combines assembly inputs
  2010-12-31 20:20 [Bug driver/47137] New: [4.6 Regression] gcc incorrectly combines assembly inputs hjl.tools at gmail dot com
@ 2010-12-31 20:24 ` hjl.tools at gmail dot com
  2010-12-31 20:26 ` hjl.tools at gmail dot com
                   ` (13 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: hjl.tools at gmail dot com @ 2010-12-31 20:24 UTC (permalink / raw)
  To: gcc-bugs

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

H.J. Lu <hjl.tools at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2010.12.31 20:24:14
                 CC|                            |rguenth at gcc dot gnu.org
   Target Milestone|---                         |4.6.0
     Ever Confirmed|0                           |1

--- Comment #1 from H.J. Lu <hjl.tools at gmail dot com> 2010-12-31 20:24:14 UTC ---
It is caused by revision 164357:

http://gcc.gnu.org/ml/gcc-cvs/2010-09/msg00651.html


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

* [Bug driver/47137] [4.6 Regression] gcc incorrectly combines assembly inputs
  2010-12-31 20:20 [Bug driver/47137] New: [4.6 Regression] gcc incorrectly combines assembly inputs hjl.tools at gmail dot com
  2010-12-31 20:24 ` [Bug driver/47137] " hjl.tools at gmail dot com
@ 2010-12-31 20:26 ` hjl.tools at gmail dot com
  2011-01-02 17:54 ` hjl at gcc dot gnu.org
                   ` (12 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: hjl.tools at gmail dot com @ 2010-12-31 20:26 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #2 from H.J. Lu <hjl.tools at gmail dot com> 2010-12-31 20:26:43 UTC ---
The proposed patch is at

http://gcc.gnu.org/ml/gcc/2010-12/msg00517.html


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

* [Bug driver/47137] [4.6 Regression] gcc incorrectly combines assembly inputs
  2010-12-31 20:20 [Bug driver/47137] New: [4.6 Regression] gcc incorrectly combines assembly inputs hjl.tools at gmail dot com
  2010-12-31 20:24 ` [Bug driver/47137] " hjl.tools at gmail dot com
  2010-12-31 20:26 ` hjl.tools at gmail dot com
@ 2011-01-02 17:54 ` hjl at gcc dot gnu.org
  2011-01-02 17:55 ` hjl.tools at gmail dot com
                   ` (11 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: hjl at gcc dot gnu.org @ 2011-01-02 17:54 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #3 from hjl at gcc dot gnu.org <hjl at gcc dot gnu.org> 2011-01-02 17:54:24 UTC ---
Author: hjl
Date: Sun Jan  2 17:54:22 2011
New Revision: 168407

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=168407
Log:
Don't check have_o when settting combine_inputs.

2011-01-02  H.J. Lu  <hongjiu.lu@intel.com>

    PR driver/47137
    * gcc.c (main): Don't check have_o when settting combine_inputs.

Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/gcc.c


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

* [Bug driver/47137] [4.6 Regression] gcc incorrectly combines assembly inputs
  2010-12-31 20:20 [Bug driver/47137] New: [4.6 Regression] gcc incorrectly combines assembly inputs hjl.tools at gmail dot com
                   ` (2 preceding siblings ...)
  2011-01-02 17:54 ` hjl at gcc dot gnu.org
@ 2011-01-02 17:55 ` hjl.tools at gmail dot com
  2011-01-02 22:07 ` hjl.tools at gmail dot com
                   ` (10 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: hjl.tools at gmail dot com @ 2011-01-02 17:55 UTC (permalink / raw)
  To: gcc-bugs

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

H.J. Lu <hjl.tools at gmail dot com> changed:

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

--- Comment #4 from H.J. Lu <hjl.tools at gmail dot com> 2011-01-02 17:55:04 UTC ---
Fixed.


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

* [Bug driver/47137] [4.6 Regression] gcc incorrectly combines assembly inputs
  2010-12-31 20:20 [Bug driver/47137] New: [4.6 Regression] gcc incorrectly combines assembly inputs hjl.tools at gmail dot com
                   ` (3 preceding siblings ...)
  2011-01-02 17:55 ` hjl.tools at gmail dot com
@ 2011-01-02 22:07 ` hjl.tools at gmail dot com
  2011-01-02 22:43 ` rguenth at gcc dot gnu.org
                   ` (9 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: hjl.tools at gmail dot com @ 2011-01-02 22:07 UTC (permalink / raw)
  To: gcc-bugs

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

H.J. Lu <hjl.tools at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |REOPENED
         Resolution|FIXED                       |

--- Comment #5 from H.J. Lu <hjl.tools at gmail dot com> 2011-01-02 22:07:25 UTC ---
It breaks LTO:

[hjl@gnu-6 gcc]$ cat /tmp/lto.args 
-xlto
-c
-B
/export/build/gnu/gcc/build-x86_64-linux/gcc/
-w
-O2
-flto-partition=none
-fno-builtin-abs
-v
-save-temps
-mtune=generic
-march=x86-64
-dumpdir
/export/build/gnu/gcc/build-x86_64-linux/gcc/testsuite/gcc/
-dumpbase
abs-1.x6
-o
/tmp/lto.o
abs-1.o
abs-1-lib.o
main.o
[hjl@gnu-6 gcc]$ ../../xgcc @/tmp/lto.args
Reading specs from /export/build/gnu/gcc/build-x86_64-linux/gcc/specs
COLLECT_GCC=../../xgcc
COLLECT_LTO_WRAPPER=/export/build/gnu/gcc/build-x86_64-linux/gcc/lto-wrapper
Target: x86_64-unknown-linux-gnu
Configured with: /export/gnu/import/git/gcc/configure --enable-languages=c
--disable-bootstrap --prefix=/usr/gcc-4.6.0 --with-local-prefix=/usr/local
--with-fpmath=sse
Thread model: posix
gcc version 4.6.0 20110102 (experimental) (GCC) 
xgcc: fatal error: cannot specify -o with -c, -S or -E with multiple files
compilation terminated.
[hjl@gnu-6 gcc]$


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

* [Bug driver/47137] [4.6 Regression] gcc incorrectly combines assembly inputs
  2010-12-31 20:20 [Bug driver/47137] New: [4.6 Regression] gcc incorrectly combines assembly inputs hjl.tools at gmail dot com
                   ` (4 preceding siblings ...)
  2011-01-02 22:07 ` hjl.tools at gmail dot com
@ 2011-01-02 22:43 ` rguenth at gcc dot gnu.org
  2011-01-03 12:31 ` jakub at gcc dot gnu.org
                   ` (8 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: rguenth at gcc dot gnu.org @ 2011-01-02 22:43 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #6 from Richard Guenther <rguenth at gcc dot gnu.org> 2011-01-02 22:43:38 UTC ---
Yes, flag_wpa is not set (as I said) for non-WHOPR mode.  We don't have a
flag to identify non-WHOPR link-time.


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

* [Bug driver/47137] [4.6 Regression] gcc incorrectly combines assembly inputs
  2010-12-31 20:20 [Bug driver/47137] New: [4.6 Regression] gcc incorrectly combines assembly inputs hjl.tools at gmail dot com
                   ` (5 preceding siblings ...)
  2011-01-02 22:43 ` rguenth at gcc dot gnu.org
@ 2011-01-03 12:31 ` jakub at gcc dot gnu.org
  2011-01-03 13:24 ` hjl.tools at gmail dot com
                   ` (7 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: jakub at gcc dot gnu.org @ 2011-01-03 12:31 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jakub at gcc dot gnu.org

--- Comment #7 from Jakub Jelinek <jakub at gcc dot gnu.org> 2011-01-03 12:31:43 UTC ---
It broke bootstrap in libgo as well:
gccgo: fatal error: cannot specify -o with -c, -S or -E with multiple files


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

* [Bug driver/47137] [4.6 Regression] gcc incorrectly combines assembly inputs
  2010-12-31 20:20 [Bug driver/47137] New: [4.6 Regression] gcc incorrectly combines assembly inputs hjl.tools at gmail dot com
                   ` (6 preceding siblings ...)
  2011-01-03 12:31 ` jakub at gcc dot gnu.org
@ 2011-01-03 13:24 ` hjl.tools at gmail dot com
  2011-01-03 13:54 ` joseph at codesourcery dot com
                   ` (6 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: hjl.tools at gmail dot com @ 2011-01-03 13:24 UTC (permalink / raw)
  To: gcc-bugs

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

H.J. Lu <hjl.tools at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                URL|                            |http://gcc.gnu.org/ml/gcc/2
                   |                            |011-01/msg00028.html

--- Comment #8 from H.J. Lu <hjl.tools at gmail dot com> 2011-01-03 13:24:08 UTC ---
A patch is posted at

http://gcc.gnu.org/ml/gcc/2011-01/msg00028.html


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

* [Bug driver/47137] [4.6 Regression] gcc incorrectly combines assembly inputs
  2010-12-31 20:20 [Bug driver/47137] New: [4.6 Regression] gcc incorrectly combines assembly inputs hjl.tools at gmail dot com
                   ` (7 preceding siblings ...)
  2011-01-03 13:24 ` hjl.tools at gmail dot com
@ 2011-01-03 13:54 ` joseph at codesourcery dot com
  2011-01-03 15:03 ` hjl at gcc dot gnu.org
                   ` (5 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: joseph at codesourcery dot com @ 2011-01-03 13:54 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #9 from joseph at codesourcery dot com <joseph at codesourcery dot com> 2011-01-03 13:54:28 UTC ---
Does reverting the r168407 commit and instead applying Jie's first patch 
from http://gcc.gnu.org/ml/gcc/2010-12/msg00517.html fix all the present 
problems?  If so, then please do that.  It seems a lot safer at the 
present stage than more complicated fixes involving the Go driver.


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

* [Bug driver/47137] [4.6 Regression] gcc incorrectly combines assembly inputs
  2010-12-31 20:20 [Bug driver/47137] New: [4.6 Regression] gcc incorrectly combines assembly inputs hjl.tools at gmail dot com
                   ` (8 preceding siblings ...)
  2011-01-03 13:54 ` joseph at codesourcery dot com
@ 2011-01-03 15:03 ` hjl at gcc dot gnu.org
  2011-01-03 21:42 ` rguenth at gcc dot gnu.org
                   ` (4 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: hjl at gcc dot gnu.org @ 2011-01-03 15:03 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #10 from hjl at gcc dot gnu.org <hjl at gcc dot gnu.org> 2011-01-03 15:03:08 UTC ---
Author: hjl
Date: Mon Jan  3 15:03:05 2011
New Revision: 168429

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=168429
Log:
Revert revision 168407.

2011-01-03  H.J. Lu  <hongjiu.lu@intel.com>

    PR driver/47137
    * gcc.c (main): Revert revision 168407.

Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/gcc.c


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

* [Bug driver/47137] [4.6 Regression] gcc incorrectly combines assembly inputs
  2010-12-31 20:20 [Bug driver/47137] New: [4.6 Regression] gcc incorrectly combines assembly inputs hjl.tools at gmail dot com
                   ` (9 preceding siblings ...)
  2011-01-03 15:03 ` hjl at gcc dot gnu.org
@ 2011-01-03 21:42 ` rguenth at gcc dot gnu.org
  2011-01-03 23:31 ` ian at airs dot com
                   ` (3 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: rguenth at gcc dot gnu.org @ 2011-01-03 21:42 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Priority|P3                          |P1


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

* [Bug driver/47137] [4.6 Regression] gcc incorrectly combines assembly inputs
  2010-12-31 20:20 [Bug driver/47137] New: [4.6 Regression] gcc incorrectly combines assembly inputs hjl.tools at gmail dot com
                   ` (10 preceding siblings ...)
  2011-01-03 21:42 ` rguenth at gcc dot gnu.org
@ 2011-01-03 23:31 ` ian at airs dot com
  2011-01-03 23:33 ` ian at airs dot com
                   ` (2 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: ian at airs dot com @ 2011-01-03 23:31 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #12 from Ian Lance Taylor <ian at airs dot com> 2011-01-03 23:31:29 UTC ---
Sorry, it was Joseph, not Jakub, who mentioned the patch.


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

* [Bug driver/47137] [4.6 Regression] gcc incorrectly combines assembly inputs
  2010-12-31 20:20 [Bug driver/47137] New: [4.6 Regression] gcc incorrectly combines assembly inputs hjl.tools at gmail dot com
                   ` (11 preceding siblings ...)
  2011-01-03 23:31 ` ian at airs dot com
@ 2011-01-03 23:33 ` ian at airs dot com
  2011-01-04 10:22 ` jiez at gcc dot gnu.org
  2011-01-04 10:30 ` jakub at gcc dot gnu.org
  14 siblings, 0 replies; 16+ messages in thread
From: ian at airs dot com @ 2011-01-03 23:33 UTC (permalink / raw)
  To: gcc-bugs

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

Ian Lance Taylor <ian at airs dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |ian at airs dot com

--- Comment #11 from Ian Lance Taylor <ian at airs dot com> 2011-01-03 23:30:51 UTC ---
I think the patch that Jakub mentions in comment #9, the one that just sets the
combinable field to 0 for the assembler, is the right fix here.

The driver should be smarter about when to combine inputs, but regardless of
that the test case here shows that we still don't want to combine inputs for
the assembler.  And the existence of both LTO and the Go frontend show that we
do want to combine inputs in some cases, so Jie's second patch, removing the
combinable field entirely, seems overly aggressive.


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

* [Bug driver/47137] [4.6 Regression] gcc incorrectly combines assembly inputs
  2010-12-31 20:20 [Bug driver/47137] New: [4.6 Regression] gcc incorrectly combines assembly inputs hjl.tools at gmail dot com
                   ` (12 preceding siblings ...)
  2011-01-03 23:33 ` ian at airs dot com
@ 2011-01-04 10:22 ` jiez at gcc dot gnu.org
  2011-01-04 10:30 ` jakub at gcc dot gnu.org
  14 siblings, 0 replies; 16+ messages in thread
From: jiez at gcc dot gnu.org @ 2011-01-04 10:22 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #13 from Jie Zhang <jiez at gcc dot gnu.org> 2011-01-04 10:21:29 UTC ---
Author: jiez
Date: Tue Jan  4 10:21:27 2011
New Revision: 168459

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=168459
Log:
    PR driver/47137
    * gcc.c (default_compilers[]): Set combinable field to 0
    for all assembly languages.

Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/gcc.c


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

* [Bug driver/47137] [4.6 Regression] gcc incorrectly combines assembly inputs
  2010-12-31 20:20 [Bug driver/47137] New: [4.6 Regression] gcc incorrectly combines assembly inputs hjl.tools at gmail dot com
                   ` (13 preceding siblings ...)
  2011-01-04 10:22 ` jiez at gcc dot gnu.org
@ 2011-01-04 10:30 ` jakub at gcc dot gnu.org
  14 siblings, 0 replies; 16+ messages in thread
From: jakub at gcc dot gnu.org @ 2011-01-04 10:30 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|REOPENED                    |RESOLVED
         Resolution|                            |FIXED

--- Comment #14 from Jakub Jelinek <jakub at gcc dot gnu.org> 2011-01-04 10:30:08 UTC ---
Fixed.


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

end of thread, other threads:[~2011-01-04 10:30 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-12-31 20:20 [Bug driver/47137] New: [4.6 Regression] gcc incorrectly combines assembly inputs hjl.tools at gmail dot com
2010-12-31 20:24 ` [Bug driver/47137] " hjl.tools at gmail dot com
2010-12-31 20:26 ` hjl.tools at gmail dot com
2011-01-02 17:54 ` hjl at gcc dot gnu.org
2011-01-02 17:55 ` hjl.tools at gmail dot com
2011-01-02 22:07 ` hjl.tools at gmail dot com
2011-01-02 22:43 ` rguenth at gcc dot gnu.org
2011-01-03 12:31 ` jakub at gcc dot gnu.org
2011-01-03 13:24 ` hjl.tools at gmail dot com
2011-01-03 13:54 ` joseph at codesourcery dot com
2011-01-03 15:03 ` hjl at gcc dot gnu.org
2011-01-03 21:42 ` rguenth at gcc dot gnu.org
2011-01-03 23:31 ` ian at airs dot com
2011-01-03 23:33 ` ian at airs dot com
2011-01-04 10:22 ` jiez at gcc dot gnu.org
2011-01-04 10:30 ` jakub 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).