This patches fixes a regression introduced when adding support for
aggregate projects. The latter now accept a new list attribute called
Project_Path. But if the user already has a string variable by this name,
the project can no longer be loaded by GNAT. The following project should
be loaded with success:

project Default is
   Project_Path := "value";
end Default;

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

2011-10-24  Emmanuel Briot  <br...@adacore.com>

        * prj-proc.adb (Process_Expression_Variable_Decl): No special
        handling for Project_Path unless it is an attribute.

Index: prj-proc.adb
===================================================================
--- prj-proc.adb        (revision 180365)
+++ prj-proc.adb        (working copy)
@@ -2053,7 +2053,7 @@
             Shared.Variable_Elements.Table (Var).Value := New_Value;
          end if;
 
-         if Name = Snames.Name_Project_Path then
+         if Is_Attribute and then Name = Snames.Name_Project_Path then
             if In_Tree.Is_Root_Tree then
                declare
                   Val : String_List_Id := New_Value.Values;

Reply via email to