aboutsummaryrefslogtreecommitdiff
path: root/gcc/omp-low.c
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2011-04-13 17:50:02 +0200
committerJakub Jelinek <jakub@gcc.gnu.org>2011-04-13 17:50:02 +0200
commit20790697dd24387ffbf4f97e46774edfcb0a7142 (patch)
tree0c13f4d4a47b9ebcbcd30c9e09f47ca6a8b0b2b1 /gcc/omp-low.c
parent9c76a19e8f83e9e9a154d1779115b5061687c97b (diff)
downloadgcc-20790697dd24387ffbf4f97e46774edfcb0a7142.zip
gcc-20790697dd24387ffbf4f97e46774edfcb0a7142.tar.gz
gcc-20790697dd24387ffbf4f97e46774edfcb0a7142.tar.bz2
re PR middle-end/48591 (OpenMP ICE with atomics on __float128 in 32-bit only i686 cc1)
PR middle-end/48591 * omp-low.c (expand_omp_atomic_fetch_op): Return false if decl is NULL. (expand_omp_atomic_pipeline): Return false if cmpxchg is NULL. * gcc.dg/gomp/pr48591.c: New test. * testsuite/libgomp.c/pr48591.c: New test. From-SVN: r172379
Diffstat (limited to 'gcc/omp-low.c')
-rw-r--r--gcc/omp-low.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/gcc/omp-low.c b/gcc/omp-low.c
index 8b2412c..bc7bf4a 100644
--- a/gcc/omp-low.c
+++ b/gcc/omp-low.c
@@ -5006,6 +5006,8 @@ expand_omp_atomic_fetch_op (basic_block load_bb,
return false;
decl = built_in_decls[base + index + 1];
+ if (decl == NULL_TREE)
+ return false;
itype = TREE_TYPE (TREE_TYPE (decl));
if (direct_optab_handler (optab, TYPE_MODE (itype)) == CODE_FOR_nothing)
@@ -5057,6 +5059,8 @@ expand_omp_atomic_pipeline (basic_block load_bb, basic_block store_bb,
edge e;
cmpxchg = built_in_decls[BUILT_IN_VAL_COMPARE_AND_SWAP_N + index + 1];
+ if (cmpxchg == NULL_TREE)
+ return false;
type = TYPE_MAIN_VARIANT (TREE_TYPE (TREE_TYPE (addr)));
itype = TREE_TYPE (TREE_TYPE (cmpxchg));