[Bug c++/10940] [3.3/3.4 regression] Bad code with explicit specialization
pinskia@physics.uc.edu
gcc-bugzilla@gcc.gnu.org
Thu May 22 20:55:00 GMT 2003
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=10940
------- Additional Comments From pinskia@physics.uc.edu 2003-05-22 18:48 -------
Since my analysis has not come through yet, I will post them both again but this time use the web
page instead of email.
First email sent:
This still happens on the mainline on powerpc-apple-darwin (but does not seg fault for a
different reason):
_main:
LFB7:
li r4,8192
li r3,4096
lwz r5,0(r4)
add r2,r5,r9
stw r2,0(r4)
blr
It also happens on the tree-ssa branch, since that branch has tree dumping
after inlining takes place:
;; Function int main() (main)
int main() ()
{
int * a.2;
{
{
int a;
a = 4096;
a.2 = &a;
{
int v;
int * p;
p = a.2;
v = 8192;
{
{
{
int v;
int * p;
struct o<32> * const this; <--- where the f*** did this come from and why, since
do_add is static.
this = (struct o<32> * const)p;
p = (int *)v;
{
int T.1;
{
T.1 = *p;
*p = T.1 + v
}
}
}
}
}
};
return a;
}
};
return 0;
}
second email sent replying to what Wolfgang Bangerth wrote:
Not it is not because of stack corruption, it is because gcc is adding a variable called this to the
`static' class function.
On Thursday, May 22, 2003, at 14:34 US/Eastern, bangerth@dealii.org wrote:
> 0x08048526 in void o<32>::do_add<int>(int*, int) (this=0xbffff178,
> p=0x2000, v=-1073745540) at x.cc:12
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.
More information about the Gcc-bugs
mailing list