This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH][ARM][1/4] PR target/65932: Add testcase



On 03/02/16 10:07, Kyrill Tkachov wrote:

On 03/02/16 09:51, Jakub Jelinek wrote:
On Wed, Feb 03, 2016 at 09:46:31AM +0000, Kyrill Tkachov wrote:
Hi Nick,

On 03/02/16 08:35, Nick Clifton wrote:
Hi Kyrill,

   I would like to approve this patch, but cannot, since it is not ARM
   specific.  I think that if you ping the list you may be able to get a
   response, and it would be nice to see this whole patch series checked
   in before the gcc 6 branch occurs.

Cheers
   Nick

PS.  If necessary you could always move the test to gcc.target/arm...

Thanks again for looking at these.
I'd like to keep this test in the generic directory as we're
trying to avoid cluttering the gcc.target directories with
tests that are not arm-specific.

CC'ing Jakub then. Jakub, is it ok to have the test from
https://gcc.gnu.org/ml/gcc-patches/2016-01/msg01717.html
in gcc.c-torture/execute/ ?
The test is not portable, so not in this form.
Does the test reproduce what you want if you change
0xfffffff1 to -15?  If yes, the test is ok with that change.

thanks for spotting this.
Yes, -15 works just as well (bug is reproducible)
I'll make the change.


Here's what I'll be committing shortly when committing the series.

Thanks,
Kyrill

diff --git a/gcc/testsuite/gcc.c-torture/execute/pr67714.c b/gcc/testsuite/gcc.c-torture/execute/pr67714.c
new file mode 100644
index 0000000000000000000000000000000000000000..564c99e16d474019de46125d772b4d611b1adec8
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/execute/pr67714.c
@@ -0,0 +1,26 @@
+unsigned int b;
+int c;
+
+signed char
+fn1 ()
+{
+  signed char d;
+  for (int i = 0; i < 1; i++)
+    d = -15;
+  return d;
+}
+
+int
+main (void)
+{
+  for (c = 0; c < 1; c++)
+    b = 0;
+  char e = fn1 ();
+  signed char f = e ^ b;
+  volatile int g = (int) f;
+
+  if (g != -15)
+    __builtin_abort ();
+
+  return 0;
+}

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]