diff options
author | Tobias Burnus <burnus@gcc.gnu.org> | 2019-12-18 17:51:08 +0100 |
---|---|---|
committer | Tobias Burnus <burnus@gcc.gnu.org> | 2019-12-18 17:51:08 +0100 |
commit | c80c9e26dec56891897be0e468c004a588bedceb (patch) | |
tree | b3a67265caa05e984ff61c5a166c5181175dba51 /libgomp | |
parent | 6573d760cdfec1b4577b268ce1ff19cecc4c9cbd (diff) | |
download | gcc-c80c9e26dec56891897be0e468c004a588bedceb.zip gcc-c80c9e26dec56891897be0e468c004a588bedceb.tar.gz gcc-c80c9e26dec56891897be0e468c004a588bedceb.tar.bz2 |
PR 86416 – improve lto1 diagnostic if a mode does not exist
PR middle-end/86416
* Makefile.in (CFLAGS-lto-streamer-in.o): Pass target_noncanonical on.
* lto-streamer-in.c (lto_input_mode_table): Improve unsupported-mode
diagnostic.
PR middle-end/86416
* testsuite/libgomp.c/pr86416-1.c: New.
* testsuite/libgomp.c/pr86416-2.c: New.
From-SVN: r279528
Diffstat (limited to 'libgomp')
-rw-r--r-- | libgomp/ChangeLog | 6 | ||||
-rw-r--r-- | libgomp/testsuite/libgomp.c/pr86416-1.c | 22 | ||||
-rw-r--r-- | libgomp/testsuite/libgomp.c/pr86416-2.c | 22 |
3 files changed, 50 insertions, 0 deletions
diff --git a/libgomp/ChangeLog b/libgomp/ChangeLog index b46a6825..3c83417 100644 --- a/libgomp/ChangeLog +++ b/libgomp/ChangeLog @@ -1,3 +1,9 @@ +2019-12-18 Tobias Burnus <tobias@codesourcery.com> + + PR middle-end/86416 + * testsuite/libgomp.c/pr86416-1.c: New. + * testsuite/libgomp.c/pr86416-2.c: New. + 2019-12-17 Tobias Burnus <tobias@codesourcery.com> * config/accel/openacc.f90 (module openacc_kinds): Use 'PUBLIC' to mark diff --git a/libgomp/testsuite/libgomp.c/pr86416-1.c b/libgomp/testsuite/libgomp.c/pr86416-1.c new file mode 100644 index 0000000..4ab523d --- /dev/null +++ b/libgomp/testsuite/libgomp.c/pr86416-1.c @@ -0,0 +1,22 @@ +/* { dg-do link } */ +/* { dg-require-effective-target large_long_double } */ + +/* PR middle-end/86416 */ +/* { dg-error "bit-precision floating-point numbers unsupported .mode '.F'." "" { target offload_device } 0 } */ +/* { dg-excess-errors "Follow-up errors from mkoffload and lto-wrapper" { target offload_device } } */ + +#include <stdlib.h> /* For abort. */ + +long double foo (long double x) +{ + #pragma omp target map(tofrom:x) + x *= 2.0; + return x; +} + +int main() +{ + long double v = foo (10.0q) - 20.0q; + if (v > 1.0e-5 || v < -1.0e-5) abort(); + return 0; +} diff --git a/libgomp/testsuite/libgomp.c/pr86416-2.c b/libgomp/testsuite/libgomp.c/pr86416-2.c new file mode 100644 index 0000000..f104da7 --- /dev/null +++ b/libgomp/testsuite/libgomp.c/pr86416-2.c @@ -0,0 +1,22 @@ +/* { dg-do link { target __float128 } } */ +/* { dg-add-options __float128 } */ + +/* PR middle-end/86416 */ +/* { dg-error "bit-precision floating-point numbers unsupported .mode '.F'." "" { target offload_device } 0 } */ +/* { dg-excess-errors "Follow-up errors from mkoffload and lto-wrapper" { target offload_device } } */ + +#include <stdlib.h> /* For abort. */ + +__float128 foo(__float128 y) +{ + #pragma omp target map(tofrom: y) + y *= 4.0; + return y; +} + +int main() +{ + __float128 v = foo (5.0L) - 20.0L; + if (v > 1.0e-5 || v < -1.0e-5) abort(); + return 0; +} |