public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "Simon.Richter at hogyros dot de" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug fortran/52347] -Wno-tabs -Wall -Wno-tabs still warns about tabs
Date: Fri, 14 Jun 2013 23:15:00 -0000	[thread overview]
Message-ID: <bug-52347-4-VSJE1mcKWK@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-52347-4@http.gcc.gnu.org/bugzilla/>

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

--- Comment #4 from Simon Richter <Simon.Richter at hogyros dot de> ---
Testcase is simple:

$ cat tt.cpp

void bar(int baz) { }

$ g++-4.7 -c -W -Wall -Werror -Wno-unused tt.cpp 

$ g++-4.8 -c -W -Wall -Werror -Wno-unused tt.cpp 
tt.cpp:1:6: error: unused parameter ‘baz’ [-Werror=unused-parameter]
 void bar(int baz) { }
      ^
cc1plus: all warnings being treated as errors
>From gcc-bugs-return-424389-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Fri Jun 14 23:19:34 2013
Return-Path: <gcc-bugs-return-424389-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 25889 invoked by alias); 14 Jun 2013 23:19:34 -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 25861 invoked by uid 48); 14 Jun 2013 23:19:29 -0000
From: "ccoutant at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug rtl-optimization/57451] Incorrect debug ranges emitted for -freorder-blocks-and-partition -g
Date: Fri, 14 Jun 2013 23:19:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: changed
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: rtl-optimization
X-Bugzilla-Version: 4.8.0
X-Bugzilla-Keywords:
X-Bugzilla-Severity: normal
X-Bugzilla-Who: ccoutant 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:
Message-ID: <bug-57451-4-TmCZDYWLkd@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-57451-4@http.gcc.gnu.org/bugzilla/>
References: <bug-57451-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: 2013-06/txt/msg00768.txt.bz2
Content-length: 4046

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

--- Comment #4 from Cary Coutant <ccoutant at gcc dot gnu.org> ---
The problem is a lexical block in main() that appears to be getting split by
-freorder-blocks-and-partition, but when debug info is emitted during
rest_of_handle_final(), this particular lexical block still appears to be a
single block -- BLOCK_FRAGMENT_CHAIN is NULL, so the DWARF output code decides
that it can emit a DW_AT_low_pc/high_pc pair instead of a DW_AT_ranges. The
DW_AT_high_pc is now being output relative to DW_AT_low_pc, so we see an
assembly expression .LBE14 - .LBB14, which are labels attached to the block
start and block end, and should be in the same section.

Here's the block:

(gdb) p stmt
$1 = (tree) 0x7ffff5f4c4b0
(gdb) pt
warning: Expression is not an assignment (and might have no effect)
 <block 0x7ffff5f4c4b0 asm_written used
    vars <var_decl 0x7ffff608bc78 e
        type <reference_type 0x7ffff609b930 type <record_type 0x7ffff608e9d8
MyException>
            sizes-gimplified unsigned DI
            size <integer_cst 0x7ffff5f24dc0 constant 64>
            unit size <integer_cst 0x7ffff5f24de0 constant 8>
            align 64 symtab 0 alias set -1 canonical type 0x7ffff609b930>
        readonly tree_1 tree_3 unsigned decl_5 DI file pr49115.C line 21 col 25
size <integer_cst 0x7ffff5f24dc0 64> unit size <integer_cst 0x7ffff5f24de0 8>
        align 64 context <function_decl 0x7ffff6096f00 main>>
    supercontext <block 0x7ffff60c00f0 asm_written used
        vars <var_decl 0x7ffff608bb48 data type <record_type 0x7ffff608ec78
Data>
            used tree_1 tree_3 decl_5 SI file pr49115.C line 18 col 8
            size <integer_cst 0x7ffff5f42140 constant 32>
            unit size <integer_cst 0x7ffff5f42160 constant 4>
            align 128 context <function_decl 0x7ffff6096f00 main>
            (reg/v:SI 64 [ data ])>
        supercontext <block 0x7ffff5f4c550 asm_written used supercontext
<function_decl 0x7ffff6096f00 main>
            subblocks <block 0x7ffff5f4c500 asm_written used vars <var_decl
0x7ffff608bb48 data> supercontext <block 0x7ffff5f4c550> subblocks <block
0x7ffff5f4c4b0> chain <block 0x7ffff60c00f0>>>>>

(gdb) p stmt->block
$2 = {base = {code = BLOCK, side_effects_flag = 0, constant_flag = 0,
addressable_flag = 0,
    volatile_flag = 0, readonly_flag = 0, asm_written_flag = 1, nowarning_flag
= 0, visited = 0,
    used_flag = 1, nothrow_flag = 0, static_flag = 0, public_flag = 0,
private_flag = 0,
    protected_flag = 0, deprecated_flag = 0, default_def_flag = 0, u = {bits {lang_flag_0 = 0,
        lang_flag_1 = 0, lang_flag_2 = 0, lang_flag_3 = 0, lang_flag_4 = 0,
lang_flag_5 = 0,
        lang_flag_6 = 0, saturating_flag = 0, unsigned_flag = 0, packed_flag 0, user_align = 0,
        nameless_flag = 1, spare0 = 0, spare1 = 0, address_space = 0}, length 2048,
      version = 2048}}, chain = 0x0, abstract_flag = 0, block_num = 14, locus 0,
  vars = 0x7ffff608bc78, nonlocalized_vars = 0x0, subblocks = 0x0, supercontext
= 0x7ffff60c00f0,
  abstract_origin = 0x0, fragment_origin = 0x0, fragment_chain = 0x0}

Here's the fragment of assembly code between .LBB14 and .LBE14:

.LBB14:
        # pr49115.C:21
        .loc 1 21 0
        call    __cxa_begin_catch
.LVL7:
        call    __cxa_end_catch
.LVL8:
        .p2align 4,,5
# SUCC: 3 [100.0%]  count:1
        jmp     .L15
        .cfi_endproc
        .section        .text.unlikely
        .cfi_startproc
        .cfi_personality 0x3,__gxx_personality_v0
        .cfi_lsda 0x3,.LLSDAC4
# BLOCK 6 freq:5000 seq:4
# PRED: 4 [50.0%]  (CROSSING,CAN_FALLTHRU)
.L14:
        .cfi_def_cfa_offset 16
        .p2align 4,,8
.LEHB1:
# SUCC:
        call    _Unwind_Resume
.LEHE1:
.LVL9:
.LBE14:
.LBE15:
        .cfi_endproc

You can see that the block from .LBB14 to .LBE14 has been split across two
sections. In order for dwarf2out to generate the proper debug info,
BLOCK_FRAGMENT_CHAIN(stmt) needs to be non-NULL. I'm not sure why that's not
happening when the block is split.


  parent reply	other threads:[~2013-06-14 23:15 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-02-23  8:37 [Bug fortran/52347] New: " burnus at gcc dot gnu.org
2012-02-23  8:42 ` [Bug fortran/52347] " manu at gcc dot gnu.org
2013-06-14 19:43 ` Simon.Richter at hogyros dot de
2013-06-14 21:27 ` manu at gcc dot gnu.org
2013-06-14 23:15 ` Simon.Richter at hogyros dot de [this message]
2013-06-15  9:36 ` manu at gcc dot gnu.org
2014-12-11 17:41 ` burnus at gcc dot gnu.org

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-52347-4-VSJE1mcKWK@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).