diff mbox series

[Ada] Fix infinite recursion on dynamic record type with -gnatR4

Message ID 3410417.GgUAlypNoT@arcturus.home
State New
Headers show
Series [Ada] Fix infinite recursion on dynamic record type with -gnatR4 | expand

Commit Message

Eric Botcazou Aug. 30, 2019, 2:39 p.m. UTC
An oversight when -gnatR4 was invented.

Tested on x86_64-suse-linux, applied on the mainline.


2019-08-30  Eric Botcazou  <ebotcazou@adacore.com>

	* gcc-interface/decl.c (annotate_value) <CALL_EXPR>: Inline the call
	also if List_Representation_Info is greater than 3.
diff mbox series

Patch

Index: gcc-interface/decl.c
===================================================================
--- gcc-interface/decl.c	(revision 275174)
+++ gcc-interface/decl.c	(working copy)
@@ -8398,7 +8398,7 @@  annotate_value (tree gnu_size)
       /* In regular mode, inline back only if symbolic annotation is requested
 	 in order to avoid memory explosion on big discriminated record types.
 	 But not in ASIS mode, as symbolic annotation is required for DDA.  */
-      if (List_Representation_Info == 3 || type_annotate_only)
+      if (List_Representation_Info >= 3 || type_annotate_only)
 	{
 	  tree t = maybe_inline_call_in_expr (gnu_size);
 	  return t ? annotate_value (t) : No_Uint;