summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/builtin-bswap-3.c
diff options
context:
space:
mode:
authorgeoffk <geoffk@138bc75d-0d04-0410-961f-82ee72b054a4>2006-11-01 05:20:05 +0000
committergeoffk <geoffk@138bc75d-0d04-0410-961f-82ee72b054a4>2006-11-01 05:20:05 +0000
commit154db13d9dd66114ec4845308146f4f993b6696c (patch)
tree544eecf6a9b2b5a2b237b57685072451e865376d /gcc/testsuite/gcc.dg/builtin-bswap-3.c
parentb7afdbf76fbeafa81281561a8ea34e6333c677b5 (diff)
downloadgcc-154db13d9dd66114ec4845308146f4f993b6696c.tar.gz
2006-10-31 Eric Christopher <echristo@apple.com>
Falk Hueffner <falk@debian.org> * gcc.dg/builtin-bswap-1.c: New. * gcc.dg/builtin-bswap-2.c: New. * gcc.dg/builtin-bswap-3.c: New. * gcc.dg/builtin-bswap-4.c: New. * gcc.dg/builtin-bswap-5.c: New. * gcc.target/i386/builtin-bswap-1.c: New. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@118364 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/testsuite/gcc.dg/builtin-bswap-3.c')
-rw-r--r--gcc/testsuite/gcc.dg/builtin-bswap-3.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/builtin-bswap-3.c b/gcc/testsuite/gcc.dg/builtin-bswap-3.c
new file mode 100644
index 00000000000..3416d65085d
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/builtin-bswap-3.c
@@ -0,0 +1,19 @@
+/* { dg-do run } */
+/* { dg-options "" } */
+#include <stdint.h>
+
+extern void abort (void);
+
+int main (void)
+{
+ uint32_t a = 0x80000000;
+ uint32_t b;
+
+ b = __builtin_bswap32 (a);
+ a = __builtin_bswap32 (b);
+
+ if (b != 0x80 || a != 0x80000000)
+ abort ();
+
+ return 0;
+}