From: Eric Botcazou Date: Thu, 16 Nov 2023 09:29:23 +0000 (+0100) Subject: ada: Fix wrong size value output with -gnatR -gnatc X-Git-Tag: basepoints/gcc-15~4223 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7eaf95689bf495ab07473951ededa835eb618123;p=thirdparty%2Fgcc.git ada: Fix wrong size value output with -gnatR -gnatc This happens when a parameter is involved in the computation. gcc/ada/ * gcc-interface/decl.cc (annotate_value): Apply the same processing for parameters as for variables. --- diff --git a/gcc/ada/gcc-interface/decl.cc b/gcc/ada/gcc-interface/decl.cc index c446b1461790..d2456bfbc011 100644 --- a/gcc/ada/gcc-interface/decl.cc +++ b/gcc/ada/gcc-interface/decl.cc @@ -8897,6 +8897,7 @@ annotate_value (tree gnu_size) return No_Uint; break; + case PARM_DECL: case VAR_DECL: tcode = Dynamic_Val; ops[0] = UI_From_Int (++var_count);