> I will check, thanks for the reduced testcase. It seems like another case
> where we get predicate wrong that ought to be fixed, of course.

You're welcome.  Another bug introduced by the patch:

eric@polaris:~/build/gcc/native> gcc/xgcc -Bgcc -S opt33.adb -O
/home/eric/install/gcc/lib64/gcc/x86_64-suse-linux/4.9.0/adainclude/a-
coorse.adb: In function 'Opt33.My_Ordered_Sets.To_Set':
/home/eric/install/gcc/lib64/gcc/x86_64-suse-linux/4.9.0/adainclude/a-
coorse.adb:1983:4: error: static chain with function that doesn't use one
.builtin_unreachable (&tree, node_54, 1, 0B); [static-chain: &FRAME.437]
/home/eric/install/gcc/lib64/gcc/x86_64-suse-linux/4.9.0/adainclude/a-
coorse.adb:1983:4: error: static chain with function that doesn't use one
.builtin_unreachable (&tree, node_54, _60, node_57); [static-chain: 
&FRAME.437]
+===========================GNAT BUG DETECTED==============================+
| 4.9.0 20140327 (experimental) [trunk revision 208879] (x86_64-suse-linux) 
GCC error:|
| verify_gimple failed                                                     |
| Error detected around /home/eric/install/gcc/lib64/gcc/x86_64-suse-
linux/4.9.0/adainclude/a-coorse.adb:1983:4|

You can install the testcase as gnat.dg/opt33.adb in the testsuite.

-- 
Eric Botcazou
-- { dg-do compile }
-- { dg-options "-O" }

with Ada.Containers.Ordered_Sets;
with Ada.Strings.Unbounded;

procedure Opt33 is

   type Rec is record
      Name : Ada.Strings.Unbounded.Unbounded_String;
   end record;

   function "<" (Left : Rec; Right : Rec) return Boolean;

   package My_Ordered_Sets is new Ada.Containers.Ordered_Sets (Rec);

   protected type Data is
      procedure Do_It;
   private
      Set : My_Ordered_Sets.Set;
   end Data;

   function "<" (Left : Rec; Right : Rec) return Boolean is
   begin
      return False;
   end "<";

   protected body Data is
      procedure Do_It is
         procedure Dummy (Position : My_Ordered_Sets.Cursor) is
         begin
            null;
         end;
      begin
         Set.Iterate (Dummy'Access);
      end;
   end Data;

begin
   null;
end;

Reply via email to