re PR lto/60820 (ice in ctor_for_folding, at varpool.c:291)

PR lto/60820
	* gcc.dg/lto/pr60820_0.c: New testcase.
	* gcc.dg/lto/pr60820_1.c: New testcase.

From-SVN: r209460
This commit is contained in:
Jan Hubicka 2014-04-17 04:32:26 +02:00 committed by Jan Hubicka
parent 789c274118
commit 7c1b1692e1
3 changed files with 30 additions and 0 deletions

View File

@ -1,3 +1,9 @@
2014-04-16 Jan Hubicka <hubicka@ucw.cz>
PR lto/60820
* gcc.dg/lto/pr60820_0.c: New testcase.
* gcc.dg/lto/pr60820_1.c: New testcase.
2014-04-16 Jan Hubicka <hubicka@ucw.cz>
PR ipa/60854

View File

@ -0,0 +1,13 @@
/* { dg-lto-do link } */
/* { dg-lto-options {{-flto -r -nostdlib -O2}} } */
#include <stdio.h>
struct in6_addr {int bah;};
extern const struct in6_addr in6addr_any;
static const struct in6_addr local_in6addr_any = {1};
#pragma weak in6addr_any = local_in6addr_any
__attribute__ ((used))
void foo2()
{
fprintf (stderr, "v1: %p, v2: %p\n", &local_in6addr_any, &in6addr_any);
}

View File

@ -0,0 +1,11 @@
#include <stdio.h>
struct in6_addr {int bah;};
extern const struct in6_addr in6addr_any;
static const struct in6_addr local_in6addr_any = {1};
#pragma weak in6addr_any = local_in6addr_any
__attribute__ ((used))
void foo()
{
fprintf (stderr, "v1: %p, v2: %p\n", &local_in6addr_any, &in6addr_any);
}