Mailinglist Archive: opensuse-bugs (15077 mails)

< Previous Next >
[Bug 326866] GCC: dwarf records for inlines appear incomplete
  • From: bugzilla_noreply@xxxxxxxxxx
  • Date: Fri, 28 Sep 2007 10:07:34 -0600 (MDT)
  • Message-id: <20070928160734.55590245269@xxxxxxxxxxxxxxxxxxxxxx>
https://bugzilla.novell.com/show_bug.cgi?id=326866#c9





--- Comment #9 from Michael Matz <matz@xxxxxxxxxx>  2007-09-28 10:07:33 MST ---
Hmm, Jans testcase seems to work just fine now, with the patch, and this on
top (otherwise it might access REG_EXPR on a MEM):

--- combine.c.mm        2007-09-28 17:31:05.000000000 +0200
+++ combine.c   2007-09-28 17:38:33.000000000 +0200
@@ -1269,8 +1269,10 @@ can_combine_p (rtx insn, rtx i3, rtx pre
       || (flag_preserve_function_arguments
          && GET_CODE (PATTERN (i3)) == PARALLEL
          && GET_CODE (XVECEXP (PATTERN (i3), 0, 0)) == ASM_OPERANDS
-         && REG_USERVAR_P (dest)
-         && REG_EXPR (dest) != REG_EXPR (src)))
+         && (REG_P (dest) != REG_P (src)
+             || (REG_P (dest)
+                 && REG_USERVAR_P (dest)
+                 && REG_EXPR (dest) != REG_EXPR (src)))))
     return 0;

   /* DEST must either be a REG or CC0.  */

With this and these command line I get correct output:

% ../gcc/cc1 -fpreserve-function-arguments -Wall -Wundef -Wstrict-prototypes
-Wno-trigraphs -fno-strict-aliasing -fno-common -O2 -msoft-float -mregparm=3
-freg-struct-return -mpreferred-stack-boundary=4 -march=i686 -ffreestanding
-maccumulate-outgoing-args -fomit-frame-pointer -g -fno-stack-protector
-Wdeclaration-after-statement -Wno-pointer-sign -quiet  namei.i

readelf -wi namei.o
...
 <1><820b>: Abbrev Number: 63 (DW_TAG_subprogram)
  <820c>     DW_AT_sibling     : <827b>
  <8210>     DW_AT_name        : (indirect string, offset: 0x3a0b): real_lookup
..
 <2><8362>: Abbrev Number: 86 (DW_TAG_inlined_subroutine)
  <8363>     DW_AT_sibling     : <83ee>
  <8367>     DW_AT_abstract_origin: <820b>
  <836b>     DW_AT_ranges      : 0x190
  <836f>     DW_AT_call_file   : 1
  <8370>     DW_AT_call_line   : 784
 <3><8372>: Abbrev Number: 73 (DW_TAG_formal_parameter)
  <8373>     DW_AT_abstract_origin: <8235>
  <8377>     DW_AT_location    : 0xe45  (location list)
 <3><837b>: Abbrev Number: 73 (DW_TAG_formal_parameter)
  <837c>     DW_AT_abstract_origin: <8229>
  <8380>     DW_AT_location    : 0xe58  (location list)
 <3><8384>: Abbrev Number: 73 (DW_TAG_formal_parameter)
  <8385>     DW_AT_abstract_origin: <821d>
  <8389>     DW_AT_location    : 0xe76  (location list)

So we have location lists for all three formal arguments for the inlined
call.  But it indeed still breaks when I remove -mregparm=3 from the
compile arguments.  And for Richard it doesn't seem to work at all, so
something is definitely still fishy.


-- 
Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.

< Previous Next >
References