* genoutput.c (process_template): Add sanity checking for '@' templates.
authorhubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 13 Dec 2000 16:26:45 +0000 (16:26 +0000)
committerhubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 13 Dec 2000 16:26:45 +0000 (16:26 +0000)
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@38220 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/genoutput.c

index db3256e..683cf71 100644 (file)
@@ -1,3 +1,7 @@
+Wed Dec 13 17:25:32 MET 2000  Jan Hubicka  <jh@suse.cz>
+
+       * genoutput.c (process_template): Add sanity checking for '@' templates.
+
 2000-12-13  Bernd Schmidt  <bernds@redhat.co.uk>
 
        * simplify-rtx.c (cselib_finish): Free reg_values and used_regs
index a5674c9..dc36d46 100644 (file)
@@ -701,6 +701,15 @@ process_template (d, template)
          printf ("\",\n");
          i++;
        }
+      if (i == 1)
+       message_with_line (d->lineno,
+                          "'@' is redundant for output template with single alternative");
+      if (i != d->n_alternatives)
+       {
+         message_with_line (d->lineno,
+                            "Wrong number of alternatives in the output template");
+         have_error = 1;
+       }
 
       printf ("};\n");
     }