public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug bootstrap/61210] New: bootstrap failure with clang
@ 2014-05-17  9:26 dcb314 at hotmail dot com
  2014-05-17  9:50 ` [Bug bootstrap/61210] " manu at gcc dot gnu.org
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: dcb314 at hotmail dot com @ 2014-05-17  9:26 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 61210
           Summary: bootstrap failure with clang
           Product: gcc
           Version: 4.9.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: bootstrap
          Assignee: unassigned at gcc dot gnu.org
          Reporter: dcb314 at hotmail dot com

For months, I've been using clang and clang++ to bootstrap trunk gcc.
Works faster than gcc and the warning messages are interesting ;->

In the last couple of weeks, since wide-int code went into gcc trunk,
this has broke. 

clang suggested using flag -fheinous-gnu-extensions, but that didn't help.

Here is 20140514 failing to bootstrap

Comparing stages 2 and 3
warning: gcc/cc1-checksum.o differs
warning: gcc/cc1plus-checksum.o differs
Bootstrap comparison failure!
gcc/simplify-rtx.o differs
gcc/fold-const.o differs
gcc/tree-ssa-ccp.o differs
make[2]: *** [compare] Error 1
make[2]: Leaving directory `/home/dcb/gcc/working'
make[1]: *** [stage3-bubble] Error 2
make[1]: Leaving directory `/home/dcb/gcc/working'
make: *** [bootstrap] Error 2
Thu 15 May 18:28:51 BST 2014

Configure line is

../src/trunk/configure --prefix=/home/dcb/gcc/results --enable-checking=release
--enable-languages=c,c++,fortran --disable-werror CC="clang -g -O2 -Wall
-fheinous-gnu-extensions" CXX="clang++ -g -O2 -Wall -fheinous-gnu-extensions"

and bootstrap line is

make BOOT_CFLAGS='-g -O3' CFLAGS_FOR_TARGET='-g -O3' -j 2 bootstrap


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

* [Bug bootstrap/61210] bootstrap failure with clang
  2014-05-17  9:26 [Bug bootstrap/61210] New: bootstrap failure with clang dcb314 at hotmail dot com
@ 2014-05-17  9:50 ` manu at gcc dot gnu.org
  2014-05-19  9:32 ` manu at gcc dot gnu.org
                   ` (6 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: manu at gcc dot gnu.org @ 2014-05-17  9:50 UTC (permalink / raw)
  To: gcc-bugs

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset="UTF-8", Size: 8562 bytes --]

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

Manuel López-Ibáñez <manu at gcc dot gnu.org> changed:

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

--- Comment #1 from Manuel López-Ibáñez <manu at gcc dot gnu.org> ---
(In reply to David Binderman from comment #0)
> For months, I've been using clang and clang++ to bootstrap trunk gcc.
> Works faster than gcc and the warning messages are interesting ;->

In which sense are they interesting?
>From gcc-bugs-return-451806-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Sat May 17 10:29:53 2014
Return-Path: <gcc-bugs-return-451806-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 30196 invoked by alias); 17 May 2014 10:29:52 -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 30162 invoked by uid 48); 17 May 2014 10:29:48 -0000
From: "zsojka at seznam dot cz" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug ipa/61211] New: [4.9/4.10 Regression] ICE: verify_cgraph_node failed: edge points to wrong declaration with -O3 -fno-inline
Date: Sat, 17 May 2014 10:29:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: new
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: ipa
X-Bugzilla-Version: 4.10.0
X-Bugzilla-Keywords:
X-Bugzilla-Severity: normal
X-Bugzilla-Who: zsojka at seznam dot cz
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 attachments.created
Message-ID: <bug-61211-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-05/txt/msg01498.txt.bz2
Content-length: 5991

https://gcc.gnu.org/bugzilla/show_bug.cgi?ida211

            Bug ID: 61211
           Summary: [4.9/4.10 Regression] ICE: verify_cgraph_node failed:
                    edge points to wrong declaration with -O3 -fno-inline
           Product: gcc
           Version: 4.10.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: ipa
          Assignee: unassigned at gcc dot gnu.org
          Reporter: zsojka at seznam dot cz

Created attachment 32813
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id2813&actioníit
preprocessed source (g++.dg/ipa/pr60640-2.C)

Maybe related to PR61160.

Compiler output:
$ gcc -O3 -fno-inline pr60640-2.ii
/mnt/svn/gcc-trunk/gcc/testsuite/g++.dg/ipa/pr60640-2.C:15:8: error: edge
points to wrong declaration:
 H h (0);
        ^
 <function_decl 0x7f22df2e3700 f.constprop
    type <function_type 0x7f22df2d7348
        type <integer_type 0x7f22df143738 unsigned int public unsigned SI
            size <integer_cst 0x7f22df141a68 constant 32>
            unit size <integer_cst 0x7f22df141a80 constant 4>
            align 32 symtab 0 alias set -1 canonical type 0x7f22df143738
precision 32 min <integer_cst 0x7f22df141a98 0> max <integer_cst 0x7f22df141a50
4294967295>
            pointer_to_this <pointer_type 0x7f22df259150>>
        QI
        size <integer_cst 0x7f22df141918 constant 8>
        unit size <integer_cst 0x7f22df141930 constant 1>
        align 8 symtab 0 alias set -1 canonical type 0x7f22df2d7348
        arg-types <tree_list 0x7f22df140bb8 value <void_type 0x7f22df155000
void>>>
    readonly addressable used nothrow static autoinline decl_5 QI defer-output
file /mnt/svn/gcc-trunk/gcc/testsuite/g++.dg/ipa/pr60640-2.C line 8 col 25
align 16 context <record_type 0x7f22df2b93f0 G> initial <block 0x7f22df2bccd0>
abstract_origin <function_decl 0x7f22df298500 f>
    result <result_decl 0x7f22df2bb618 D.2515 type <integer_type 0x7f22df143738
unsigned int>
        used unsigned ignored SI file
/mnt/svn/gcc-trunk/gcc/testsuite/g++.dg/ipa/pr60640-2.C line 8 col 40 size
<integer_cst 0x7f22df141a68 32> unit size <integer_cst 0x7f22df141a80 4>
        align 32 context <function_decl 0x7f22df2e3700 f.constprop>
abstract_origin <result_decl 0x7f22df2bb000 D.2283>>
    struct-function 0x7f22df2cb540>
 Instead of: <function_decl 0x7f22df2b6100 _ZThn8_NK1G1fEb
    type <method_type 0x7f22df2b9690
        type <integer_type 0x7f22df143738 unsigned int public unsigned SI
            size <integer_cst 0x7f22df141a68 constant 32>
            unit size <integer_cst 0x7f22df141a80 constant 4>
            align 32 symtab 0 alias set -1 canonical type 0x7f22df143738
precision 32 min <integer_cst 0x7f22df141a98 0> max <integer_cst 0x7f22df141a50
4294967295>
            pointer_to_this <pointer_type 0x7f22df259150>>
        QI
        size <integer_cst 0x7f22df141918 constant 8>
        unit size <integer_cst 0x7f22df141930 constant 1>
        align 8 symtab 0 alias set -1 canonical type 0x7f22df2b9690 method
basetype <record_type 0x7f22df2b93f0 G>
        arg-types <tree_list 0x7f22df2999d8 value <pointer_type 0x7f22df2b9738>
            chain <tree_list 0x7f22df299500 value <boolean_type 0x7f22df143bd0
bool>
                chain <tree_list 0x7f22df140bb8 value <void_type 0x7f22df155000
void>>>>
        pointer_to_this <pointer_type 0x7f22df2b99d8>>
    readonly addressable asm_written used nothrow public weak virtual decl_5 QI
file /mnt/svn/gcc-trunk/gcc/testsuite/g++.dg/ipa/pr60640-2.C line 8 col 25
align 8 context <record_type 0x7f22df2b93f0 G>
    arguments <parm_decl 0x7f22df2b0780 this
        type <pointer_type 0x7f22df2b97e0 type <record_type 0x7f22df2b95e8 G>
            readonly unsigned DI
            size <integer_cst 0x7f22df141828 constant 64>
            unit size <integer_cst 0x7f22df141840 constant 8>
            align 64 symtab 0 alias set -1 canonical type 0x7f22df2b97e0>
        readonly unsigned DI file
/mnt/svn/gcc-trunk/gcc/testsuite/g++.dg/ipa/pr60640-2.C line 8 col 34 size
<integer_cst 0x7f22df141828 64> unit size <integer_cst 0x7f22df141840 8>
        align 64 context <function_decl 0x7f22df2b6100 _ZThn8_NK1G1fEb>
arg-type <pointer_type 0x7f22df2b97e0>
        chain <parm_decl 0x7f22df2b0800 D.2288 type <boolean_type
0x7f22df143bd0 bool>
            unsigned QI file
/mnt/svn/gcc-trunk/gcc/testsuite/g++.dg/ipa/pr60640-2.C line 8 col 28 size
<integer_cst 0x7f22df141918 8> unit size <integer_cst 0x7f22df141930 1>
            align 8 context <function_decl 0x7f22df2b6100 _ZThn8_NK1G1fEb>
            arg-type <integer_type 0x7f22df143690 int>>>
    full-name "virtual unsigned int G::_ZThn8_NK1G1fEb(bool) const"
   >
_ZNK1H1fEv/3 (virtual unsigned int H::f() const) @0x7f22df2c0000
  Type: function definition analyzed
  Visibility: externally_visible public weak comdat comdat_group:_ZNK1H1fEv
one_only virtual
  Address is taken.
  References:
  Referring: _ZTV1H/5 (addr)
  Availability: available
  First run: 0
  Function flags: body
  Called by:
  Calls: _ZNK1G1fEb.constprop.1/41 (1.00 per call) (can throw external)
/mnt/svn/gcc-trunk/gcc/testsuite/g++.dg/ipa/pr60640-2.C:15:8: internal compiler
error: verify_cgraph_node failed
0x941bff verify_cgraph_node(cgraph_node*)
        /mnt/svn/gcc-trunk/gcc/cgraph.c:2996
0x942987 verify_cgraph()
        /mnt/svn/gcc-trunk/gcc/cgraph.c:3011
0x94e3d7 cgraph_materialize_all_clones()
        /mnt/svn/gcc-trunk/gcc/cgraphclones.c:1134
0x94ab17 compile()
        /mnt/svn/gcc-trunk/gcc/cgraphunit.c:2208
0x94b844 finalize_compilation_unit()
        /mnt/svn/gcc-trunk/gcc/cgraphunit.c:2329
0x7291ae cp_write_global_declarations()
        /mnt/svn/gcc-trunk/gcc/cp/decl2.c:4625
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <http://gcc.gnu.org/bugs.html> for instructions.

Tested revisions:
r210490 - ICE
4.9 r210307 - ICE
4.8 r210303 - OK
4.7 r210302 - OK
4.6 r197894 - OK


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

* [Bug bootstrap/61210] bootstrap failure with clang
  2014-05-17  9:26 [Bug bootstrap/61210] New: bootstrap failure with clang dcb314 at hotmail dot com
  2014-05-17  9:50 ` [Bug bootstrap/61210] " manu at gcc dot gnu.org
@ 2014-05-19  9:32 ` manu at gcc dot gnu.org
  2014-05-19 10:41 ` rguenth at gcc dot gnu.org
                   ` (5 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: manu at gcc dot gnu.org @ 2014-05-19  9:32 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #3 from Manuel López-Ibáñez <manu at gcc dot gnu.org> ---
(In reply to David Binderman from comment #2)
> (In reply to Manuel López-Ibáñez from comment #1)
> > In which sense are they interesting?
> 
> They show bugs in gcc trunk.
> 
> Same as running cppcheck over gcc trunk shows bugs.
> 
> Both both cases, I've reported the ones that I think are worth fixing.

Thanks! As you may know, GCC doesn't currently have the resources behind Clang,
so every little thing helps.

I think this is being discussed in the mailing list here:
https://gcc.gnu.org/ml/gcc/2014-05/msg00194.html

so hopefully it will get fixed soon. It seems to be reproducible also with
older GCC versions.
>From gcc-bugs-return-451882-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Mon May 19 09:53:40 2014
Return-Path: <gcc-bugs-return-451882-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 21035 invoked by alias); 19 May 2014 09:53:39 -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 20959 invoked by uid 48); 19 May 2014 09:53:35 -0000
From: "cbaylis at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug target/60609] [4.8 Regression] Error: value of 256 too large for field of 1 bytes at 68242
Date: Mon, 19 May 2014 09:53: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.8.2
X-Bugzilla-Keywords:
X-Bugzilla-Severity: normal
X-Bugzilla-Who: cbaylis at gcc dot gnu.org
X-Bugzilla-Status: RESOLVED
X-Bugzilla-Priority: P2
X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org
X-Bugzilla-Target-Milestone: 4.8.3
X-Bugzilla-Flags:
X-Bugzilla-Changed-Fields: bug_status cc cf_known_to_work resolution
Message-ID: <bug-60609-4-6bBCP2a7zP@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-60609-4@http.gcc.gnu.org/bugzilla/>
References: <bug-60609-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-05/txt/msg01574.txt.bz2
Content-length: 559

https://gcc.gnu.org/bugzilla/show_bug.cgi?id`609

cbaylis at gcc dot gnu.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |cbaylis at gcc dot gnu.org
      Known to work|                            |4.8.3
         Resolution|---                         |FIXED

--- Comment #10 from cbaylis at gcc dot gnu.org ---
Now also fixed on 4.7 and 4.8 branches.


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

* [Bug bootstrap/61210] bootstrap failure with clang
  2014-05-17  9:26 [Bug bootstrap/61210] New: bootstrap failure with clang dcb314 at hotmail dot com
  2014-05-17  9:50 ` [Bug bootstrap/61210] " manu at gcc dot gnu.org
  2014-05-19  9:32 ` manu at gcc dot gnu.org
@ 2014-05-19 10:41 ` rguenth at gcc dot gnu.org
  2014-05-19 17:58 ` dcb314 at hotmail dot com
                   ` (4 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: rguenth at gcc dot gnu.org @ 2014-05-19 10:41 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |WAITING
   Last reconfirmed|                            |2014-05-19
     Ever confirmed|0                           |1

--- Comment #4 from Richard Biener <rguenth at gcc dot gnu.org> ---
Can you try to use -O0 with clang as it is otherwise the default for the host
compiler invocations?

Thus, it may very well be a miscompilation by clang.


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

* [Bug bootstrap/61210] bootstrap failure with clang
  2014-05-17  9:26 [Bug bootstrap/61210] New: bootstrap failure with clang dcb314 at hotmail dot com
                   ` (2 preceding siblings ...)
  2014-05-19 10:41 ` rguenth at gcc dot gnu.org
@ 2014-05-19 17:58 ` dcb314 at hotmail dot com
  2014-05-19 19:32 ` ubizjak at gmail dot com
                   ` (3 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: dcb314 at hotmail dot com @ 2014-05-19 17:58 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #5 from David Binderman <dcb314 at hotmail dot com> ---
(In reply to Richard Biener from comment #4)
> Can you try to use -O0 with clang as it is otherwise the default for the host
> compiler invocations?
> 
> Thus, it may very well be a miscompilation by clang.

I think I'm right in saying that boot compiler (clang here)
only does stage1.

Hence a difference between stage2 and stage3 AFAIK can't
be produced by clang.

However, I tried out what you suggested and it made no difference.

Comparing stages 2 and 3
warning: gcc/cc1-checksum.o differs
warning: gcc/cc1plus-checksum.o differs
Bootstrap comparison failure!
gcc/simplify-rtx.o differs
gcc/fold-const.o differs
gcc/tree-ssa-ccp.o differs
make[2]: *** [compare] Error 1

I'll try again in a few days time.


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

* [Bug bootstrap/61210] bootstrap failure with clang
  2014-05-17  9:26 [Bug bootstrap/61210] New: bootstrap failure with clang dcb314 at hotmail dot com
                   ` (3 preceding siblings ...)
  2014-05-19 17:58 ` dcb314 at hotmail dot com
@ 2014-05-19 19:32 ` ubizjak at gmail dot com
  2014-05-19 19:37 ` ubizjak at gmail dot com
                   ` (2 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: ubizjak at gmail dot com @ 2014-05-19 19:32 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #6 from Uroš Bizjak <ubizjak at gmail dot com> ---
(In reply to David Binderman from comment #5)

> I'll try again in a few days time.

Richard S. is preparing a patch at [1], perhaps you can help to test it?

[1] https://gcc.gnu.org/ml/gcc-patches/2014-05/msg01519.html
>From gcc-bugs-return-451965-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Mon May 19 19:34:27 2014
Return-Path: <gcc-bugs-return-451965-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 10961 invoked by alias); 19 May 2014 19:34:26 -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 10927 invoked by uid 48); 19 May 2014 19:34:22 -0000
From: "dje at google dot com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug debug/61237] New: gcc puts line number 11 ahead of line number 10 in function call in debug info
Date: Mon, 19 May 2014 19:34:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: new
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: debug
X-Bugzilla-Version: 4.8.1
X-Bugzilla-Keywords:
X-Bugzilla-Severity: normal
X-Bugzilla-Who: dje at google 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: <bug-61237-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-05/txt/msg01657.txt.bz2
Content-length: 2311

https://gcc.gnu.org/bugzilla/show_bug.cgi?ida237

            Bug ID: 61237
           Summary: gcc puts line number 11 ahead of line number 10 in
                    function call in debug info
           Product: gcc
           Version: 4.8.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: debug
          Assignee: unassigned at gcc dot gnu.org
          Reporter: dje at google dot com

I can imagine gcc's trying to be helpful here, but it's not working in this
case (at least in IMHO).
I want to set a breakpoint on line 10, but when I get there line 11 has already
been executed, and by that time it's too late.
[This example is stripped down from the original.]

1       int
2       foo (int a, int b)
3       {
4         return a + b;
5       }
6
7       int
8       main ()
9       {
10        foo (1,
11             -foo (2, 3));
12        return 0;
13      }


$ gdb a.out
(gdb) disas /m main
Dump of assembler code for function main:
9       {
   0x0000000000400484 <+0>:     push   %rbp
   0x0000000000400485 <+1>:     mov    %rsp,%rbp

10        foo (1,
   0x0000000000400497 <+19>:    neg    %eax
   0x0000000000400499 <+21>:    mov    %eax,%esi
   0x000000000040049b <+23>:    mov    $0x1,%edi
   0x00000000004004a0 <+28>:    callq  0x400470 <foo>

11             -foo (2, 3));
   0x0000000000400488 <+4>:     mov    $0x3,%esi
   0x000000000040048d <+9>:     mov    $0x2,%edi
   0x0000000000400492 <+14>:    callq  0x400470 <foo>

12        return 0;
   0x00000000004004a5 <+33>:    mov    $0x0,%eax

13      }
   0x00000000004004aa <+38>:    pop    %rbp
   0x00000000004004ab <+39>:    retq

End of assembler dump.

gdb's attempt at making mixed disassembly output more readable isn't helpful
either.  The thing to note here is that line 11 appears before line 10 in the
code.  Technically, one can argue that that is correct I suppose.  And if that
is the answer, fine.  I'm just filing this so that the answer is written down
somewhere.  I did spend 10 minutes trying to find an existing bug in the
database (which feels like enough - I have to time out at some point), and I
grepped for O0 in the "not a bug" page
https://gcc.gnu.org/bugs/#nonbugs
and didn't find anything.
OTOH, if you want to agree this is a bug, fine by me. :-)


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

* [Bug bootstrap/61210] bootstrap failure with clang
  2014-05-17  9:26 [Bug bootstrap/61210] New: bootstrap failure with clang dcb314 at hotmail dot com
                   ` (4 preceding siblings ...)
  2014-05-19 19:32 ` ubizjak at gmail dot com
@ 2014-05-19 19:37 ` ubizjak at gmail dot com
  2014-05-20 14:19 ` [Bug bootstrap/61210] [4.10 regression] " rsandifo at gcc dot gnu.org
  2014-05-21  8:50 ` dcb314 at hotmail dot com
  7 siblings, 0 replies; 9+ messages in thread
From: ubizjak at gmail dot com @ 2014-05-19 19:37 UTC (permalink / raw)
  To: gcc-bugs

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

Uroš Bizjak <ubizjak at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|WAITING                     |NEW
                 CC|                            |gerald at pfeifer dot com,
                   |                            |rsandifo at gcc dot gnu.org
            Version|4.9.0                       |4.10.0
   Target Milestone|---                         |4.10.0

--- Comment #7 from Uroš Bizjak <ubizjak at gmail dot com> ---
Confirmed and adding CCs.
>From gcc-bugs-return-451967-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Mon May 19 19:45:01 2014
Return-Path: <gcc-bugs-return-451967-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 20038 invoked by alias); 19 May 2014 19:45:00 -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 19983 invoked by uid 48); 19 May 2014 19:44:54 -0000
From: "redi at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug target/61223] libstdc++ build fail due to pop lr register
Date: Mon, 19 May 2014 19:45: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: unknown
X-Bugzilla-Keywords:
X-Bugzilla-Severity: blocker
X-Bugzilla-Who: redi at gcc dot gnu.org
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: component
Message-ID: <bug-61223-4-C8Jv3FvjDZ@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-61223-4@http.gcc.gnu.org/bugzilla/>
References: <bug-61223-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-05/txt/msg01659.txt.bz2
Content-length: 434

https://gcc.gnu.org/bugzilla/show_bug.cgi?ida223

Jonathan Wakely <redi at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
          Component|libstdc++                   |target

--- Comment #1 from Jonathan Wakely <redi at gcc dot gnu.org> ---
This is a target-specific bug, please set the Target field appropriately.


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

* [Bug bootstrap/61210] [4.10 regression] bootstrap failure with clang
  2014-05-17  9:26 [Bug bootstrap/61210] New: bootstrap failure with clang dcb314 at hotmail dot com
                   ` (5 preceding siblings ...)
  2014-05-19 19:37 ` ubizjak at gmail dot com
@ 2014-05-20 14:19 ` rsandifo at gcc dot gnu.org
  2014-05-21  8:50 ` dcb314 at hotmail dot com
  7 siblings, 0 replies; 9+ messages in thread
From: rsandifo at gcc dot gnu.org @ 2014-05-20 14:19 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #8 from rsandifo at gcc dot gnu.org <rsandifo at gcc dot gnu.org> ---
Author: rsandifo
Date: Tue May 20 14:18:44 2014
New Revision: 210645

URL: http://gcc.gnu.org/viewcvs?rev=210645&root=gcc&view=rev
Log:
gcc/cp/
    PR bootstrap/61210
    * pt.c (tsubst_copy, tsubst_omp_for_iterator, tsubst_expr)
    (tsubst_copy_and_build): Perform recursive substitutions in a
    deterministic order.

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


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

* [Bug bootstrap/61210] [4.10 regression] bootstrap failure with clang
  2014-05-17  9:26 [Bug bootstrap/61210] New: bootstrap failure with clang dcb314 at hotmail dot com
                   ` (6 preceding siblings ...)
  2014-05-20 14:19 ` [Bug bootstrap/61210] [4.10 regression] " rsandifo at gcc dot gnu.org
@ 2014-05-21  8:50 ` dcb314 at hotmail dot com
  7 siblings, 0 replies; 9+ messages in thread
From: dcb314 at hotmail dot com @ 2014-05-21  8:50 UTC (permalink / raw)
  To: gcc-bugs

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

David Binderman <dcb314 at hotmail dot com> changed:

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

--- Comment #9 from David Binderman <dcb314 at hotmail dot com> ---
(In reply to rsandifo@gcc.gnu.org from comment #8)
> Author: rsandifo
> Date: Tue May 20 14:18:44 2014

Seems fixed to me.

Comparing stages 2 and 3
warning: gcc/cc1-checksum.o differs
warning: gcc/cc1plus-checksum.o differs
Comparison successful.


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

end of thread, other threads:[~2014-05-21  8:50 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-05-17  9:26 [Bug bootstrap/61210] New: bootstrap failure with clang dcb314 at hotmail dot com
2014-05-17  9:50 ` [Bug bootstrap/61210] " manu at gcc dot gnu.org
2014-05-19  9:32 ` manu at gcc dot gnu.org
2014-05-19 10:41 ` rguenth at gcc dot gnu.org
2014-05-19 17:58 ` dcb314 at hotmail dot com
2014-05-19 19:32 ` ubizjak at gmail dot com
2014-05-19 19:37 ` ubizjak at gmail dot com
2014-05-20 14:19 ` [Bug bootstrap/61210] [4.10 regression] " rsandifo at gcc dot gnu.org
2014-05-21  8:50 ` dcb314 at hotmail dot com

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).