re PR lto/47259 (LTO and global register variable)

2011-01-12  Richard Guenther  <rguenther@suse.de>

	PR lto/47259
	* gcc.dg/lto/pr47259_0.c: New testcase.
	* gcc.dg/lto/pr47259_1.c: Likewise.

From-SVN: r168715
This commit is contained in:
Richard Guenther 2011-01-12 15:21:59 +00:00 committed by Richard Biener
parent 4b18b3c25b
commit d559a7f87c
3 changed files with 28 additions and 0 deletions

View File

@ -1,3 +1,9 @@
2011-01-12 Richard Guenther <rguenther@suse.de>
PR lto/47259
* gcc.dg/lto/pr47259_0.c: New testcase.
* gcc.dg/lto/pr47259_1.c: Likewise.
2011-01-12 Iain Sandoe <iains@gcc.gnu.org>
* objc-obj-c++-shared/Object1.h: Add copyright header, update

View File

@ -0,0 +1,13 @@
/* { dg-lto-do link } */
/* { dg-skip-if "" { ! { x86_64-*-* } } { "*" } { "" } } */
/* { dg-lto-options { { -O2 -flto -w } } } */
/* { dg-require-effective-target lp64 } */
register int r asm("esi");
void foo(void)
{
if (r)
__asm__("sar\t%0" : "+r" (r));
__asm__("sar\t%0" : "+r" (r));
}

View File

@ -0,0 +1,9 @@
/* { dg-options "-fno-lto" } */
extern void foo(void);
int main(void)
{
foo();
return 0;
}