[COMMITTED] ada: Fix wrong size value output with -gnatR -gnatc

Message ID 20231128094028.2971453-1-poulhies@adacore.com
State Committed
Commit 7eaf95689bf495ab07473951ededa835eb618123
Headers
Series [COMMITTED] ada: Fix wrong size value output with -gnatR -gnatc |

Checks

Context Check Description
linaro-tcwg-bot/tcwg_gcc_build--master-aarch64 warning Patch is already merged
linaro-tcwg-bot/tcwg_gcc_build--master-arm warning Patch is already merged

Commit Message

Marc Poulhiès Nov. 28, 2023, 9:40 a.m. UTC
  From: Eric Botcazou <ebotcazou@adacore.com>

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.

Tested on x86_64-pc-linux-gnu, committed on master.

---
 gcc/ada/gcc-interface/decl.cc | 1 +
 1 file changed, 1 insertion(+)
  

Patch

diff --git a/gcc/ada/gcc-interface/decl.cc b/gcc/ada/gcc-interface/decl.cc
index c446b146179..d2456bfbc01 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);