diff options
author | Ilya Enkovich <enkovich.gnu@gmail.com> | 2015-05-21 08:32:52 +0000 |
---|---|---|
committer | Ilya Enkovich <ienkovich@gcc.gnu.org> | 2015-05-21 08:32:52 +0000 |
commit | 551dc3008c48b64027cc8b143ee5a342834b0ba4 (patch) | |
tree | e07368d6654f4fbbebf36eaee06bf19631d68783 | |
parent | 0fee2ac2882790ca549b1c5504f7fa1e59b25a39 (diff) | |
download | gcc-551dc3008c48b64027cc8b143ee5a342834b0ba4.zip gcc-551dc3008c48b64027cc8b143ee5a342834b0ba4.tar.gz gcc-551dc3008c48b64027cc8b143ee5a342834b0ba4.tar.bz2 |
re PR middle-end/66221 (lto1: error: type variant has different TYPE_ARG_TYPES)
gcc/
PR middle-end/66221
* ipa-chkp.c (chkp_copy_function_type_adding_bounds): Use
build_distinct_type_copy to copy bounds.
gcc/testsuite/
PR middle-end/66221
* gcc.dg/lto/pr66221_0.c: New test.
* gcc.dg/lto/pr66221_1.c: New test.
From-SVN: r223471
-rw-r--r-- | gcc/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/ipa-chkp.c | 2 | ||||
-rw-r--r-- | gcc/testsuite/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/testsuite/gcc.dg/lto/pr66221_0.c | 10 | ||||
-rw-r--r-- | gcc/testsuite/gcc.dg/lto/pr66221_1.c | 4 |
5 files changed, 27 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index a62199a..550d98c 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2015-05-21 Ilya Enkovich <enkovich.gnu@gmail.com> + + PR middle-end/66221 + * ipa-chkp.c (chkp_copy_function_type_adding_bounds): Use + build_distinct_type_copy to copy bounds. + 2015-05-21 Thomas Schwinge <thomas@codesourcery.com> * genrecog.c (MAX_DEPTH, MIN_NUM_STATEMENTS, MAX_NUM_STATEMENTS): diff --git a/gcc/ipa-chkp.c b/gcc/ipa-chkp.c index ac5eb35..c710291 100644 --- a/gcc/ipa-chkp.c +++ b/gcc/ipa-chkp.c @@ -308,7 +308,7 @@ chkp_copy_function_type_adding_bounds (tree orig_type) if (!arg_type) return orig_type; - type = copy_node (orig_type); + type = build_distinct_type_copy (orig_type); TYPE_ARG_TYPES (type) = copy_list (TYPE_ARG_TYPES (type)); for (arg_type = TYPE_ARG_TYPES (type); diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 868e1e9..1823df3 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,9 @@ +2015-05-21 Ilya Enkovich <enkovich.gnu@gmail.com> + + PR middle-end/66221 + * gcc.dg/lto/pr66221_0.c: New test. + * gcc.dg/lto/pr66221_1.c: New test. + 2015-05-21 Manuel López-Ibáñez <manu@gcc.gnu.org> PR c/52952 diff --git a/gcc/testsuite/gcc.dg/lto/pr66221_0.c b/gcc/testsuite/gcc.dg/lto/pr66221_0.c new file mode 100644 index 0000000..dbb9282 --- /dev/null +++ b/gcc/testsuite/gcc.dg/lto/pr66221_0.c @@ -0,0 +1,10 @@ +/* { dg-lto-do link } */ +/* { dg-require-effective-target mpx } */ +/* { dg-lto-options { { -O2 -flto -fcheck-pointer-bounds -mmpx } } } */ + +int test1 (const char *); + +int main (int argc, const char **argv) +{ + return test1 (argv[0]); +} diff --git a/gcc/testsuite/gcc.dg/lto/pr66221_1.c b/gcc/testsuite/gcc.dg/lto/pr66221_1.c new file mode 100644 index 0000000..4c94544 --- /dev/null +++ b/gcc/testsuite/gcc.dg/lto/pr66221_1.c @@ -0,0 +1,4 @@ +int test1 (const char *p) +{ + return (int)(*p); +} |