From: James Greenhalgh <james.greenhalgh@arm.com>
To: gcc-patches@gcc.gnu.org
Cc: jwakely@redhat.com, libstdc++@gcc.gnu.org
Subject: [Patch Testsuite] Make all_attributes.cc in to (almost_)all_attributes.cc for ARM.
Date: Fri, 20 Mar 2015 17:13:00 -0000 [thread overview]
Message-ID: <1426871619-6418-1-git-send-email-james.greenhalgh@arm.com> (raw)
[-- 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>
next reply other threads:[~2015-03-20 17:13 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-03-20 17:13 James Greenhalgh [this message]
2015-03-20 17:16 ` Jonathan Wakely
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1426871619-6418-1-git-send-email-james.greenhalgh@arm.com \
--to=james.greenhalgh@arm.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=jwakely@redhat.com \
--cc=libstdc++@gcc.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).