Hi Rainer, temporarly removing compiler option -P do solve the problem Here. But ,do you think this is the permanent solution of this bug?
If you see here hello.s <https://gist.github.com/kamleshbhalui/ef391b040bcfa514048a2ae680a1eafd> , compiler puts* .file "hello.s".* why this info is not being used. If we make compiler use this info than problem will be solved i think. ~Kamlesh Kumar On Thu, Aug 2, 2018 at 6:18 PM Rainer Orth <r...@cebitec.uni-bielefeld.de> wrote: > Hi Kamlesh, > > > gcc is putting wrong enrty inside .debug_info section into attribute > > DW_AT_name if -xassembler-with-cpp option is used with debugging > enabled. > > > > Considering following example > > hello.s > > <https://gist.github.com/kamleshbhalui/ef391b040bcfa514048a2ae680a1eafd> > > > > when below command is issued: > > gcc -c -g -xassembler-with-cpp -P hello.s > > readelf --debug-dump hello.o | grep DW_AT_name > > > > I get following: > > DW_AT_name : /tmp/cc8P6Sk1.s > > which is temporary file generated by compiler. > > > > I think it should point to original source file as other compiler do. > > > > is it a compiler bug?or there is a way out. > > this looks very much like PR target/85994 > (https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85994). My solution was > not use use -P. > > Rainer > > -- > > ----------------------------------------------------------------------------- > Rainer Orth, Center for Biotechnology, Bielefeld University >