]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
[multiple changes]
authorArnaud Charlet <charlet@gcc.gnu.org>
Mon, 17 Aug 2009 09:28:48 +0000 (11:28 +0200)
committerArnaud Charlet <charlet@gcc.gnu.org>
Mon, 17 Aug 2009 09:28:48 +0000 (11:28 +0200)
2009-08-17  Ed Schonberg  <schonberg@adacore.com>

* sem_ch3.adb (Access_Definition): Do not create an Itype reference for
an anonymous access type whose designated type is generic.

2009-08-17  Arnaud Charlet  <charlet@adacore.com>

* comperr.adb (Compiler_Abort): Do not generate a bug box when in
codepeer mode, friendlier.

From-SVN: r150824

gcc/ada/ChangeLog
gcc/ada/comperr.adb
gcc/ada/sem_ch3.adb

index f345b5d2379a6d01c52dbab93894eba21089edd9..10e15169911c402237114c3ef7c04fa993286a73 100644 (file)
@@ -1,3 +1,13 @@
+2009-08-17  Ed Schonberg  <schonberg@adacore.com>
+
+       * sem_ch3.adb (Access_Definition): Do not create an Itype reference for
+       an anonymous access type whose designated type is generic.
+
+2009-08-17  Arnaud Charlet  <charlet@adacore.com>
+
+       * comperr.adb (Compiler_Abort): Do not generate a bug box when in
+       codepeer mode, friendlier.
+
 2009-08-10  Laurent GUERBY  <laurent@guerby.net>
 
         * make.adb: Handle multilib
index 43680b1b4bbb6fe598fbb6b0633dc136ba711edf..da6c8a688ed31f596f47411ee92caf1822f8a087 100644 (file)
@@ -32,6 +32,7 @@ with Debug;    use Debug;
 with Errout;   use Errout;
 with Gnatvsn;  use Gnatvsn;
 with Namet;    use Namet;
+with Opt;      use Opt;
 with Osint;    use Osint;
 with Output;   use Output;
 with Sinput;   use Sinput;
@@ -121,19 +122,26 @@ package body Comperr is
       --  practical interface, since giving scary bug boxes on unsupported
       --  features is definitely not helpful.
 
+      --  Similarly if we are generating SCIL, an error message is sufficient
+      --  instead of generating a bug box.
+
       --  Note that the call to Error_Msg_N below sets Serious_Errors_Detected
       --  to 1, so we use the regular mechanism below in order to display a
       --  "compilation abandoned" message and exit, so we still know we have
       --  this case (and -gnatdk can still be used to get the bug box).
 
-      if VM_Target = CLI_Target
+      if (VM_Target = CLI_Target or else CodePeer_Mode)
         and then Serious_Errors_Detected = 0
         and then not Debug_Flag_K
         and then Sloc (Current_Error_Node) > No_Location
       then
-         Error_Msg_N
-           ("unsupported construct in this context",
-            Current_Error_Node);
+         if VM_Target = CLI_Target then
+            Error_Msg_N
+              ("unsupported construct in this context",
+               Current_Error_Node);
+         else
+            Error_Msg_N ("cannot generate 'S'C'I'L", Current_Error_Node);
+         end if;
       end if;
 
       --  If any errors have already occurred, then we guess that the abort
index adea69db29eb2bcc1dc74ce9e2a34c042a2adac1..8b24cd6d07173a29418088e2292e9b202880ac1e 100644 (file)
@@ -939,9 +939,12 @@ package body Sem_Ch3 is
       --  type declaration. In either case, do not create a reference for a
       --  type obtained through a limited_with clause, because this would
       --  introduce semantic dependencies.
+      --  Similarly, do not create a reference if the designated type is a
+      --  generic formal, because no use of it will reach the backend.
 
       elsif Nkind (Related_Nod) = N_Function_Specification
         and then not From_With_Type (Desig_Type)
+        and then not Is_Generic_Type (Desig_Type)
       then
          if Present (Enclosing_Prot_Type) then
             Build_Itype_Reference (Anon_Type, Parent (Enclosing_Prot_Type));