[LLVMbugs] [Bug 15662] New: incorrect dwarf information about function arguments is produced in one case
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Wed Apr 3 13:16:53 PDT 2013
http://llvm.org/bugs/show_bug.cgi?id=15662
Bug ID: 15662
Summary: incorrect dwarf information about function arguments
is produced in one case
Product: clang
Version: 3.2
Hardware: PC
OS: FreeBSD
Status: NEW
Severity: normal
Priority: P
Component: -New Bugs
Assignee: unassignedclangbugs at nondot.org
Reporter: avg at FreeBSD.org
CC: llvmbugs at cs.uiuc.edu
Classification: Unclassified
Created attachment 10282
--> http://llvm.org/bugs/attachment.cgi?id=10282&action=edit
pre-processed source code
Function signature in FreeBSD source code is:
void _sx_xunlock(struct sx *sx, const char *file, int line);
clang generated dwarf information (as reported by objdump -W) is:
<1><2c70>: Abbrev Number: 55 (DW_TAG_subprogram)
<2c71> DW_AT_name : (indirect string, offset: 0x1817): _sx_xunlock
<2c75> DW_AT_decl_file : 1
<2c76> DW_AT_decl_line : 373
<2c78> DW_AT_prototyped : 1
<2c78> DW_AT_external : 1
<2c78> DW_AT_inline : 1 (inlined)
<2><2c79>: Abbrev Number: 51 (DW_TAG_formal_parameter)
<2c7a> DW_AT_name : (indirect string, offset: 0xd061): line
<2c7e> DW_AT_decl_file : 1
<2c7f> DW_AT_decl_line : 373
<2c81> DW_AT_type : <a2>
<2><2c85>: Abbrev Number: 51 (DW_TAG_formal_parameter)
<2c86> DW_AT_name : (indirect string, offset: 0xd056): sx
<2c8a> DW_AT_decl_file : 1
<2c8b> DW_AT_decl_line : 373
<2c8d> DW_AT_type : <782c>
<2><2c91>: Abbrev Number: 51 (DW_TAG_formal_parameter)
<2c92> DW_AT_name : (indirect string, offset: 0xc67): file
<2c96> DW_AT_decl_file : 1
<2c97> DW_AT_decl_line : 373
<2c99> DW_AT_type : <32>
That is, order of arguments is recorded as 'line', 'sx', 'file'.
Please see the attached preprocessed file.
My compilation options were:
-pipe -fno-strict-aliasing -march=amdfam10 -std=c99 -g -O -Wall
-Wredundant-decls
-Wnested-externs -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith
-Winline
-Wcast-qual -Wundef -Wno-pointer-sign -fformat-extensions
-Wmissing-include-dirs
-fdiagnostics-show-option -Wno-error-tautological-compare -Wno-error-empty-body
-Wno-error-parentheses-equality -nostdinc -fno-omit-frame-pointer
-mno-omit-leaf-frame-pointer -mno-aes -mno-avx -mcmodel=kernel -mno-red-zone
-mno-mmx -mno-sse -msoft-float -fno-asynchronous-unwind-tables -ffreestanding
-fstack-protector -Werror
clang is:
FreeBSD clang version 3.2 (tags/RELEASE_32/final 170710) 20121221
The problem doesn't seem to be a common one.
Thus far, I have seen it only with this function (out of many inspected).
Please also see this thread for a preliminary discussion of this issue:
http://lists.cs.uiuc.edu/pipermail/cfe-dev/2013-April/028829.html
--
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20130403/0724e7cc/attachment.html>
More information about the llvm-bugs
mailing list