OSDN Git Service

2008-07-31 Hristian Kirtchev <kirtchev@adacore.com>
authorcharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 31 Jul 2008 13:26:40 +0000 (13:26 +0000)
committercharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 31 Jul 2008 13:26:40 +0000 (13:26 +0000)
* sem_ch6.adb (Disambiguate_Spec): Continue the disambiguation if the
corresponding spec is a primitive wrapper. Update comment.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@138406 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ada/sem_ch6.adb

index 33cb73d..6583b72 100644 (file)
@@ -1564,9 +1564,14 @@ package body Sem_Ch6 is
          --  Subprogram_Specification. In such cases, we undo the change
          --  made by the analysis of the specification and try to find the
          --  spec again.
+         --  Note that wrappers already have their corresponding specs and
+         --  bodies set during their creation, so if the candidate spec is
+         --  a wrapper, then we definately need to swap all types to their
+         --  original concurrent status.
 
-         if No (Spec_N) then
-
+         if No (Spec_N)
+           or else Is_Primitive_Wrapper (Spec_N)
+         then
             --  Restore all references of corresponding record types to the
             --  original concurrent types.