From: Bob Duff Date: Mon, 21 Jun 2021 11:08:03 +0000 (-0400) Subject: [Ada] Fix assertion in GNATprove_Mode X-Git-Tag: basepoints/gcc-13~4619 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b8d31ebcfa99599fb2c213e319aee4c6cf6e4f72;p=thirdparty%2Fgcc.git [Ada] Fix assertion in GNATprove_Mode gcc/ada/ * gnat1drv.adb (Gnat1drv): Avoid calling List_Rep_Info in Generate_SCIL and GNATprove_Mode. * repinfo.adb (List_Common_Type_Info): Fix comment. --- diff --git a/gcc/ada/gnat1drv.adb b/gcc/ada/gnat1drv.adb index 6f65d7480f2d..95c1537c4847 100644 --- a/gcc/ada/gnat1drv.adb +++ b/gcc/ada/gnat1drv.adb @@ -1616,7 +1616,14 @@ begin Errout.Finalize (Last_Call => True); Errout.Output_Messages; - Repinfo.List_Rep_Info (Ttypes.Bytes_Big_Endian); + + -- Back annotation of representation info is not done in CodePeer and + -- SPARK modes. + + if not (Generate_SCIL or GNATprove_Mode) then + Repinfo.List_Rep_Info (Ttypes.Bytes_Big_Endian); + end if; + Inline.List_Inlining_Info; -- Only write the library if the backend did not generate any error diff --git a/gcc/ada/repinfo.adb b/gcc/ada/repinfo.adb index 148de536f96c..11e35e778388 100644 --- a/gcc/ada/repinfo.adb +++ b/gcc/ada/repinfo.adb @@ -422,7 +422,8 @@ package body Repinfo is Write_Line (";"); end if; - -- Alignment is not always set for task and protected types + -- Alignment is not always set for task, protected, and class-wide + -- types. else pragma Assert