diff options
author | Jakub Jelinek <jakub@redhat.com> | 2019-07-19 12:26:23 +0200 |
---|---|---|
committer | Jakub Jelinek <jakub@gcc.gnu.org> | 2019-07-19 12:26:23 +0200 |
commit | 14298fa4891ee9b347d7f286cc8ef266976f9e18 (patch) | |
tree | e9fc9b6ab66a0e34aca203c1589f4af86f54f457 /gcc | |
parent | 22469e4244a549e0745299578ebc5144505a6a51 (diff) | |
download | gcc-14298fa4891ee9b347d7f286cc8ef266976f9e18.zip gcc-14298fa4891ee9b347d7f286cc8ef266976f9e18.tar.gz gcc-14298fa4891ee9b347d7f286cc8ef266976f9e18.tar.bz2 |
re PR middle-end/91190 (ICE on valid code: in hashtab_chk_error, at hash-table.c:137)
PR middle-end/91190
* function.c (insert_temp_slot_address): Store into the hash table
a copy of address to avoid RTL sharing issues.
* gcc.c-torture/compile/pr91190.c: New test.
From-SVN: r273599
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/function.c | 2 | ||||
-rw-r--r-- | gcc/testsuite/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/testsuite/gcc.c-torture/compile/pr91190.c | 31 |
4 files changed, 43 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 95868ab..3ac52e5 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2019-07-19 Jakub Jelinek <jakub@redhat.com> + + PR middle-end/91190 + * function.c (insert_temp_slot_address): Store into the hash table + a copy of address to avoid RTL sharing issues. + 2019-07-19 Richard Biener <rguenther@suse.de> PR tree-optimization/91207 diff --git a/gcc/function.c b/gcc/function.c index 373c1f2..2a0061c 100644 --- a/gcc/function.c +++ b/gcc/function.c @@ -704,7 +704,7 @@ static void insert_temp_slot_address (rtx address, class temp_slot *temp_slot) { struct temp_slot_address_entry *t = ggc_alloc<temp_slot_address_entry> (); - t->address = address; + t->address = copy_rtx (address); t->temp_slot = temp_slot; t->hash = temp_slot_address_compute_hash (t); *temp_slot_address_table->find_slot_with_hash (t, t->hash, INSERT) = t; diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index b4fca28..906ca0e 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2019-07-19 Jakub Jelinek <jakub@redhat.com> + + PR middle-end/91190 + * gcc.c-torture/compile/pr91190.c: New test. + 2019-07-19 Richard Biener <rguenther@suse.de> PR tree-optimization/91207 diff --git a/gcc/testsuite/gcc.c-torture/compile/pr91190.c b/gcc/testsuite/gcc.c-torture/compile/pr91190.c new file mode 100644 index 0000000..10b792f --- /dev/null +++ b/gcc/testsuite/gcc.c-torture/compile/pr91190.c @@ -0,0 +1,31 @@ +/* PR middle-end/91190 */ + +unsigned a[1], c; +long d, h; +int e[2], f, g; +char i; + +int +main () +{ + char k = 0; + int l; + while (i || d) + { + if (g) + while (1) + ; + e[1] = 0; + long m[2], n = ~(3 & (5 | (h | 9) * 2237420170)); + g = 90 * n; + char b = m[300000000], j = 0; + c = 5 ^ a[c ^ (b & 5)]; + int o = d; + k = o ? : j; + if (k) + for (l = 0; l < 3; l++) + if (m[200000000000000000]) + __builtin_printf ("%d", f); + } + return 0; +} |