diff options
author | Peter Bergner <bergner@linux.ibm.com> | 2018-12-07 17:33:55 +0000 |
---|---|---|
committer | Peter Bergner <bergner@gcc.gnu.org> | 2018-12-07 11:33:55 -0600 |
commit | 96e14fda0dca4d79479137844b4457305fad2c3f (patch) | |
tree | 600f036f88b46bb7e857bc7900c284751fc5037b /gcc | |
parent | 886f092f59d8a903fb5b99e757df5e4523dae825 (diff) | |
download | gcc-96e14fda0dca4d79479137844b4457305fad2c3f.zip gcc-96e14fda0dca4d79479137844b4457305fad2c3f.tar.gz gcc-96e14fda0dca4d79479137844b4457305fad2c3f.tar.bz2 |
re PR target/87496 (ICE in aggregate_value_p at gcc/function.c:2046)
gcc/
PR target/87496
* config/rs6000/rs6000.c (rs6000_option_override_internal): Disallow
-mabi=ieeelongdouble and -mabi=ibmlongdouble without -mlong-double-128.
Do not error for -mabi=ibmlongdouble and no ISA 2.06 support.
* doc/invoke.texi: Document -mabi=ibmlongdouble and -mabi=ieeelongdouble
require -mlong-double-128.
gcc/testsuite/
PR target/87496
* gcc.target/powerpc/pr87496.c: Rename from this...
* gcc.target/powerpc/pr87496-1.c: ...to this. Update comment.
* gcc.target/powerpc/pr87496-2.c: New test.
* gcc.target/powerpc/pr87496-3.c: New test.
From-SVN: r266899
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 9 | ||||
-rw-r--r-- | gcc/config/rs6000/rs6000.c | 10 | ||||
-rw-r--r-- | gcc/doc/invoke.texi | 12 | ||||
-rw-r--r-- | gcc/testsuite/ChangeLog | 8 | ||||
-rw-r--r-- | gcc/testsuite/gcc.target/powerpc/pr87496-1.c (renamed from gcc/testsuite/gcc.target/powerpc/pr87496.c) | 2 | ||||
-rw-r--r-- | gcc/testsuite/gcc.target/powerpc/pr87496-2.c | 9 | ||||
-rw-r--r-- | gcc/testsuite/gcc.target/powerpc/pr87496-3.c | 8 |
7 files changed, 52 insertions, 6 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 41fb2da..f99d9dd 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,12 @@ +2018-12-07 Peter Bergner <bergner@linux.ibm.com> + + PR target/87496 + * config/rs6000/rs6000.c (rs6000_option_override_internal): Disallow + -mabi=ieeelongdouble and -mabi=ibmlongdouble without -mlong-double-128. + Do not error for -mabi=ibmlongdouble and no ISA 2.06 support. + * doc/invoke.texi: Document -mabi=ibmlongdouble and -mabi=ieeelongdouble + require -mlong-double-128. + 2018-12-07 Kyrylo Tkachov <kyrylo.tkachov@arm.com> * config/aarch64/aarch64.c (aarch64_tuning_override_functions): Add diff --git a/gcc/config/rs6000/rs6000.c b/gcc/config/rs6000/rs6000.c index 91e0121..cd3fdd0 100644 --- a/gcc/config/rs6000/rs6000.c +++ b/gcc/config/rs6000/rs6000.c @@ -4282,6 +4282,13 @@ rs6000_option_override_internal (bool global_init_p) } else if (rs6000_long_double_type_size == 128) rs6000_long_double_type_size = FLOAT_PRECISION_TFmode; + else if (global_options_set.x_rs6000_ieeequad) + { + if (global_options.x_rs6000_ieeequad) + error ("%qs requires %qs", "-mabi=ieeelongdouble", "-mlong-double-128"); + else + error ("%qs requires %qs", "-mabi=ibmlongdouble", "-mlong-double-128"); + } /* Set -mabi=ieeelongdouble on some old targets. In the future, power server systems will also set long double to be IEEE 128-bit. AIX and Darwin @@ -4293,7 +4300,8 @@ rs6000_option_override_internal (bool global_init_p) else { - if (!TARGET_POPCNTD || !TARGET_VSX) + if (global_options.x_rs6000_ieeequad + && (!TARGET_POPCNTD || !TARGET_VSX)) error ("%qs requires full ISA 2.06 support", "-mabi=ieeelongdouble"); if (rs6000_ieeequad != TARGET_IEEEQUAD_DEFAULT && TARGET_LONG_DOUBLE_128) diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi index 98c1a74..dd262b6 100644 --- a/gcc/doc/invoke.texi +++ b/gcc/doc/invoke.texi @@ -23932,7 +23932,8 @@ Change the current ABI to use IBM extended-precision long double. This is not likely to work if your system defaults to using IEEE extended-precision long double. If you change the long double type from IEEE extended-precision, the compiler will issue a warning unless -you use the @option{-Wno-psabi} option. +you use the @option{-Wno-psabi} option. Requires @option{-mlong-double-128} +to be enabled. @item -mabi=ieeelongdouble @opindex mabi=ieeelongdouble @@ -23940,7 +23941,8 @@ Change the current ABI to use IEEE extended-precision long double. This is not likely to work if your system defaults to using IBM extended-precision long double. If you change the long double type from IBM extended-precision, the compiler will issue a warning unless -you use the @option{-Wno-psabi} option. +you use the @option{-Wno-psabi} option. Requires @option{-mlong-double-128} +to be enabled. @item -mabi=elfv1 @opindex mabi=elfv1 @@ -25201,7 +25203,8 @@ Change the current ABI to use IBM extended-precision long double. This is not likely to work if your system defaults to using IEEE extended-precision long double. If you change the long double type from IEEE extended-precision, the compiler will issue a warning unless -you use the @option{-Wno-psabi} option. +you use the @option{-Wno-psabi} option. Requires @option{-mlong-double-128} +to be enabled. @item -mabi=ieeelongdouble @opindex mabi=ieeelongdouble @@ -25209,7 +25212,8 @@ Change the current ABI to use IEEE extended-precision long double. This is not likely to work if your system defaults to using IBM extended-precision long double. If you change the long double type from IBM extended-precision, the compiler will issue a warning unless -you use the @option{-Wno-psabi} option. +you use the @option{-Wno-psabi} option. Requires @option{-mlong-double-128} +to be enabled. @item -mabi=elfv1 @opindex mabi=elfv1 diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 698a744..58b0ef3 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,11 @@ +2018-12-07 Peter Bergner <bergner@linux.ibm.com> + + PR target/87496 + * gcc.target/powerpc/pr87496.c: Rename from this... + * gcc.target/powerpc/pr87496-1.c: ...to this. Update comment. + * gcc.target/powerpc/pr87496-2.c: New test. + * gcc.target/powerpc/pr87496-3.c: New test. + 2018-12-07 Kyrylo Tkachov <kyrylo.tkachov@arm.com> * gcc.target/aarch64/sve/override_sve_width_1.c: New test. diff --git a/gcc/testsuite/gcc.target/powerpc/pr87496.c b/gcc/testsuite/gcc.target/powerpc/pr87496-1.c index b2ebc46..37ca8bb 100644 --- a/gcc/testsuite/gcc.target/powerpc/pr87496.c +++ b/gcc/testsuite/gcc.target/powerpc/pr87496-1.c @@ -1,4 +1,4 @@ -/* PR target/87496.c */ +/* PR target/87496 */ /* { dg-do compile { target { powerpc*-*-* && lp64 } } } */ /* { dg-skip-if "" { powerpc*-*-darwin* } } */ /* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power7" } } */ diff --git a/gcc/testsuite/gcc.target/powerpc/pr87496-2.c b/gcc/testsuite/gcc.target/powerpc/pr87496-2.c new file mode 100644 index 0000000..032c954 --- /dev/null +++ b/gcc/testsuite/gcc.target/powerpc/pr87496-2.c @@ -0,0 +1,9 @@ +/* PR target/87496 */ +/* { dg-do compile { target { powerpc*-*-* } } } */ +/* { dg-skip-if "" { powerpc*-*-darwin* } } */ +/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power7" } } */ +/* { dg-options "-O2 -mcpu=power7 -mabi=ieeelongdouble -mlong-double-64 -Wno-psabi" } */ + +int i; + +/* { dg-error "'-mabi=ieeelongdouble' requires '-mlong-double-128'" "PR87496" { target *-*-* } 0 } */ diff --git a/gcc/testsuite/gcc.target/powerpc/pr87496-3.c b/gcc/testsuite/gcc.target/powerpc/pr87496-3.c new file mode 100644 index 0000000..1be3997 --- /dev/null +++ b/gcc/testsuite/gcc.target/powerpc/pr87496-3.c @@ -0,0 +1,8 @@ +/* PR target/87496 */ +/* { dg-do compile { target { powerpc*-*-* } } } */ +/* { dg-skip-if "" { powerpc*-*-darwin* } } */ +/* { dg-options "-O2 -mabi=ibmlongdouble -mlong-double-64 -Wno-psabi" } */ + +int i; + +/* { dg-error "'-mabi=ibmlongdouble' requires '-mlong-double-128'" "PR87496" { target *-*-* } 0 } */ |