diff options
author | Eric Botcazou <ebotcazou@adacore.com> | 2023-02-14 13:27:18 +0100 |
---|---|---|
committer | Eric Botcazou <ebotcazou@adacore.com> | 2023-02-14 13:27:18 +0100 |
commit | 1434eee54e57ad4839c0697f1294f9e8fe0a3044 (patch) | |
tree | da2846f853832ef36475a49fec7616de51c1b26a /gcc/gimplify.cc | |
parent | a16fc9333f1762d9b5a9da7239fe6a5cc9a6d190 (diff) | |
download | gcc-1434eee54e57ad4839c0697f1294f9e8fe0a3044.zip gcc-1434eee54e57ad4839c0697f1294f9e8fe0a3044.tar.gz gcc-1434eee54e57ad4839c0697f1294f9e8fe0a3044.tar.bz2 |
Fix small regression in Ada
gcc/
* gimplify.cc (gimplify_save_expr): Add missing guard.
gcc/ada/
* gcc-interface/trans.cc (gnat_gimplify_expr): Add missing guard.
gcc/testsuite/
* gnat.dg/shift2.adb: New test.
Diffstat (limited to 'gcc/gimplify.cc')
-rw-r--r-- | gcc/gimplify.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/gimplify.cc b/gcc/gimplify.cc index 1b362dd..9684515 100644 --- a/gcc/gimplify.cc +++ b/gcc/gimplify.cc @@ -6441,7 +6441,7 @@ gimplify_save_expr (tree *expr_p, gimple_seq *pre_p, gimple_seq *post_p) gcc_assert (TREE_CODE (*expr_p) == SAVE_EXPR); val = TREE_OPERAND (*expr_p, 0); - if (TREE_TYPE (val) == error_mark_node) + if (val && TREE_TYPE (val) == error_mark_node) return GS_ERROR; /* If the SAVE_EXPR has not been resolved, then evaluate it once. */ |