public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [Patch Testsuite] Make all_attributes.cc in to (almost_)all_attributes.cc for ARM.
@ 2015-03-20 17:13 James Greenhalgh
  2015-03-20 17:16 ` Jonathan Wakely
  0 siblings, 1 reply; 2+ messages in thread
From: James Greenhalgh @ 2015-03-20 17:13 UTC (permalink / raw)
  To: gcc-patches; +Cc: jwakely, libstdc++

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


Hi,

As discussed on IRC, glibc's sysdeps/unix/sysv/linux/arm/sys/ucontext.h
for ARM has a field named "unused", in a struct which looks like this:

  struct _libc_fpstate
  {
    struct
    {
      unsigned int sign1:1;
      unsigned int unused:15;
      unsigned int sign2:1;
      unsigned int exponent:14;
      unsigned int j:1;
      unsigned int mantissa1:31;
      unsigned int mantissa0:32;
    } fpregs[8];
    unsigned int fpsr:32;
    unsigned int fpcr:32;
    unsigned char ftype[8];
    unsigned int init_flag;
  };

The all_attributes testcase #defines unused to '1', giving
  unsigned int 1:15;
which is not going to work.

This patch just disables the check in this test case for
"unused" when testing for ARM, which resolves the issue.

Tested on arm-none-linux-gnueabihf to confirm it clears the FAIL.

OK?

Thanks,
James

---
2015-03-20  James Greenhalgh  <james.greenhalgh@arm.com>

	* testsuite/17_intro/headers/c++1998/all_attributes.cc: Disable
	test for unused for ARM.
	* testsuite/17_intro/headers/c++200x/all_attributes.cc: Likewise.
	* testsuite/17_intro/headers/c++2014/all_attributes.cc: Likewise.

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-Patch-Testsuite-Make-all_attributes.cc-in-to-almost_.patch --]
[-- Type: text/x-patch;  name=0001-Patch-Testsuite-Make-all_attributes.cc-in-to-almost_.patch, Size: 1929 bytes --]

diff --git a/libstdc++-v3/testsuite/17_intro/headers/c++1998/all_attributes.cc b/libstdc++-v3/testsuite/17_intro/headers/c++1998/all_attributes.cc
index 6fc362a..7bc7ffe 100644
--- a/libstdc++-v3/testsuite/17_intro/headers/c++1998/all_attributes.cc
+++ b/libstdc++-v3/testsuite/17_intro/headers/c++1998/all_attributes.cc
@@ -30,7 +30,10 @@
 #endif
 #define packed 1
 #define pure 1
+// glibc's sysdeps/unix/sysv/linux/arm/sys/ucontext.h uses this on ARM.
+#ifndef __arm__
 #define unused 1
+#endif
 
 #include <bits/stdc++.h> // TODO: this is missing from <bits/extc++.h>
 #include <bits/extc++.h>
diff --git a/libstdc++-v3/testsuite/17_intro/headers/c++200x/all_attributes.cc b/libstdc++-v3/testsuite/17_intro/headers/c++200x/all_attributes.cc
index 0726e3f..8d93fd9 100644
--- a/libstdc++-v3/testsuite/17_intro/headers/c++200x/all_attributes.cc
+++ b/libstdc++-v3/testsuite/17_intro/headers/c++200x/all_attributes.cc
@@ -29,7 +29,10 @@
 #endif
 #define packed 1
 #define pure 1
+// glibc's sysdeps/unix/sysv/linux/arm/sys/ucontext.h uses this on ARM.
+#ifndef __arm__
 #define unused 1
+#endif
 
 #include <bits/stdc++.h> // TODO: this is missing from <bits/extc++.h>
 #include <codecvt>       // TODO: this is missing from <bits/stdc++.h>
diff --git a/libstdc++-v3/testsuite/17_intro/headers/c++2014/all_attributes.cc b/libstdc++-v3/testsuite/17_intro/headers/c++2014/all_attributes.cc
index 06bcb8e..c482fbd 100644
--- a/libstdc++-v3/testsuite/17_intro/headers/c++2014/all_attributes.cc
+++ b/libstdc++-v3/testsuite/17_intro/headers/c++2014/all_attributes.cc
@@ -29,7 +29,10 @@
 #endif
 #define packed 1
 #define pure 1
+// glibc's sysdeps/unix/sysv/linux/arm/sys/ucontext.h uses this on ARM.
+#ifndef __arm__
 #define unused 1
+#endif
 
 #include <bits/stdc++.h> // TODO: this is missing from <bits/extc++.h>
 #include <shared_mutex>  // TODO: this is missing from <bits/stdc++.h>

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

* Re: [Patch Testsuite] Make all_attributes.cc in to (almost_)all_attributes.cc for ARM.
  2015-03-20 17:13 [Patch Testsuite] Make all_attributes.cc in to (almost_)all_attributes.cc for ARM James Greenhalgh
@ 2015-03-20 17:16 ` Jonathan Wakely
  0 siblings, 0 replies; 2+ messages in thread
From: Jonathan Wakely @ 2015-03-20 17:16 UTC (permalink / raw)
  To: James Greenhalgh; +Cc: gcc-patches, libstdc++

On 20/03/15 17:13 +0000, James Greenhalgh wrote:
>This patch just disables the check in this test case for
>"unused" when testing for ARM, which resolves the issue.
>
>Tested on arm-none-linux-gnueabihf to confirm it clears the FAIL.

OK, thanks.

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

end of thread, other threads:[~2015-03-20 17:16 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-03-20 17:13 [Patch Testsuite] Make all_attributes.cc in to (almost_)all_attributes.cc for ARM James Greenhalgh
2015-03-20 17:16 ` Jonathan Wakely

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