From 1f8fc1f458c4a66618c35d8e292fff6e9dce9f12 Mon Sep 17 00:00:00 2001 From: Eric Botcazou Date: Wed, 11 Nov 2020 13:53:01 +0100 Subject: Fix internal error with Shift_Right operator on signed type This is a regression present on the mainline and 10 branch in the form of an ICE with a shift operator applied to a variable of a signed type, and which is caused by a type mismatch. gcc/ada/ChangeLog: * gcc-interface/trans.c (gnat_to_gnu) : Also convert GNU_MAX_SHIFT if the type of the operation has been changed. * gcc-interface/utils.c (can_materialize_object_renaming_p): Add pair of missing parentheses. gcc/testsuite/ChangeLog: * gnat.dg/shift1.adb: New test. --- gcc/ada/gcc-interface/utils.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'gcc/ada/gcc-interface/utils.c') diff --git a/gcc/ada/gcc-interface/utils.c b/gcc/ada/gcc-interface/utils.c index d50872f..dfde06e 100644 --- a/gcc/ada/gcc-interface/utils.c +++ b/gcc/ada/gcc-interface/utils.c @@ -5837,7 +5837,7 @@ can_materialize_object_renaming_p (Node_Id expr) { expr = Original_Node (expr); - switch Nkind (expr) + switch (Nkind (expr)) { case N_Identifier: case N_Expanded_Name: -- cgit v1.1