Fix poly types after PR tree-optimization/71625 strlen optimization
authorSzabolcs Nagy <szabolcs.nagy@arm.com>
Fri, 17 Aug 2018 17:26:11 +0000 (17:26 +0000)
committerSzabolcs Nagy <nsz@gcc.gnu.org>
Fri, 17 Aug 2018 17:26:11 +0000 (17:26 +0000)
Same as r263561, but for arm: avoid compilation errors caused by poly
initializers getting treated as string literals.

Tested on arm-none-linux-gnueabihf.

gcc/ChangeLog:

* config/arm/arm-builtins.c (arm_init_simd_builtin_types): Clear
polyNxK_t element's TYPE_STRING_FLAG.

From-SVN: r263624

gcc/ChangeLog
gcc/config/arm/arm-builtins.c

index 420b9addecaa9e1724eac1d1f9a952709d7e1e74..30ec7df443392cde481499cb9677923f032c96a4 100644 (file)
@@ -1,3 +1,8 @@
+2018-08-17  Szabolcs Nagy  <szabolcs.nagy@arm.com>
+
+       * config/arm/arm-builtins.c (arm_init_simd_builtin_types): Clear
+       polyNxK_t element's TYPE_STRING_FLAG.
+
 2018-08-17  Segher Boessenkool  <segher@kernel.crashing.org>
 
        * config/rs6000/rs6000.md (*cbranch, *creturn): Name these patterns
index 183a7b907f6cd960b9c72972da57c9e1537e7abc..563ca51dcd0d63046d2bf577ca86d5f70a466bcf 100644 (file)
@@ -927,6 +927,11 @@ arm_init_simd_builtin_types (void)
   (*lang_hooks.types.register_builtin_type) (arm_simd_polyTI_type_node,
                                             "__builtin_neon_poly128");
 
+  /* Prevent front-ends from transforming poly vectors into string
+     literals.  */
+  TYPE_STRING_FLAG (arm_simd_polyQI_type_node) = false;
+  TYPE_STRING_FLAG (arm_simd_polyHI_type_node) = false;
+
   /* Init all the element types built by the front-end.  */
   arm_simd_types[Int8x8_t].eltype = intQI_type_node;
   arm_simd_types[Int8x16_t].eltype = intQI_type_node;