+2019-05-28 Eric Botcazou <ebotcazou@adacore.com>
+
+ * gcc-interface/decl.c (intrin_arglists_compatible_p): Do not return
+ false if the internal builtin uses a variable list.
+
2019-05-27 Eric Botcazou <ebotcazou@adacore.com>
* gcc-interface/trans.c (Call_to_gnu): Do not initialize the temporary
if (!ada_type && !btin_type)
break;
- /* If one list is shorter than the other, they fail to match. */
- if (!ada_type || !btin_type)
- return false;
+ /* If the internal builtin uses a variable list, accept anything. */
+ if (!btin_type)
+ break;
/* If we're done with the Ada args and not with the internal builtin
args, or the other way around, complain. */
+2019-05-28 Eric Botcazou <ebotcazou@adacore.com>
+
+ * gnat.dg/prefetch1.ad[sb]: New test.
+
2019-05-27 Iain Sandoe <iain@sandoe.co.uk>
* gcc.target/i386/pr22076.c: Adjust options to
--- /dev/null
+-- { dg-do compile }
+
+package body Prefetch1 is
+
+ procedure Prefetch_1 (Addr : System.Address);
+ pragma Import (Intrinsic, Prefetch_1, "__builtin_prefetch");
+
+ procedure Prefetch_2 (Addr : System.Address; RW : Integer);
+ pragma Import (Intrinsic, Prefetch_2, "__builtin_prefetch");
+
+ procedure Prefetch_3 (Addr : System.Address; RW : Integer; Locality : Integer);
+ pragma Import (Intrinsic, Prefetch_3, "__builtin_prefetch");
+
+ procedure My_Proc1 (Addr : System.Address) is
+ begin
+ Prefetch_1 (Addr);
+ end;
+
+ procedure My_Proc2 (Addr : System.Address) is
+ begin
+ Prefetch_2 (Addr, 1);
+ end;
+
+ procedure My_Proc3 (Addr : System.Address) is
+ begin
+ Prefetch_3 (Addr, 1, 1);
+ end;
+
+end Prefetch1;
--- /dev/null
+with System;
+
+package Prefetch1 is
+
+ procedure My_Proc1 (Addr : System.Address);
+ procedure My_Proc2 (Addr : System.Address);
+ procedure My_Proc3 (Addr : System.Address);
+
+end Prefetch1;