Message ID | CAGWvnynxgVBDfUMKz5qYkjn42RgO8K+mdFSG0-Bmt_4AQ74ztQ@mail.gmail.com |
---|---|
State | New |
Headers | show |
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.
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.
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
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
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
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.
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
> 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.
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
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" } > } >
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* } } }