diff options
author | Jakub Jelinek <jakub@redhat.com> | 2025-01-15 09:43:32 +0100 |
---|---|---|
committer | Jakub Jelinek <jakub@gcc.gnu.org> | 2025-01-15 09:43:32 +0100 |
commit | dd389c2549a4891e044c96b9298efa2a363c744a (patch) | |
tree | a17931f1f76b86aa64b288d5946f452a019eeed3 | |
parent | 18f6bb9899209ccd41c476254d30596606c81dd7 (diff) | |
download | gcc-dd389c2549a4891e044c96b9298efa2a363c744a.zip gcc-dd389c2549a4891e044c96b9298efa2a363c744a.tar.gz gcc-dd389c2549a4891e044c96b9298efa2a363c744a.tar.bz2 |
ipa: Initialize/release global obstack in process_new_functions [PR116068]
Other spots in cgraphunit.cc already call bitmap_obstack_initialize (NULL);
before running a pass list and bitmap_obstack_release (NULL); after that,
while process_new_functions wasn't doing that and with the new r15-130
bitmap_alloc checking that results in ICE.
2025-01-15 Jakub Jelinek <jakub@redhat.com>
PR ipa/116068
* cgraphunit.cc (symbol_table::process_new_functions): Call
bitmap_obstack_initialize (NULL); and bitmap_obstack_release (NULL)
around processing the functions.
* gcc.dg/graphite/pr116068.c: New test.
-rw-r--r-- | gcc/cgraphunit.cc | 2 | ||||
-rw-r--r-- | gcc/testsuite/gcc.dg/graphite/pr116068.c | 26 |
2 files changed, 28 insertions, 0 deletions
diff --git a/gcc/cgraphunit.cc b/gcc/cgraphunit.cc index 284a22b..82f2054 100644 --- a/gcc/cgraphunit.cc +++ b/gcc/cgraphunit.cc @@ -311,6 +311,7 @@ symbol_table::process_new_functions (void) { cgraph_node *node = cgraph_new_nodes[i]; fndecl = node->decl; + bitmap_obstack_initialize (NULL); switch (state) { case CONSTRUCTION: @@ -367,6 +368,7 @@ symbol_table::process_new_functions (void) gcc_unreachable (); break; } + bitmap_obstack_release (NULL); } cgraph_new_nodes.release (); diff --git a/gcc/testsuite/gcc.dg/graphite/pr116068.c b/gcc/testsuite/gcc.dg/graphite/pr116068.c new file mode 100644 index 0000000..99ff4f8 --- /dev/null +++ b/gcc/testsuite/gcc.dg/graphite/pr116068.c @@ -0,0 +1,26 @@ +/* PR ipa/116068 */ +/* { dg-do compile { target { lto && { bitint && int128 } } } } */ +/* { dg-options "-Os -flto -ffat-lto-objects -floop-parallelize-all -ftree-parallelize-loops=2 --param=parloops-schedule=dynamic" } */ + +#if __BITINT_MAXWIDTH__ >= 1024 +typedef _BitInt (1024) A; +typedef __attribute__((__vector_size__ (16))) char B; +typedef __attribute__((__vector_size__ (16))) int C; +B a; +A b; +int c; +unsigned int *p; + +void +foo0 (unsigned _BitInt (512) x) +{ + C d = {}; + _BitInt (1024) e = x | *(A *) __builtin_memset (&b, c, 8); + unsigned h = __builtin_stdc_first_leading_zero (*p); + C f = *(C *) __builtin_memset (&d, h, 6); + B g = (B) f; + a = g + (B) (__int128) e; +} +#else +int i; +#endif |