diff options
author | Martin Liska <mliska@suse.cz> | 2022-09-26 21:05:44 +0200 |
---|---|---|
committer | Martin Liska <mliska@suse.cz> | 2022-09-26 21:05:44 +0200 |
commit | 3c527a35fa428b727807c81f1225a5e0025446c1 (patch) | |
tree | 787e21d7bf8a1d85ac7b9ccee784909e85ebf61b /libgomp | |
parent | c9c59aa19c0b7159636763294b7b0c87c696d675 (diff) | |
parent | 7701ea4a70a5a5c0fd977da90a30ffc4f3f87617 (diff) | |
download | gcc-3c527a35fa428b727807c81f1225a5e0025446c1.zip gcc-3c527a35fa428b727807c81f1225a5e0025446c1.tar.gz gcc-3c527a35fa428b727807c81f1225a5e0025446c1.tar.bz2 |
Merge branch 'master' into devel/sphinx
Diffstat (limited to 'libgomp')
-rw-r--r-- | libgomp/ChangeLog | 5 | ||||
-rw-r--r-- | libgomp/testsuite/libgomp.c-c++-common/pr106981.c | 19 |
2 files changed, 24 insertions, 0 deletions
diff --git a/libgomp/ChangeLog b/libgomp/ChangeLog index d3b4758..a5830a4 100644 --- a/libgomp/ChangeLog +++ b/libgomp/ChangeLog @@ -1,3 +1,8 @@ +2022-09-24 Jakub Jelinek <jakub@redhat.com> + + PR c/106981 + * testsuite/libgomp.c-c++-common/pr106981.c: New test. + 2022-09-14 Julian Brown <julian@codesourcery.com> * testsuite/libgomp.oacc-c-c++-common/deep-copy-15.c: New test. diff --git a/libgomp/testsuite/libgomp.c-c++-common/pr106981.c b/libgomp/testsuite/libgomp.c-c++-common/pr106981.c new file mode 100644 index 0000000..ed48d27 --- /dev/null +++ b/libgomp/testsuite/libgomp.c-c++-common/pr106981.c @@ -0,0 +1,19 @@ +/* PR c/106981 */ + +int +main () +{ + int a[0x101]; + unsigned int b = 0x100; + if ((unsigned char) b || (unsigned short) b != 0x100) + return 0; + a[0] = 0; + a[0x100] = 42; + #pragma omp atomic update + a[(unsigned char) b] = a[(unsigned short) b] + a[(unsigned char) b]; + #pragma omp atomic update + a[(unsigned char) b] = a[(unsigned char) b] + a[(unsigned short) b]; + if (a[0] != 84 || a[0x100] != 42) + __builtin_abort (); + return 0; +} |