mirror of
git://gcc.gnu.org/git/gcc.git
synced 2025-02-19 20:00:32 +08:00
re PR lto/55660 (ICE instead of some warning during lto build with supplied different options (-funsigned-char vs none))
2012-12-13 Richard Biener <rguenther@suse.de> PR lto/55660 * tree-streamer.c (record_common_node): Check that we are not recursively pre-loading nodes we want to skip. Handle char_type_node appearing as part of va_list_type_node. * gcc.dg/lto/pr55660_0.c: New testcase. * gcc.dg/lto/pr55660_1.c: Likewise. From-SVN: r194473
This commit is contained in:
parent
af50fec7f5
commit
3ecce8a1ff
@ -1,3 +1,10 @@
|
|||||||
|
2012-12-13 Richard Biener <rguenther@suse.de>
|
||||||
|
|
||||||
|
PR lto/55660
|
||||||
|
* tree-streamer.c (record_common_node): Check that we are not
|
||||||
|
recursively pre-loading nodes we want to skip. Handle
|
||||||
|
char_type_node appearing as part of va_list_type_node.
|
||||||
|
|
||||||
2012-12-13 Jakub Jelinek <jakub@redhat.com>
|
2012-12-13 Jakub Jelinek <jakub@redhat.com>
|
||||||
|
|
||||||
PR gcov-profile/55650
|
PR gcov-profile/55650
|
||||||
|
@ -1,3 +1,9 @@
|
|||||||
|
2012-12-13 Richard Biener <rguenther@suse.de>
|
||||||
|
|
||||||
|
PR lto/55660
|
||||||
|
* gcc.dg/lto/pr55660_0.c: New testcase.
|
||||||
|
* gcc.dg/lto/pr55660_1.c: Likewise.
|
||||||
|
|
||||||
2012-12-13 Jakub Jelinek <jakub@redhat.com>
|
2012-12-13 Jakub Jelinek <jakub@redhat.com>
|
||||||
|
|
||||||
PR gcov-profile/55650
|
PR gcov-profile/55650
|
||||||
|
11
gcc/testsuite/gcc.dg/lto/pr55660_0.c
Normal file
11
gcc/testsuite/gcc.dg/lto/pr55660_0.c
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
/* { dg-lto-do run } */
|
||||||
|
/* { dg-extra-ld-options { -funsigned-char } } */
|
||||||
|
|
||||||
|
char n[3] = {'a','b','c'};
|
||||||
|
int foo(char *x)
|
||||||
|
{
|
||||||
|
if (*x == 'b')
|
||||||
|
return (int)*x;
|
||||||
|
*x = 'y';
|
||||||
|
return 0;
|
||||||
|
}
|
15
gcc/testsuite/gcc.dg/lto/pr55660_1.c
Normal file
15
gcc/testsuite/gcc.dg/lto/pr55660_1.c
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
extern int foo (char*);
|
||||||
|
extern void abort (void);
|
||||||
|
|
||||||
|
extern char n[3];
|
||||||
|
|
||||||
|
int main ()
|
||||||
|
{
|
||||||
|
int i, m = 0;
|
||||||
|
for (i = 0; i < 3; i++)
|
||||||
|
m += foo(&n[i]);
|
||||||
|
|
||||||
|
if (m != 'b')
|
||||||
|
abort ();
|
||||||
|
return 0;
|
||||||
|
}
|
@ -237,6 +237,16 @@ streamer_tree_cache_lookup (struct streamer_tree_cache_d *cache, tree t,
|
|||||||
static void
|
static void
|
||||||
record_common_node (struct streamer_tree_cache_d *cache, tree node)
|
record_common_node (struct streamer_tree_cache_d *cache, tree node)
|
||||||
{
|
{
|
||||||
|
/* If we recursively end up at nodes we do not want to preload simply don't.
|
||||||
|
??? We'd want to verify that this doesn't happen, or alternatively
|
||||||
|
do not recurse at all. */
|
||||||
|
if (node == char_type_node)
|
||||||
|
return;
|
||||||
|
|
||||||
|
gcc_checking_assert (node != boolean_type_node
|
||||||
|
&& node != boolean_true_node
|
||||||
|
&& node != boolean_false_node);
|
||||||
|
|
||||||
/* We have to make sure to fill exactly the same number of
|
/* We have to make sure to fill exactly the same number of
|
||||||
elements for all frontends. That can include NULL trees.
|
elements for all frontends. That can include NULL trees.
|
||||||
As our hash table can't deal with zero entries we'll simply stream
|
As our hash table can't deal with zero entries we'll simply stream
|
||||||
|
Loading…
Reference in New Issue
Block a user