public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH] g++.dg/init/vbase1.C and g++.dg/cpp/ucn-1.C
@ 2015-11-14  0:33 David Edelsohn
  2015-11-14  1:01 ` Mike Stump
                   ` (3 more replies)
  0 siblings, 4 replies; 13+ messages in thread
From: David Edelsohn @ 2015-11-14  0:33 UTC (permalink / raw)
  To: GCC Patches, Ramana Radhakrishnan

No RISC architecture can store directly to MEM, so the expected RTL in
g++.dg/init/vbase1.C is wrong.  I am adding XFAIL for PowerPC.  This
probably should be disabled for ARM and other RISC architectures.

Dollar sign is not a valid identifier on AIX, so g++.dg/cpp/ucn-1.C
will produce an additional error on AIX.

* g++.dg/init/vbase1.C: XFAIL powerpc*-*-*.
* g++.dg/cpp/ucn-1.C: Expect error for dollar sign identifier on AIX.

Thanks, David

Index: init/vbase1.C
===================================================================
--- init/vbase1.C       (revision 230366)
+++ init/vbase1.C       (working copy)
@@ -42,4 +42,4 @@
 // Verify that the SubB() mem-initializer is storing 0 directly into
 // this->D.whatever rather than into a stack temp that is then copied into the
 // base field.
-// { dg-final { scan-rtl-dump "set
\[^\n\]*\n\[^\n\]*this\[^\n\]*\n\[^\n\]*const_int 0" "expand" } }
+// { dg-final { scan-rtl-dump "set
\[^\n\]*\n\[^\n\]*this\[^\n\]*\n\[^\n\]*const_int 0" "expand" { xfail
{ powerpc*-*-* } } } }
Index: cpp/ucn-1.C
===================================================================
--- cpp/ucn-1.C (revision 230366)
+++ cpp/ucn-1.C (working copy)
@@ -7,8 +7,9 @@
   "\u0041";                    // 'A' UCN is OK in string literal
   '\u0041';                    // also OK in character literal

-  int c\u0041c;                      // { dg-error "not valid in an
identifier" }
-  int c\u0024c;                      // $ is OK; not part of basic
source char set
+  int c\u0041c;                // { dg-error "not valid in an identifier" }
+               // $ is OK on most targets; not part of basic source char set
+  int c\u0024c;        // { dg-error "not valid in an identifier" {
target { powerpc-ibm-aix* } } }

   U"\uD800";             // { dg-error "not a valid universal character" }
 }

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH] g++.dg/init/vbase1.C and g++.dg/cpp/ucn-1.C
  2015-11-14  0:33 [PATCH] g++.dg/init/vbase1.C and g++.dg/cpp/ucn-1.C David Edelsohn
@ 2015-11-14  1:01 ` Mike Stump
  2015-11-14 10:16 ` Andreas Schwab
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 13+ messages in thread
From: Mike Stump @ 2015-11-14  1:01 UTC (permalink / raw)
  To: David Edelsohn; +Cc: GCC Patches, Ramana Radhakrishnan, Jason Merrill

On Nov 13, 2015, at 4:33 PM, David Edelsohn <dje.gcc@gmail.com> wrote:
> No RISC architecture can store directly to MEM, so the expected RTL in
> g++.dg/init/vbase1.C is wrong.  I am adding XFAIL for PowerPC.

So, completely non-portable test cases aren’t particularly nice.  vbase1.C fails for me as well, and it is a new failure.

So, I’d recommend we ask Jason on which platform the test works, and limit it to the platform.  x86_64 would be my guess.

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH] g++.dg/init/vbase1.C and g++.dg/cpp/ucn-1.C
  2015-11-14  0:33 [PATCH] g++.dg/init/vbase1.C and g++.dg/cpp/ucn-1.C David Edelsohn
  2015-11-14  1:01 ` Mike Stump
@ 2015-11-14 10:16 ` Andreas Schwab
  2015-11-14 13:09   ` David Edelsohn
  2015-11-16  9:15 ` Eric Botcazou
  2015-11-16 14:02 ` Renlin Li
  3 siblings, 1 reply; 13+ messages in thread
From: Andreas Schwab @ 2015-11-14 10:16 UTC (permalink / raw)
  To: David Edelsohn; +Cc: GCC Patches, Ramana Radhakrishnan

David Edelsohn <dje.gcc@gmail.com> writes:

> +  int c\u0024c;        // { dg-error "not valid in an identifier" {
> target { powerpc-ibm-aix* } } }

FAIL: g++.dg/cpp/ucn-1.C  -std=gnu++11  target { powerpc-ibm-aix* }  (test for errors, line 12)

Andreas.

-- 
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH] g++.dg/init/vbase1.C and g++.dg/cpp/ucn-1.C
  2015-11-14 10:16 ` Andreas Schwab
@ 2015-11-14 13:09   ` David Edelsohn
  2015-11-14 13:31     ` Jakub Jelinek
  2015-11-14 13:42     ` Andreas Schwab
  0 siblings, 2 replies; 13+ messages in thread
From: David Edelsohn @ 2015-11-14 13:09 UTC (permalink / raw)
  To: Andreas Schwab; +Cc: GCC Patches, Ramana Radhakrishnan

On Sat, Nov 14, 2015 at 5:16 AM, Andreas Schwab <schwab@linux-m68k.org> wrote:
> David Edelsohn <dje.gcc@gmail.com> writes:
>
>> +  int c\u0024c;        // { dg-error "not valid in an identifier" {
>> target { powerpc-ibm-aix* } } }
>
> FAIL: g++.dg/cpp/ucn-1.C  -std=gnu++11  target { powerpc-ibm-aix* }  (test for errors, line 12)

Argh.  So why isn't it limited to the specified target as the
documentation implies?

Thanks, David

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH] g++.dg/init/vbase1.C and g++.dg/cpp/ucn-1.C
  2015-11-14 13:09   ` David Edelsohn
@ 2015-11-14 13:31     ` Jakub Jelinek
  2015-11-14 13:36       ` David Edelsohn
  2015-11-14 13:42     ` Andreas Schwab
  1 sibling, 1 reply; 13+ messages in thread
From: Jakub Jelinek @ 2015-11-14 13:31 UTC (permalink / raw)
  To: David Edelsohn; +Cc: Andreas Schwab, GCC Patches, Ramana Radhakrishnan

On Sat, Nov 14, 2015 at 08:09:44AM -0500, David Edelsohn wrote:
> On Sat, Nov 14, 2015 at 5:16 AM, Andreas Schwab <schwab@linux-m68k.org> wrote:
> > David Edelsohn <dje.gcc@gmail.com> writes:
> >
> >> +  int c\u0024c;        // { dg-error "not valid in an identifier" {
> >> target { powerpc-ibm-aix* } } }
> >
> > FAIL: g++.dg/cpp/ucn-1.C  -std=gnu++11  target { powerpc-ibm-aix* }  (test for errors, line 12)
> 
> Argh.  So why isn't it limited to the specified target as the
> documentation implies?

Because there needs to be "" or some other string in between the regexp
and { target ... }.

	Jakub

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH] g++.dg/init/vbase1.C and g++.dg/cpp/ucn-1.C
  2015-11-14 13:31     ` Jakub Jelinek
@ 2015-11-14 13:36       ` David Edelsohn
  0 siblings, 0 replies; 13+ messages in thread
From: David Edelsohn @ 2015-11-14 13:36 UTC (permalink / raw)
  To: Jakub Jelinek; +Cc: Andreas Schwab, GCC Patches, Ramana Radhakrishnan

On Sat, Nov 14, 2015 at 8:30 AM, Jakub Jelinek <jakub@redhat.com> wrote:
> On Sat, Nov 14, 2015 at 08:09:44AM -0500, David Edelsohn wrote:
>> On Sat, Nov 14, 2015 at 5:16 AM, Andreas Schwab <schwab@linux-m68k.org> wrote:
>> > David Edelsohn <dje.gcc@gmail.com> writes:
>> >
>> >> +  int c\u0024c;        // { dg-error "not valid in an identifier" {
>> >> target { powerpc-ibm-aix* } } }
>> >
>> > FAIL: g++.dg/cpp/ucn-1.C  -std=gnu++11  target { powerpc-ibm-aix* }  (test for errors, line 12)
>>
>> Argh.  So why isn't it limited to the specified target as the
>> documentation implies?
>
> Because there needs to be "" or some other string in between the regexp
> and { target ... }.

Fixed.  Sorry.

Thanks, David

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH] g++.dg/init/vbase1.C and g++.dg/cpp/ucn-1.C
  2015-11-14 13:09   ` David Edelsohn
  2015-11-14 13:31     ` Jakub Jelinek
@ 2015-11-14 13:42     ` Andreas Schwab
  2015-11-14 13:47       ` David Edelsohn
  1 sibling, 1 reply; 13+ messages in thread
From: Andreas Schwab @ 2015-11-14 13:42 UTC (permalink / raw)
  To: David Edelsohn; +Cc: GCC Patches, Ramana Radhakrishnan

David Edelsohn <dje.gcc@gmail.com> writes:

> On Sat, Nov 14, 2015 at 5:16 AM, Andreas Schwab <schwab@linux-m68k.org> wrote:
>> David Edelsohn <dje.gcc@gmail.com> writes:
>>
>>> +  int c\u0024c;        // { dg-error "not valid in an identifier" {
>>> target { powerpc-ibm-aix* } } }
>>
>> FAIL: g++.dg/cpp/ucn-1.C  -std=gnu++11  target { powerpc-ibm-aix* }  (test for errors, line 12)
>
> Argh.  So why isn't it limited to the specified target as the
> documentation implies?

Where does it imply that?

# dg-error regexp comment [{ target/xfail selector } [{.|0|linenum}]]

Andreas.

-- 
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH] g++.dg/init/vbase1.C and g++.dg/cpp/ucn-1.C
  2015-11-14 13:42     ` Andreas Schwab
@ 2015-11-14 13:47       ` David Edelsohn
  0 siblings, 0 replies; 13+ messages in thread
From: David Edelsohn @ 2015-11-14 13:47 UTC (permalink / raw)
  To: Andreas Schwab; +Cc: GCC Patches

On Sat, Nov 14, 2015 at 8:41 AM, Andreas Schwab <schwab@linux-m68k.org> wrote:
> David Edelsohn <dje.gcc@gmail.com> writes:
>
>> On Sat, Nov 14, 2015 at 5:16 AM, Andreas Schwab <schwab@linux-m68k.org> wrote:
>>> David Edelsohn <dje.gcc@gmail.com> writes:
>>>
>>>> +  int c\u0024c;        // { dg-error "not valid in an identifier" {
>>>> target { powerpc-ibm-aix* } } }
>>>
>>> FAIL: g++.dg/cpp/ucn-1.C  -std=gnu++11  target { powerpc-ibm-aix* }  (test for errors, line 12)
>>
>> Argh.  So why isn't it limited to the specified target as the
>> documentation implies?
>
> Where does it imply that?
>
> # dg-error regexp comment [{ target/xfail selector } [{.|0|linenum}]]

That's not right either.

I incorrectly read it as

dg-error regexp [comment] [{ target/xfail selector} [line] }]

- David

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH] g++.dg/init/vbase1.C and g++.dg/cpp/ucn-1.C
  2015-11-14  0:33 [PATCH] g++.dg/init/vbase1.C and g++.dg/cpp/ucn-1.C David Edelsohn
  2015-11-14  1:01 ` Mike Stump
  2015-11-14 10:16 ` Andreas Schwab
@ 2015-11-16  9:15 ` Eric Botcazou
  2015-11-16 13:29   ` David Edelsohn
  2015-11-16 14:02 ` Renlin Li
  3 siblings, 1 reply; 13+ messages in thread
From: Eric Botcazou @ 2015-11-16  9:15 UTC (permalink / raw)
  To: David Edelsohn; +Cc: gcc-patches, Ramana Radhakrishnan

> No RISC architecture can store directly to MEM, so the expected RTL in
> g++.dg/init/vbase1.C is wrong.  I am adding XFAIL for PowerPC.  This
> probably should be disabled for ARM and other RISC architectures.

Some of them can store 0 directly to MEM though, for example SPARC.

-- 
Eric Botcazou

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH] g++.dg/init/vbase1.C and g++.dg/cpp/ucn-1.C
  2015-11-16  9:15 ` Eric Botcazou
@ 2015-11-16 13:29   ` David Edelsohn
  0 siblings, 0 replies; 13+ messages in thread
From: David Edelsohn @ 2015-11-16 13:29 UTC (permalink / raw)
  To: Eric Botcazou, Jason Merrill
  Cc: GCC Patches, Ramana Radhakrishnan, Mike Stump

On Mon, Nov 16, 2015 at 4:15 AM, Eric Botcazou <ebotcazou@adacore.com> wrote:
>> No RISC architecture can store directly to MEM, so the expected RTL in
>> g++.dg/init/vbase1.C is wrong.  I am adding XFAIL for PowerPC.  This
>> probably should be disabled for ARM and other RISC architectures.
>
> Some of them can store 0 directly to MEM though, for example SPARC.

As Mike said, this testcase isn't portable and needs to be limited to
the targets that support the particular idiom used in this testcase.

Thanks, David

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH] g++.dg/init/vbase1.C and g++.dg/cpp/ucn-1.C
  2015-11-14  0:33 [PATCH] g++.dg/init/vbase1.C and g++.dg/cpp/ucn-1.C David Edelsohn
                   ` (2 preceding siblings ...)
  2015-11-16  9:15 ` Eric Botcazou
@ 2015-11-16 14:02 ` Renlin Li
  2015-11-20 22:17   ` Mike Stump
  3 siblings, 1 reply; 13+ messages in thread
From: Renlin Li @ 2015-11-16 14:02 UTC (permalink / raw)
  To: David Edelsohn, GCC Patches, Ramana Radhakrishnan

Hi David,

On 14/11/15 00:33, David Edelsohn wrote:
> No RISC architecture can store directly to MEM, so the expected RTL in
> g++.dg/init/vbase1.C is wrong.  I am adding XFAIL for PowerPC.  This
> probably should be disabled for ARM and other RISC architectures.

I observed the same problem in arm.

This passes for aarch64 and mips as they have zero register to do that. 
However, other RISC might not have that feature, for example arm and 
RS6000 in this  case.

https://gcc.gnu.org/ml/gcc-patches/2015-10/msg03239.html

Regards,
Renlin Li
>
> Dollar sign is not a valid identifier on AIX, so g++.dg/cpp/ucn-1.C
> will produce an additional error on AIX.
>
> * g++.dg/init/vbase1.C: XFAIL powerpc*-*-*.
> * g++.dg/cpp/ucn-1.C: Expect error for dollar sign identifier on AIX.
>
> Thanks, David
>
> Index: init/vbase1.C
> ===================================================================
> --- init/vbase1.C       (revision 230366)
> +++ init/vbase1.C       (working copy)
> @@ -42,4 +42,4 @@
>   // Verify that the SubB() mem-initializer is storing 0 directly into
>   // this->D.whatever rather than into a stack temp that is then copied into the
>   // base field.
> -// { dg-final { scan-rtl-dump "set
> \[^\n\]*\n\[^\n\]*this\[^\n\]*\n\[^\n\]*const_int 0" "expand" } }
> +// { dg-final { scan-rtl-dump "set
> \[^\n\]*\n\[^\n\]*this\[^\n\]*\n\[^\n\]*const_int 0" "expand" { xfail
> { powerpc*-*-* } } } }
> Index: cpp/ucn-1.C
> ===================================================================
> --- cpp/ucn-1.C (revision 230366)
> +++ cpp/ucn-1.C (working copy)
> @@ -7,8 +7,9 @@
>     "\u0041";                    // 'A' UCN is OK in string literal
>     '\u0041';                    // also OK in character literal
>
> -  int c\u0041c;                      // { dg-error "not valid in an
> identifier" }
> -  int c\u0024c;                      // $ is OK; not part of basic
> source char set
> +  int c\u0041c;                // { dg-error "not valid in an identifier" }
> +               // $ is OK on most targets; not part of basic source char set
> +  int c\u0024c;        // { dg-error "not valid in an identifier" {
> target { powerpc-ibm-aix* } } }
>
>     U"\uD800";             // { dg-error "not a valid universal character" }
>   }
>

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH] g++.dg/init/vbase1.C and g++.dg/cpp/ucn-1.C
  2015-11-16 14:02 ` Renlin Li
@ 2015-11-20 22:17   ` Mike Stump
  0 siblings, 0 replies; 13+ messages in thread
From: Mike Stump @ 2015-11-20 22:17 UTC (permalink / raw)
  To: Renlin Li; +Cc: David Edelsohn, GCC Patches, Ramana Radhakrishnan

On Nov 16, 2015, at 6:02 AM, Renlin Li <renlin.li@arm.com> wrote:
> On 14/11/15 00:33, David Edelsohn wrote:
>> No RISC architecture can store directly to MEM, so the expected RTL in
>> g++.dg/init/vbase1.C is wrong.  I am adding XFAIL for PowerPC.  This
>> probably should be disabled for ARM and other RISC architectures.
> 
> I observed the same problem in arm.
> 
> This passes for aarch64 and mips as they have zero register to do that. However, other RISC might not have that feature, for example arm and RS6000 in this  case.

I fixed this with the below patch.  Tested on x86_64 linux, x86_64 darwin and my port.  If you want to list aarch64/arn and mips, please do.


	* g++.dg/init/vbase1.C: Only run on x86_64-*-* as this testcase
	isn't portable.

Index: g++.dg/init/vbase1.C
===================================================================
--- g++.dg/init/vbase1.C	(revision 230675)
+++ g++.dg/init/vbase1.C	(working copy)
@@ -42,4 +42,4 @@ int main(int, char**)
 // Verify that the SubB() mem-initializer is storing 0 directly into
 // this->D.whatever rather than into a stack temp that is then copied into the
 // base field.
-// { dg-final { scan-rtl-dump "set \[^\n\]*\n\[^\n\]*this\[^\n\]*\n\[^\n\]*const_int 0" "expand" { xfail { powerpc*-*-* } } } }
+// { dg-final { scan-rtl-dump "set \[^\n\]*\n\[^\n\]*this\[^\n\]*\n\[^\n\]*const_int 0" "expand" { target { x86_64-*-* } } } }

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH] g++.dg/init/vbase1.C and g++.dg/cpp/ucn-1.C
@ 2015-11-21 12:34 Uros Bizjak
  0 siblings, 0 replies; 13+ messages in thread
From: Uros Bizjak @ 2015-11-21 12:34 UTC (permalink / raw)
  To: gcc-patches; +Cc: Mike Stump

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

> I fixed this with the below patch.  Tested on x86_64 linux, x86_64 darwin and my port.  If you want to
> list aarch64/arn and mips, please do.
>
> * g++.dg/init/vbase1.C: Only run on x86_64-*-* as this testcase
> isn't portable.

I have added i?86-*-* to the list.

2015-11-21  Uros Bizjak  <ubizjak@gmail.com>

    * g++.dg/init/vbase1.C: Also run on i?86-*-*.

Tested on x86_64-linux-gnu {,-m32} and committed to mainline SVN.

Uros.

[-- Attachment #2: t.diff.txt --]
[-- Type: text/plain, Size: 628 bytes --]

Index: g++.dg/init/vbase1.C
===================================================================
--- g++.dg/init/vbase1.C	(revision 230701)
+++ g++.dg/init/vbase1.C	(working copy)
@@ -42,4 +42,4 @@
 // Verify that the SubB() mem-initializer is storing 0 directly into
 // this->D.whatever rather than into a stack temp that is then copied into the
 // base field.
-// { dg-final { scan-rtl-dump "set \[^\n\]*\n\[^\n\]*this\[^\n\]*\n\[^\n\]*const_int 0" "expand" { target { x86_64-*-* } } } }
+// { dg-final { scan-rtl-dump "set \[^\n\]*\n\[^\n\]*this\[^\n\]*\n\[^\n\]*const_int 0" "expand" { target { i?86-*-* x86_64-*-* } } } }

^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2015-11-21 12:24 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-11-14  0:33 [PATCH] g++.dg/init/vbase1.C and g++.dg/cpp/ucn-1.C David Edelsohn
2015-11-14  1:01 ` Mike Stump
2015-11-14 10:16 ` Andreas Schwab
2015-11-14 13:09   ` David Edelsohn
2015-11-14 13:31     ` Jakub Jelinek
2015-11-14 13:36       ` David Edelsohn
2015-11-14 13:42     ` Andreas Schwab
2015-11-14 13:47       ` David Edelsohn
2015-11-16  9:15 ` Eric Botcazou
2015-11-16 13:29   ` David Edelsohn
2015-11-16 14:02 ` Renlin Li
2015-11-20 22:17   ` Mike Stump
2015-11-21 12:34 Uros Bizjak

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).