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]
Other format: [Raw text]

[Bug middle-end/20263] [4.0/4.1 Regression] Incorrect asm for global register vars


------- Additional Comments From rcbilson at plg dot uwaterloo dot ca  2005-03-16 15:12 -------
(In reply to comment #6)
> The problem occurs only with GCC 4.x, in particular not with GCC 3.4.3.

This was strange to read, because I've definitely noticed it with 3.4.3.
Interestingly, it seems to be only g++, rather than gcc, that has the problem:

plg2=; cat g7.c
register void *tp __asm__("%g7");

void set_tp() {
    tp = 0;
}
plg2=; gcc -S g7.c
plg2=; grep register g7.s
	.register	%g7, tp
plg2=; g++ -S g7.c
plg2=; grep register g7.s
	.register	%g7, %g7
plg2=; gcc -v
Reading specs from
/fsys2/u2/asharji/gcc/gcc-3.4.3/bin/../lib/gcc/sparc64-sun-solaris2.8/3.4.3/specs
Configured with: ../src/configure --prefix=/u/asharji/gcc/gcc-3.4.3
--enable-languages=c,c++ sparc64-sun-solaris2.8
Thread model: posix
gcc version 3.4.3
plg2=; g++ -v
Reading specs from
/fsys2/u2/asharji/gcc/gcc-3.4.3/bin/../lib/gcc/sparc64-sun-solaris2.8/3.4.3/specs
Configured with: ../src/configure --prefix=/u/asharji/gcc/gcc-3.4.3
--enable-languages=c,c++ sparc64-sun-solaris2.8
Thread model: posix
gcc version 3.4.3


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20263


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