This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

final_scan_insn and dbxout_block don't aggree about block numbers


final_scan_insn sometimes sees fewer blocks than dbxout_block.  If I
remove anything from the example below the error does not happen.  This is
a long standing bug that already exists at least since egcs-2.91.66.

$ cat label.ii
class X { public: ~X(); };
class Y : public X
{
public:
  Y (const char *);
  int to_int ();
};
int foo (const char *y)
{
  int n = ({
    int x = 0;
    if (__builtin_constant_p (Y(y).to_int()))
      __asm__ ("" : "=r" (x) : "r" (Y(y).to_int()));
    x; });
}
$ /usr/local/i686-linux/bin/g++ -O -v -g label.ii
Reading specs from /usr/local/i686-linux/lib/gcc-lib/i686-linux/2.96/specs
gcc version 2.96 19990910 (experimental)
 /usr/local/i686-linux/lib/gcc-lib/i686-linux/2.96/cc1plus label.ii -quiet -g -O -version -fpreprocessed -o /tmp/ccESGHdA.s
GNU C++ version 2.96 19990910 (experimental) (i686-linux) compiled by GNU C version 2.96 19990909 (experimental).
 /usr/local/i686-linux/bin/as -V -Qy -o /tmp/cclt6mZW.o /tmp/ccESGHdA.s
GNU assembler version 2.9.5 (i686-linux) using BFD version 2.9.5
/tmp/ccESGHdA.s: Assembler messages:
/tmp/ccESGHdA.s:88: Error: Subtraction of two symbols in different sections ".LBB7" {*UND* section} - "foo__FPCc" {.text section} at file address 596.
/tmp/ccESGHdA.s:89: Error: Subtraction of two symbols in different sections ".LBE7" {*UND* section} - "foo__FPCc" {.text section} at file address 608.


-- 
Andreas Schwab                                  "And now for something
schwab@suse.de                                   completely different."
SuSE GmbH, Schanzäckerstr. 10, D-90443 Nürnberg


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]