testsuite: missed testcase

Message ID 836a8450-adb1-b1a3-a3cf-af8d15d1a833@acm.org
State New
Headers show
Series
  • testsuite: missed testcase
Related show

Commit Message

Nathan Sidwell July 7, 2020, 6:47 p.m.
I discovered I'd missed applying a testcase when fixing up the EOF token 
location a while back.

     gcc/testsuite/
             * c-c++-common/cpp/pragma-eof.c: New

-- 
Nathan Sidwell

Comments

Patrick Palka via Gcc-patches July 10, 2020, 2:28 p.m. | #1
Hi,


On Tue, 7 Jul 2020 at 20:47, Nathan Sidwell <nathan@acm.org> wrote:
>

> I discovered I'd missed applying a testcase when fixing up the EOF token

> location a while back.

>

>      gcc/testsuite/

>              * c-c++-common/cpp/pragma-eof.c: New

>


The new testcase fails on targets that do not support openmp (I saw
problems on arm-eabi and aarch64-elf using newlib, where -lpthread was
failing).

I'm pushing the attached patch as obvious.

Thanks

Christophe

> --

> Nathan Sidwell
From 2f06fb713845dd4777f8b659cbe008a2a131cd80 Mon Sep 17 00:00:00 2001
From: Christophe Lyon <christophe.lyon@linaro.org>
Date: Fri, 10 Jul 2020 12:42:47 +0000
Subject: [PATCH 1/1] testsuite: Fix c-c++-common/cpp/pragma-eof.c

Add missing fopenmp effective-target.

2020-07-10  Christophe Lyon  <christophe.lyon@linaro.org>

gcc/testsuite/ChangeLog:
	* c-c++-common/cpp/pragma-eof.c: Add missing fopenmp
	effective-target.
---
 gcc/testsuite/c-c++-common/cpp/pragma-eof.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/gcc/testsuite/c-c++-common/cpp/pragma-eof.c b/gcc/testsuite/c-c++-common/cpp/pragma-eof.c
index c72be80..c109435 100644
--- a/gcc/testsuite/c-c++-common/cpp/pragma-eof.c
+++ b/gcc/testsuite/c-c++-common/cpp/pragma-eof.c
@@ -1,6 +1,7 @@
 /* { dg-additional-options -fopenmp }  */
+/* { dg-require-effective-target fopenmp } */
 
-/* { dg-error "expected" "" { target *-*-* } 6 } */
+/* { dg-error "expected" "" { target *-*-* } 7 } */
 /* Make sure we see pragma_eol even though lacking new line.  *
 /* no newline at end of file.  */
 #pragma omp parallel
\ No newline at end of file
Nathan Sidwell July 10, 2020, 2:35 p.m. | #2
On 7/10/20 10:28 AM, Christophe Lyon wrote:
> Hi,

> 

> 

> On Tue, 7 Jul 2020 at 20:47, Nathan Sidwell <nathan@acm.org> wrote:

>>

>> I discovered I'd missed applying a testcase when fixing up the EOF token

>> location a while back.

>>

>>       gcc/testsuite/

>>               * c-c++-common/cpp/pragma-eof.c: New

>>

> 

> The new testcase fails on targets that do not support openmp (I saw

> problems on arm-eabi and aarch64-elf using newlib, where -lpthread was

> failing).

> 

> I'm pushing the attached patch as obvious.


Thanks!


-- 
Nathan Sidwell

Patch

diff --git c/gcc/testsuite/c-c++-common/cpp/pragma-eof.c w/gcc/testsuite/c-c++-common/cpp/pragma-eof.c
new file mode 100644
index 00000000000..c72be8042b5
--- /dev/null
+++ w/gcc/testsuite/c-c++-common/cpp/pragma-eof.c
@@ -0,0 +1,6 @@ 
+/* { dg-additional-options -fopenmp }  */
+
+/* { dg-error "expected" "" { target *-*-* } 6 } */
+/* Make sure we see pragma_eol even though lacking new line.  *
+/* no newline at end of file.  */
+#pragma omp parallel
\ No newline at end of file