+2016-01-15 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
+
+ * config/aarch64/aarch64.c (aarch64_process_one_target_attr): Return
+ false when argument string is not found in the attributes table
+ at all.
+
2016-01-15 David Edelsohn <dje.gcc@gmail.com>
PR target/68609
arg++;
}
const struct aarch64_attribute_info *p_attr;
+ bool found = false;
for (p_attr = aarch64_attributes; p_attr->name; p_attr++)
{
/* If the names don't match up, or the user has given an argument
if (strcmp (str_to_check, p_attr->name) != 0)
continue;
+ found = true;
bool attr_need_arg_p = p_attr->attr_type == aarch64_attr_custom
|| p_attr->attr_type == aarch64_attr_enum;
}
}
- return true;
+ /* If we reached here we either have found an attribute and validated
+ it or didn't match any. If we matched an attribute but its arguments
+ were malformed we will have returned false already. */
+ return found;
}
/* Count how many times the character C appears in
+2016-01-15 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
+
+ * gcc.target/aarch64/target_attr_17.c: New test.
+
2016-01-15 Richard Biener <rguenther@suse.de>
PR tree-optimization/66856
--- /dev/null
+__attribute__((target("invalid-attr-string")))
+int
+foo (int a)
+{
+ return a + 5;
+}
+
+/* { dg-error "target attribute.*is invalid" "" { target *-*-* } 0 } */
\ No newline at end of file