mirror of git://gcc.gnu.org/git/gcc.git
re PR target/65249 (unable to find a register to spill in class 'R0_REGS' when compiling protobuf on sh4)
gcc/testsuite/ PR target/65249 * g++.dg/torture/pr65249.C: New. From-SVN: r221256
This commit is contained in:
parent
0d797e0f6f
commit
af68c1b73c
|
|
@ -1,3 +1,8 @@
|
||||||
|
2015-03-07 Oleg Endo <olegendo@gcc.gnu.org>
|
||||||
|
|
||||||
|
PR target/65249
|
||||||
|
* g++.dg/torture/pr65249.C: New.
|
||||||
|
|
||||||
2015-03-07 H.J. Lu <hongjiu.lu@intel.com>
|
2015-03-07 H.J. Lu <hongjiu.lu@intel.com>
|
||||||
|
|
||||||
* gcc.target/i386/pr45685.c (uint64_t): Replace long with long
|
* gcc.target/i386/pr45685.c (uint64_t): Replace long with long
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,54 @@
|
||||||
|
// { dg-do compile }
|
||||||
|
// { dg-additional-options "-fPIC -fstack-protector-strong" { target fpic } }
|
||||||
|
// { dg-require-effective-target fstack_protector }
|
||||||
|
|
||||||
|
struct struct0
|
||||||
|
{
|
||||||
|
struct0 (void(*)());
|
||||||
|
};
|
||||||
|
|
||||||
|
int func5 (int* ptr);
|
||||||
|
void func3 (int*, struct0*);
|
||||||
|
|
||||||
|
inline void
|
||||||
|
func4 (int* a, void (*b)())
|
||||||
|
{
|
||||||
|
if (func5 (a) != 2)
|
||||||
|
{
|
||||||
|
struct0 f (b);
|
||||||
|
func3(a, &f);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
struct struct1
|
||||||
|
{
|
||||||
|
const void* val0;
|
||||||
|
const void* val1;
|
||||||
|
};
|
||||||
|
|
||||||
|
void* func3 (const void*);
|
||||||
|
|
||||||
|
static const void* gvar1 = 0;
|
||||||
|
static const void* gvar2 = 0;
|
||||||
|
static int gvar0 = 0;
|
||||||
|
|
||||||
|
void
|
||||||
|
func0 (void)
|
||||||
|
{
|
||||||
|
gvar2 = func3 (gvar1);
|
||||||
|
}
|
||||||
|
|
||||||
|
inline void
|
||||||
|
func1 (void)
|
||||||
|
{
|
||||||
|
func4 (&gvar0, &func0);
|
||||||
|
}
|
||||||
|
|
||||||
|
struct1 func2 (void)
|
||||||
|
{
|
||||||
|
func1 ();
|
||||||
|
struct1 s;
|
||||||
|
s.val0 = gvar1;
|
||||||
|
s.val1 = gvar2;
|
||||||
|
return s;
|
||||||
|
}
|
||||||
Loading…
Reference in New Issue