From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5156 invoked by alias); 28 Nov 2013 10:00:49 -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 5115 invoked by uid 48); 28 Nov 2013 10:00:46 -0000 From: "amylaar at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug middle-end/59327] New: warning in expand_used_vars Date: Thu, 28 Nov 2013 10:00:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: middle-end X-Bugzilla-Version: 4.9.0 X-Bugzilla-Keywords: build X-Bugzilla-Severity: normal X-Bugzilla-Who: amylaar 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: bug_id short_desc product version bug_status keywords bug_severity priority component assigned_to reporter cc Message-ID: 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: 2013-11/txt/msg02874.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D59327 Bug ID: 59327 Summary: warning in expand_used_vars Product: gcc Version: 4.9.0 Status: UNCONFIRMED Keywords: build Severity: normal Priority: P3 Component: middle-end Assignee: unassigned at gcc dot gnu.org Reporter: amylaar at gcc dot gnu.org CC: jakub at redhat dot com Code added this morning to cfgexpand.c:expand_used_vars causes a warning: g++ -c -g -DIN_GCC -DCROSS_DIRECTORY_STRUCTURE -fno-exceptions -fno-rt= ti -fasynchronous-unwind-tables -W -Wall -Wno-narrowing -Wwrite-strings -Wcast-qual -Wmissing-format-attribute -pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings -Werror -fno-common=20 -DHAVE_CONFIG_H -I. -I. -I../../gcc/gcc -I../../gcc/gcc/. -I../../gcc/gcc/../include -I../../gcc/gcc/../libcpp/include=20 -I../../gcc/gcc/../libdecnumber -I../../gcc/gcc/../libdecnumber/dpd -I../libdecnumber -I../../gcc/gcc/../libbacktrace -o cfgexpand.o -MT cfgexpand.o -MMD -MP -MF ./.deps/cfgexpand.TPo ../../gcc/gcc/cfgexpand.c ../../gcc/gcc/cfgexpand.c: In function =E2=80=98rtx_def* expand_used_vars()= =E2=80=99: ../../gcc/gcc/cfgexpand.c:1836:35: error: comparison between signed and unsigned integer expressions [-Werror=3Dsign-compare] && sz + ASAN_RED_ZONE_SIZE >=3D data.asan_alignb) ^ cc1plus: all warnings being treated as errors make: *** [cfgexpand.o] Error 1 Seen for target arc-elf. [amylaar@rowan gcc]$ g++ --version g++ (GCC) 4.9.0 20131126 (experimental) Copyright (C) 2013 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. [amylaar@rowan gcc]$ uname -a Linux rowan 3.11.7-200.fc19.i686.PAE #1 SMP Mon Nov 4 14:22:33 UTC 2013 i686 i686 i386 GNU/Linux >>From gcc-bugs-return-436096-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Thu Nov 28 10:00:32 2013 Return-Path: Delivered-To: listarch-gcc-bugs@gcc.gnu.org Received: (qmail 4415 invoked by alias); 28 Nov 2013 10:00:32 -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 4386 invoked by uid 48); 28 Nov 2013 10:00:29 -0000 From: "rguenth at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug debug/59323] [4.9 Regression] Int. comp. error: in add_AT_specification, at dwarf2out.c:4026 Date: Thu, 28 Nov 2013 10:00:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: debug X-Bugzilla-Version: 4.9.0 X-Bugzilla-Keywords: ice-on-valid-code, lto X-Bugzilla-Severity: normal X-Bugzilla-Who: rguenth 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: 4.9.0 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_status cf_reconfirmed_on target_milestone everconfirmed 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: 2013-11/txt/msg02873.txt.bz2 Content-length: 1736 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59323 Richard Biener changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW Last reconfirmed| |2013-11-28 Target Milestone|--- |4.9.0 Ever confirmed|0 |1 --- Comment #1 from Richard Biener --- Confirmed. Nested functions. There seems to be a declaration coming in from BLOCK_VARS #5 0x000000000074b91a in decls_for_scope (stmt=, context_die=0x7ffff6e4f050, depth=2) at /space/rguenther/src/svn/trunk/gcc/dwarf2out.c:19971 but the decl itself has non-BLOCK scope (its DECL_CONTEXT is the main fn). There are two BLOCKs which contain the exact same BLOCK_VARs ... So it seems we duplicate BLOCKs either bogously during streaming (maybe only in the context of nested functions) or they are duplicate also in the compile phase. It seems that one BLOCK is BLOCK_SUPERCONTEXT of the other which cannot really be a streaming artifact. It's a tree merging artifact - we merge the TYPE_DECLs for enum { X }; which end up being written to the global section despite their DECL_CONTEXT being a FUNCTION_DECL (bah). Such merging happens without considering DECL_CHAIN as we assume they are not in BLOCK context. They end up there because the nested function decl 'foo' is in that same block (I think) and thus they form a tree SCC via BLOCK_VARS. Ah no - it's ultimately the CONST_DECL for X that pulls the enum type and its type decl global. Ick... I have a fix.