public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc/devel/c++-modules] openmp: fix UBSAN error at gcc/fortran/openmp.c:4737
@ 2020-08-27 18:11 Nathan Sidwell
0 siblings, 0 replies; only message in thread
From: Nathan Sidwell @ 2020-08-27 18:11 UTC (permalink / raw)
To: gcc-cvs
https://gcc.gnu.org/g:5625b2c56acdcce9733b970b1fd2ff1349ebe657
commit 5625b2c56acdcce9733b970b1fd2ff1349ebe657
Author: Martin Liska <mliska@suse.cz>
Date: Mon Aug 17 10:37:24 2020 +0200
openmp: fix UBSAN error at gcc/fortran/openmp.c:4737
Since 21cfe724cbdc30612bf1ef59b26f19ada2210832 there's a new
OMP_LIST_NONTEMPORAL value, but it was missing in
resolve_omp_clauses static array that is defined at the function
beginning:
./xgcc -B. /home/marxin/Programming/gcc/gcc/testsuite/gfortran.dg/gomp/nontemporal-1.f90 -fopenmp -c
../../gcc/fortran/openmp.c:4737:28: runtime error: index 21 out of bounds for type 'char *[21]'
#0 0xbdb956 in resolve_omp_clauses ../../gcc/fortran/openmp.c:4737
#1 0xbeb076 in resolve_omp_do ../../gcc/fortran/openmp.c:6139
#2 0xbf029a in gfc_resolve_omp_directive(gfc_code*, gfc_namespace*) ../../gcc/fortran/openmp.c:6792
#3 0xcb6363 in gfc_resolve_code(gfc_code*, gfc_namespace*) ../../gcc/fortran/resolve.c:12185
#4 0xcef8cf in resolve_codes ../../gcc/fortran/resolve.c:17303
gcc/fortran/ChangeLog:
* openmp.c (resolve_omp_clauses): Add NONTEMPORAL to clause
names.
Diff:
---
gcc/fortran/openmp.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/gcc/fortran/openmp.c b/gcc/fortran/openmp.c
index c44a2530b88..60d8e5573c2 100644
--- a/gcc/fortran/openmp.c
+++ b/gcc/fortran/openmp.c
@@ -4369,7 +4369,8 @@ resolve_omp_clauses (gfc_code *code, gfc_omp_clauses *omp_clauses,
= { "PRIVATE", "FIRSTPRIVATE", "LASTPRIVATE", "COPYPRIVATE", "SHARED",
"COPYIN", "UNIFORM", "ALIGNED", "LINEAR", "DEPEND", "MAP",
"TO", "FROM", "REDUCTION", "DEVICE_RESIDENT", "LINK", "USE_DEVICE",
- "CACHE", "IS_DEVICE_PTR", "USE_DEVICE_PTR", "USE_DEVICE_ADDR" };
+ "CACHE", "IS_DEVICE_PTR", "USE_DEVICE_PTR", "USE_DEVICE_ADDR",
+ "NONTEMPORAL" };
if (omp_clauses == NULL)
return;
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2020-08-27 18:11 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-08-27 18:11 [gcc/devel/c++-modules] openmp: fix UBSAN error at gcc/fortran/openmp.c:4737 Nathan Sidwell
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).