From: Peter Bergner Date: Fri, 7 Dec 2018 17:33:55 +0000 (+0000) Subject: re PR target/87496 (ICE in aggregate_value_p at gcc/function.c:2046) X-Git-Tag: upstream/12.2.0~27509 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=96e14fda0dca4d79479137844b4457305fad2c3f;p=platform%2Fupstream%2Fgcc.git 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 --- 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 + + 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 * 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 + + 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 * 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 similarity index 94% rename from gcc/testsuite/gcc.target/powerpc/pr87496.c rename to 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 } */