diff mbox

[Ada] Spurious dimensional error in SPARK mode

Message ID 20170113111703.GA102095@adacore.com
State New
Headers show

Commit Message

Arnaud Charlet Jan. 13, 2017, 11:17 a.m. UTC
THis patch removes a spurious error on mismatched dimensions in the body of a
subprogram that is inlined for SPARK purposes.

Tested on x86_64-pc-linux-gnu, committed on trunk

2017-01-13  Ed Schonberg  <schonberg@adacore.com>

	* sem_ch8.adb (Analyze_Expanded_Name): Perfrom dimension analysis
	even if entity is already set, because the node may be renalyzed
	after inlining transformations.
diff mbox

Patch

Index: sem_ch8.adb
===================================================================
--- sem_ch8.adb	(revision 244418)
+++ sem_ch8.adb	(working copy)
@@ -609,11 +609,12 @@ 
             Set_Etype (N, Etype (Entity (N)));
          end if;
 
-         return;
       else
          Find_Expanded_Name (N);
       end if;
 
+      --  In either case, propagate dimension of entity to expanded name
+
       Analyze_Dimension (N);
    end Analyze_Expanded_Name;