@@ -380,7 +380,7 @@ d_eval_constant_expression (const Loc &loc, tree cst)
else if (code == STRING_CST)
{
const void *string = TREE_STRING_POINTER (cst);
- size_t len = TREE_STRING_LENGTH (cst);
+ size_t len = TREE_STRING_LENGTH (cst) - 1;
return StringExp::create (loc, CONST_CAST (void *, string), len);
}
else if (code == VECTOR_CST)
new file mode 100644
@@ -0,0 +1,7 @@
+// https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102185
+// { dg-do compile }
+
+static assert(__traits(getTargetInfo, "floatAbi").length == 0 ||
+ __traits(getTargetInfo, "floatAbi") == "hard" ||
+ __traits(getTargetInfo, "floatAbi") == "soft" ||
+ __traits(getTargetInfo, "floatAbi") == "softfp");