When raising Program_Error due to an incorrect Kind transition, print a
more informative debugging message.
Tested on x86_64-pc-linux-gnu, committed on trunk
2020-06-09 Bob Duff <d...@adacore.com>
gcc/ada/
* bindo-graphs.adb (Add_Edge_Kind_Check): Add the Image of the
old and new Kinds to the raise Program_Error message.
--- gcc/ada/bindo-graphs.adb
+++ gcc/ada/bindo-graphs.adb
@@ -1824,7 +1824,7 @@ package body Bindo.Graphs is
end case;
if not OK then
- raise Program_Error;
+ raise Program_Error with Kind'Img & "-->" & Attributes.Kind'Img;
end if;
end Add_Edge_Kind_Check;