From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28728 invoked by alias); 18 Sep 2014 16:07:26 -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 28689 invoked by uid 48); 18 Sep 2014 16:07:22 -0000 From: "arnez at linux dot vnet.ibm.com" To: gcc-bugs@gcc.gnu.org Subject: [Bug debug/63300] New: 'const volatile' sometimes stripped in debug info Date: Thu, 18 Sep 2014 16:07: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: 5.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: arnez at linux dot vnet.ibm.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: 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-09/txt/msg01852.txt.bz2 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63300 Bug ID: 63300 Summary: 'const volatile' sometimes stripped in debug info Product: gcc Version: 5.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: debug Assignee: unassigned at gcc dot gnu.org Reporter: arnez at linux dot vnet.ibm.com With current upstream gcc, the following commands do not yield the expected output: echo 'void f (const volatile int x) { }' | gcc -xc -c -g -o foo.o - readelf -wi foo.o | grep 'volatile\|const' With an older gcc we get something like this: <1><54>: Abbrev Number: 4 (DW_TAG_const_type) <1><59>: Abbrev Number: 5 (DW_TAG_volatile_type) With the current gcc we get nothing. Indeed, the resulting debug info declares the parameter 'x' merely as an 'int' instead of 'const volatile int'. The same happens with some other combinations as well, e.g.: char *const volatile x const volatile float x const volatile int *x