Created attachment 363513 [details] preprocessed C++ source Description of problem: The compiler emits DW_AT_name attributes on some DW_TAG_const_type entries. In C-like languages, these types can never have names of their own and so these attributes are wrong. (The name goes on the underlying DW_TAG_structure_type et al, or on a DW_TAG_typedef that points to the DW_TAG_const_type.) Version-Release number of selected component (if applicable): gcc-4.4.1-2.fc11.x86_64 How reproducible: 100% Steps to Reproduce: 1./usr/bin/gcc -D_GNU_SOURCE -DHAVE_CONFIG_H -DDEBUGPRED=0 -DSRCDIR=\"/home/roland/redhat/elfutils/src\" -DOBJDIR=\"/home/roland/build/elfutils/src\" -I. -I../../../redhat/elfutils/src -I.. -I../../../redhat/elfutils/src -I../../../redhat/elfutils/src/../libelf -I../../../redhat/elfutils/src/../libebl -I../../../redhat/elfutils/src/../libdw -I../../../redhat/elfutils/src/../libdwfl -I../../../redhat/elfutils/src/../libasm -I../../../redhat/elfutils/src/../lib -I.. -Wall -Wshadow -std=gnu99 -Werror -Wunused -Wextra -Wformat=2 -fexceptions -g -c -o ar.o -v ar.i 2.readelf --debug-dump=info ar.o 3.See name attributes on const_type entries. Actual results: Extra DW_AT_name attributes. Expected results: Each DW_TAG_const_type should have only its DW_AT_type attribute. Additional info: -v output: Using built-in specs. Target: x86_64-redhat-linux Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=http://bugzilla.redhat.com/bugzilla --enable-bootstrap --enable-shared --enable-threads=posix --enable-checking=release --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-languages=c,c++,objc,obj-c++,java,fortran,ada --enable-java-awt=gtk --disable-dssi --enable-plugin --with-java-home=/usr/lib/jvm/java-1.5.0-gcj-1.5.0.0/jre --enable-libgcj-multifile --enable-java-maintainer-mode --with-ecj-jar=/usr/share/java/eclipse-ecj.jar --disable-libjava-multilib --with-ppl --with-cloog --with-tune=generic --with-arch_32=i586 --build=x86_64-redhat-linux Thread model: posix gcc version 4.4.1 20090725 (Red Hat 4.4.1-2) (GCC) COLLECT_GCC_OPTIONS='-D_GNU_SOURCE' '-DHAVE_CONFIG_H' '-DDEBUGPRED=0' '-DSRCDIR="/home/roland/redhat/elfutils/src"' '-DOBJDIR="/home/roland/build/elfutils/src"' '-I.' '-I../../../redhat/elfutils/src' '-I..' '-I../../../redhat/elfutils/src' '-I../../../redhat/elfutils/src/../libelf' '-I../../../redhat/elfutils/src/../libebl' '-I../../../redhat/elfutils/src/../libdw' '-I../../../redhat/elfutils/src/../libdwfl' '-I../../../redhat/elfutils/src/../libasm' '-I../../../redhat/elfutils/src/../lib' '-I..' '-Wall' '-Wshadow' '-std=gnu99' '-Werror' '-Wunused' '-Wextra' '-Wformat=2' '-fexceptions' '-g' '-c' '-o' 'ar.o' '-v' '-mtune=generic' /usr/libexec/gcc/x86_64-redhat-linux/4.4.1/cc1 -fpreprocessed ar.i -quiet -dumpbase ar.i -mtune=generic -auxbase-strip ar.o -g -Wall -Wshadow -Werror -Wunused -Wextra -Wformat=2 -std=gnu99 -version -fexceptions -o /tmp/cc8Bua2j.s GNU C (GCC) version 4.4.1 20090725 (Red Hat 4.4.1-2) (x86_64-redhat-linux) compiled by GNU C version 4.4.1 20090725 (Red Hat 4.4.1-2), GMP version 4.2.4, MPFR version 2.4.1. GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072 Compiler executable checksum: f2d7eb8fb5f7081c13487e6398492a07 COLLECT_GCC_OPTIONS='-D_GNU_SOURCE' '-DHAVE_CONFIG_H' '-DDEBUGPRED=0' '-DSRCDIR="/home/roland/redhat/elfutils/src"' '-DOBJDIR="/home/roland/build/elfutils/src"' '-I.' '-I../../../redhat/elfutils/src' '-I..' '-I../../../redhat/elfutils/src' '-I../../../redhat/elfutils/src/../libelf' '-I../../../redhat/elfutils/src/../libebl' '-I../../../redhat/elfutils/src/../libdw' '-I../../../redhat/elfutils/src/../libdwfl' '-I../../../redhat/elfutils/src/../libasm' '-I../../../redhat/elfutils/src/../lib' '-I..' '-Wall' '-Wshadow' '-std=gnu99' '-Werror' '-Wunused' '-Wextra' '-Wformat=2' '-fexceptions' '-g' '-c' '-o' 'ar.o' '-v' '-mtune=generic' as -V -Qy -o ar.o /tmp/cc8Bua2j.s GNU assembler version 2.19.51.0.14 (x86_64-redhat-linux) using BFD version version 2.19.51.0.14-1.fc11 20090722 COMPILER_PATH=/usr/libexec/gcc/x86_64-redhat-linux/4.4.1/:/usr/libexec/gcc/x86_64-redhat-linux/4.4.1/:/usr/libexec/gcc/x86_64-redhat-linux/:/usr/lib/gcc/x86_64-redhat-linux/4.4.1/:/usr/lib/gcc/x86_64-redhat-linux/:/usr/libexec/gcc/x86_64-redhat-linux/4.4.1/:/usr/libexec/gcc/x86_64-redhat-linux/:/usr/lib/gcc/x86_64-redhat-linux/4.4.1/:/usr/lib/gcc/x86_64-redhat-linux/ LIBRARY_PATH=/usr/lib/gcc/x86_64-redhat-linux/4.4.1/:/usr/lib/gcc/x86_64-redhat-linux/4.4.1/:/usr/lib/gcc/x86_64-redhat-linux/4.4.1/../../../../lib64/:/lib/../lib64/:/usr/lib/../lib64/:/usr/lib/gcc/x86_64-redhat-linux/4.4.1/../../../:/lib/:/usr/lib/ COLLECT_GCC_OPTIONS='-D_GNU_SOURCE' '-DHAVE_CONFIG_H' '-DDEBUGPRED=0' '-DSRCDIR="/home/roland/redhat/elfutils/src"' '-DOBJDIR="/home/roland/build/elfutils/src"' '-I.' '-I../../../redhat/elfutils/src' '-I..' '-I../../../redhat/elfutils/src' '-I../../../redhat/elfutils/src/../libelf' '-I../../../redhat/elfutils/src/../libebl' '-I../../../redhat/elfutils/src/../libdw' '-I../../../redhat/elfutils/src/../libdwfl' '-I../../../redhat/elfutils/src/../libasm' '-I../../../redhat/elfutils/src/../lib' '-I..' '-Wall' '-Wshadow' '-std=gnu99' '-Werror' '-Wunused' '-Wextra' '-Wformat=2' '-fexceptions' '-g' '-c' '-o' 'ar.o' '-v' '-mtune=generic'
Should be fixed in gcc-4.4.1-19.fc12.