diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index 4553f1c1e24..9ad60015b0e 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -1,3 +1,12 @@ +2017-01-20 Arnaud Charlet + + * exp_ch3.adb: Reenable code. + +2017-01-20 Yannick Moy + + * sinfo.ads: Document lack of Do_Division_Check flag + on float exponentiation. + 2017-01-19 Javier Miranda * ghost.adb (Propagate_Ignored_Ghost_Code): Protect access to the diff --git a/gcc/ada/exp_ch3.adb b/gcc/ada/exp_ch3.adb index 4c34eb9dd6f..f4f457178bb 100644 --- a/gcc/ada/exp_ch3.adb +++ b/gcc/ada/exp_ch3.adb @@ -5901,10 +5901,7 @@ package body Exp_Ch3 is -- would otherwise make two copies. The RM allows removing redunant -- Adjust/Finalize calls, but does not allow insertion of extra ones. - -- This part is disabled for now, because it breaks CodePeer runs - - return (False -- ??? - and then Nkind (Expr_Q) = N_Explicit_Dereference + return (Nkind (Expr_Q) = N_Explicit_Dereference and then not Comes_From_Source (Expr_Q) and then Nkind (Original_Node (Expr_Q)) = N_Function_Call and then Nkind (Object_Definition (N)) in N_Has_Entity diff --git a/gcc/ada/sinfo.ads b/gcc/ada/sinfo.ads index 404630e3cea..bf938525d55 100644 --- a/gcc/ada/sinfo.ads +++ b/gcc/ada/sinfo.ads @@ -700,7 +700,10 @@ package Sinfo is -- analysis, on expression nodes that may trigger the corresponding -- check. The front end then inserts or not the check during expansion. In -- particular, these flags should also be correctly set in ASIS mode and - -- GNATprove mode. + -- GNATprove mode. As a special case, the front end does not insert a + -- Do_Division_Check flag on float exponentiation expressions, for the case + -- where the value is 0.0 and the exponent is negative, although this case + -- does lead to a division check failure. -- Note: the expander always takes care of the Do_Range check case, -- so this flag will never be set in the expanded tree passed to the