]> git.ipfire.org Git - thirdparty/gcc.git/commit
[Ada] Avoid crash for -gnatR -gnatc
authorBob Duff <duff@adacore.com>
Thu, 27 Jan 2022 16:13:41 +0000 (11:13 -0500)
committerPierre-Marie de Rodat <derodat@adacore.com>
Wed, 11 May 2022 08:53:17 +0000 (08:53 +0000)
commitd7ca4dfe8dc96c7e78a8fbfedda2558fca2aa277
tree56e2c0b0bd104a4698d319bdb3a0bd1085c20597
parente7d9fdf5e0ee4c34a880139254340b4165016289
[Ada] Avoid crash for -gnatR -gnatc

If the -gnatR -gnatc are both given, then the compiler crashes.  This
patch fixes that, and avoids printing the uncomputed sizes and
alignments that were causing the crash. (Previous versions of the
compiler printed incorrect values in such cases.)

gcc/ada/

* repinfo.adb (List_Object_Info): Do not try to print values
that have not been computed (and so are No_Uint).
(Rep_Not_Constant): Reverse sense and change name to
Compile_Time_Known_Rep. This makes the code at call sites a
little more readable. Simplify code to a single return
statement.
gcc/ada/repinfo.adb