public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: "Sofiane Naci" <sofiane.naci@arm.com>
To: <gcc-patches@gcc.gnu.org>
Subject: [AArch64] Add new testcases and improve diagnostics
Date: Fri, 17 Aug 2012 14:57:00 -0000	[thread overview]
Message-ID: <000001cd7c88$c1ba7030$452f5090$@naci@arm.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 619 bytes --]

Hi,

I've just committed the attached patch on the AArch64 branch to add new
testcases and improve diagnostics.

Thanks
Sofiane

-----

r190481 | sofiane | 2012-08-17 15:53:50 +0100 (Fri, 17 Aug 2012) | 11 lines

        [AArch64] Add new testcases to improve diagnostics.

        gcc/
        * config/aarch64/aarch64-builtins.c (aarch64_simd_expand_args): Fix
        diagnostics.

        gcc/testsuite
        * gcc.target/aarch64/arch-diagnostics-*.c: New testcase.
        * gcc.target/aarch64/arg-type-diagnostics-1.c: Likewise.
        * gcc.target/aarch64/cpu-diagnostics-*.c: Likewise.

[-- Attachment #2: aarch64-add-diagnostics.patch --]
[-- Type: application/octet-stream, Size: 5405 bytes --]

Index: gcc/testsuite/gcc.target/aarch64/arch-diagnostics-1.c
===================================================================
--- gcc/testsuite/gcc.target/aarch64/arch-diagnostics-1.c	(revision 0)
+++ gcc/testsuite/gcc.target/aarch64/arch-diagnostics-1.c	(revision 0)
@@ -0,0 +1,7 @@
+/* { dg-error "unknown" "" {target "aarch64*-*-*" } } */
+/* { dg-options "-O2 -march=dummy" } */
+
+void f ()
+{
+  return;
+}

Property changes on: gcc/testsuite/gcc.target/aarch64/arch-diagnostics-1.c
___________________________________________________________________
Added: svn:keywords
   + Rev Date Author URL Id
Added: svn:eol-style
   + native

Index: gcc/testsuite/gcc.target/aarch64/cpu-diagnostics-1.c
===================================================================
--- gcc/testsuite/gcc.target/aarch64/cpu-diagnostics-1.c	(revision 0)
+++ gcc/testsuite/gcc.target/aarch64/cpu-diagnostics-1.c	(revision 0)
@@ -0,0 +1,7 @@
+/* { dg-error "unknown" "" {target "aarch64*-*-*" } } */
+/* { dg-options "-O2 -mcpu=dummy" } */
+
+void f ()
+{
+  return;
+}

Property changes on: gcc/testsuite/gcc.target/aarch64/cpu-diagnostics-1.c
___________________________________________________________________
Added: svn:keywords
   + Rev Date Author URL Id
Added: svn:eol-style
   + native

Index: gcc/testsuite/gcc.target/aarch64/cpu-diagnostics-3.c
===================================================================
--- gcc/testsuite/gcc.target/aarch64/cpu-diagnostics-3.c	(revision 0)
+++ gcc/testsuite/gcc.target/aarch64/cpu-diagnostics-3.c	(revision 0)
@@ -0,0 +1,7 @@
+/* { dg-error "unknown" "" {target "aarch64*-*-*" } } */
+/* { dg-options "-O2 -mcpu=example-1+dummy" } */
+
+void f ()
+{
+  return;
+}

Property changes on: gcc/testsuite/gcc.target/aarch64/cpu-diagnostics-3.c
___________________________________________________________________
Added: svn:keywords
   + Rev Date Author URL Id
Added: svn:eol-style
   + native

Index: gcc/testsuite/gcc.target/aarch64/arch-diagnostics-2.c
===================================================================
--- gcc/testsuite/gcc.target/aarch64/arch-diagnostics-2.c	(revision 0)
+++ gcc/testsuite/gcc.target/aarch64/arch-diagnostics-2.c	(revision 0)
@@ -0,0 +1,7 @@
+/* { dg-error "missing" "" {target "aarch64*-*-*" } } */
+/* { dg-options "-O2 -march=+dummy" } */
+
+void f ()
+{
+  return;
+}

Property changes on: gcc/testsuite/gcc.target/aarch64/arch-diagnostics-2.c
___________________________________________________________________
Added: svn:keywords
   + Rev Date Author URL Id
Added: svn:eol-style
   + native

Index: gcc/testsuite/gcc.target/aarch64/arg-type-diagnostics-1.c
===================================================================
--- gcc/testsuite/gcc.target/aarch64/arg-type-diagnostics-1.c	(revision 0)
+++ gcc/testsuite/gcc.target/aarch64/arg-type-diagnostics-1.c	(revision 0)
@@ -0,0 +1,15 @@
+/* { dg-do compile { target { aarch64*-*-* } } } */
+/* { dg-options "-O2" } */
+
+#include "arm_neon.h"
+
+void foo ()
+{
+  int a;
+  int32x2_t arg1;
+  int32x2_t arg2;
+  int32x2_t result;
+  arg1 = vcreate_s32 (UINT64_C (0x0000ffffffffffff));
+  arg2 = vcreate_s32 (UINT64_C (0x16497fffffffffff));
+  result = __builtin_aarch64_srsra_nv2si (arg1, arg2, a); /* { dg-error "incompatible type for argument" } */
+}

Property changes on: gcc/testsuite/gcc.target/aarch64/arg-type-diagnostics-1.c
___________________________________________________________________
Added: svn:keywords
   + Rev Date Author URL Id
Added: svn:eol-style
   + native

Index: gcc/testsuite/gcc.target/aarch64/cpu-diagnostics-2.c
===================================================================
--- gcc/testsuite/gcc.target/aarch64/cpu-diagnostics-2.c	(revision 0)
+++ gcc/testsuite/gcc.target/aarch64/cpu-diagnostics-2.c	(revision 0)
@@ -0,0 +1,7 @@
+/* { dg-error "missing" "" {target "aarch64*-*-*" } } */
+/* { dg-options "-O2 -mcpu=example-1+no" } */
+
+void f ()
+{
+  return;
+}

Property changes on: gcc/testsuite/gcc.target/aarch64/cpu-diagnostics-2.c
___________________________________________________________________
Added: svn:keywords
   + Rev Date Author URL Id
Added: svn:eol-style
   + native

Index: gcc/testsuite/gcc.target/aarch64/cpu-diagnostics-4.c
===================================================================
--- gcc/testsuite/gcc.target/aarch64/cpu-diagnostics-4.c	(revision 0)
+++ gcc/testsuite/gcc.target/aarch64/cpu-diagnostics-4.c	(revision 0)
@@ -0,0 +1,7 @@
+/* { dg-error "missing" "" {target "aarch64*-*-*" } } */
+/* { dg-options "-O2 -mcpu=+dummy" } */
+
+void f ()
+{
+  return;
+}

Property changes on: gcc/testsuite/gcc.target/aarch64/cpu-diagnostics-4.c
___________________________________________________________________
Added: svn:keywords
   + Rev Date Author URL Id
Added: svn:eol-style
   + native

Index: gcc/config/aarch64/aarch64-builtins.c
===================================================================
--- gcc/config/aarch64/aarch64-builtins.c	(revision 190343)
+++ gcc/config/aarch64/aarch64-builtins.c	(working copy)
@@ -1122,8 +1122,7 @@
 	    case SIMD_ARG_CONSTANT:
 	      if (!(*insn_data[icode].operand[argc + have_retval].predicate)
 		  (op[argc], mode[argc]))
-		error_at (DECL_SOURCE_LOCATION (exp),
-		       "incompatible type for argument %d, "
+		error_at (EXPR_LOCATION (exp), "incompatible type for argument %d, "
 		       "expected %<const int%>", argc + 1);
 	      break;
 

                 reply	other threads:[~2012-08-17 14:57 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='000001cd7c88$c1ba7030$452f5090$@naci@arm.com' \
    --to=sofiane.naci@arm.com \
    --cc=gcc-patches@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).