testsuite/ChangeLog:
2019-12-13 Andrew Pinski <apinski@marvell.com>
* gcc.c-torture/execute/pr86659-1.c: New test.
* gcc.c-torture/execute/pr86659-2.c: New test.
From-SVN: r279338
+2019-12-13 Andrew Pinski <apinski@marvell.com>
+
+ * gcc.c-torture/execute/pr86659-1.c: New test.
+ * gcc.c-torture/execute/pr86659-2.c: New test.
+
2019-12-12 Jakub Jelinek <jakub@redhat.com>
PR target/92904
--- /dev/null
+#define ENDIANBIG __attribute((scalar_storage_order ("big-endian")))
+
+typedef struct ENDIANBIG
+{
+ unsigned long long field0:29;
+ unsigned long long field1:4;
+ unsigned long long field2:31;
+}struct1;
+
+int
+main(void)
+{
+ int value1 = 0;
+ int value2 = 0;
+ int value3 = 0;
+ unsigned int flag;
+ struct1 var1;
+ var1.field0 = 23;
+
+ flag = var1.field0;
+ value1 = ((var1.field0)?10:20);
+ if(var1.field0)
+ {
+ value2 = 10;
+ } else
+ {
+ value2 = 20;
+ }
+
+ value3 = ((flag)?10:20);
+
+ if (value1 != 10)
+ __builtin_abort ();
+
+ if (value2 != 10)
+ __builtin_abort ();
+
+ if (value3 != 10)
+ __builtin_abort ();
+
+ return 0;
+}
--- /dev/null
+#define ENDIANBIG __attribute((scalar_storage_order ("little-endian")))
+
+typedef struct ENDIANBIG
+{
+ unsigned long long field0:29;
+ unsigned long long field1:4;
+ unsigned long long field2:31;
+}struct1;
+
+int
+main(void)
+{
+ int value1 = 0;
+ int value2 = 0;
+ int value3 = 0;
+ unsigned int flag;
+ struct1 var1;
+ var1.field0 = 23;
+
+ flag = var1.field0;
+ value1 = ((var1.field0)?10:20);
+ if(var1.field0)
+ {
+ value2 = 10;
+ } else
+ {
+ value2 = 20;
+ }
+
+ value3 = ((flag)?10:20);
+
+ if (value1 != 10)
+ __builtin_abort ();
+
+ if (value2 != 10)
+ __builtin_abort ();
+
+ if (value3 != 10)
+ __builtin_abort ();
+
+ return 0;
+}