re PR lto/47188 (Undefined reference errors when combining IR and non-IR object files)

PR lto/47188
	* collect2.c (main): Do not enable LTOmode when plugin is active.
	* testsuite/gcc.dg/lto/pr47188_0.c: New testcase.
	* testsuite/gcc.dg/lto/pr47188_1.c: New testcase.

From-SVN: r168548
This commit is contained in:
Jan Hubicka 2011-01-06 19:50:20 +01:00 committed by Jan Hubicka
parent a4da64857d
commit 402c1cb4c8
5 changed files with 26 additions and 1 deletions

View File

@ -1,3 +1,8 @@
2011-01-06 Jan Hubicka <jh@suse.cz>
PR lto/47188
* collect2.c (main): Do not enable LTOmode when plugin is active.
2011-01-06 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
PR other/45915

View File

@ -1236,7 +1236,7 @@ main (int argc, char **argv)
#endif
}
vflag = debug;
if (no_partition)
if (no_partition && lto_mode == LTO_MODE_WHOPR)
lto_mode = LTO_MODE_LTO;
}

View File

@ -1,3 +1,8 @@
2011-01-06 Jan Hubicka <jh@suse.cz>
* testsuite/gcc.dg/lto/pr47188_0.c: New testcase.
* testsuite/gcc.dg/lto/pr47188_1.c: New testcase.
2011-01-06 Daniel Franke <franke.daniel@gmail.com>
PR fortran/33117

View File

@ -0,0 +1,7 @@
/* { dg-lto-do assemble } */
/* { dg-require-linker-plugin "" } */
/* { dg-extra-ld-options "-fuse-linker-plugin -fwhole-program" } */
int foo(void)
{
return 0;
}

View File

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