Host and offload targets have no common meaning of address spaces
authorThomas Schwinge <thomas@codesourcery.com>
Tue, 24 Aug 2021 09:14:10 +0000 (11:14 +0200)
committerThomas Schwinge <thomas@codesourcery.com>
Thu, 13 Jan 2022 10:16:20 +0000 (11:16 +0100)
gcc/
* tree-streamer-out.c (pack_ts_base_value_fields): Don't pack
'TYPE_ADDR_SPACE' for offloading.
* tree-streamer-in.c (unpack_ts_base_value_fields): Don't unpack
'TYPE_ADDR_SPACE' for offloading.
libgomp/
* testsuite/libgomp.c/address-space-1.c: Remove 'dg-xfail-run-if'
for 'offload_device_intel_mic'.

gcc/tree-streamer-in.c
gcc/tree-streamer-out.c
libgomp/testsuite/libgomp.c/address-space-1.c

index adaf624..0d5108e 100644 (file)
@@ -146,7 +146,9 @@ unpack_ts_base_value_fields (struct bitpack_d *bp, tree expr)
        TYPE_REVERSE_STORAGE_ORDER (expr) = (unsigned) bp_unpack_value (bp, 1);
       else
        TYPE_SATURATING (expr) = (unsigned) bp_unpack_value (bp, 1);
+#ifndef ACCEL_COMPILER
       TYPE_ADDR_SPACE (expr) = (unsigned) bp_unpack_value (bp, 8);
+#endif
     }
   else if (TREE_CODE (expr) == BIT_FIELD_REF || TREE_CODE (expr) == MEM_REF)
     {
index 8742bf0..23d15a5 100644 (file)
@@ -119,7 +119,12 @@ pack_ts_base_value_fields (struct bitpack_d *bp, tree expr)
        bp_pack_value (bp, TYPE_REVERSE_STORAGE_ORDER (expr), 1);
       else
        bp_pack_value (bp, TYPE_SATURATING (expr), 1);
-      bp_pack_value (bp, TYPE_ADDR_SPACE (expr), 8);
+      if (lto_stream_offload_p)
+       /* Host and offload targets have no common meaning of address
+          spaces.  */
+       ;
+      else
+       bp_pack_value (bp, TYPE_ADDR_SPACE (expr), 8);
     }
   else if (TREE_CODE (expr) == BIT_FIELD_REF || TREE_CODE (expr) == MEM_REF)
     {
index 6ad57de..39ff82c 100644 (file)
@@ -3,10 +3,6 @@
 /* { dg-do run { target i?86-*-* x86_64-*-* } } */
 /* { dg-require-effective-target offload_device_nonshared_as } */
 
-/* With Intel MIC (emulated) offloading:
-       offload error: process on the device 0 unexpectedly exited with code 0
-   { dg-xfail-run-if TODO { offload_device_intel_mic } } */
-
 #include <assert.h>
 
 int __seg_fs a;