+2017-07-28 Martin Liska <mliska@suse.cz>
+
+ PR sanitizer/81460
+ * sanopt.c (sanitize_rewrite_addressable_params): Do not rewrite
+ parameters that are of a variable-length.
+
2017-07-28 Sebastian Huber <sebastian.huber@embedded-brains.de>
* config.gcc (powerpc-*-rtems*): Remove rs6000/eabi.h. Add
for (tree arg = DECL_ARGUMENTS (current_function_decl);
arg; arg = DECL_CHAIN (arg))
{
- if (TREE_ADDRESSABLE (arg) && !TREE_ADDRESSABLE (TREE_TYPE (arg)))
+ tree type = TREE_TYPE (arg);
+ if (TREE_ADDRESSABLE (arg) && !TREE_ADDRESSABLE (type)
+ && TREE_CODE (TYPE_SIZE (type)) == INTEGER_CST)
{
TREE_ADDRESSABLE (arg) = 0;
/* The parameter is no longer addressable. */
- tree type = TREE_TYPE (arg);
has_any_addressable_param = true;
/* Create a new automatic variable. */
+2017-07-28 Martin Liska <mliska@suse.cz>
+
+ PR sanitizer/81460
+ * gcc.dg/asan/pr81460.c: New test.
+
2017-07-28 Jakub Jelinek <jakub@redhat.com>
PR tree-optimization/81578
--- /dev/null
+/* PR sanitizer/80460 */
+/* { dg-do compile } */
+
+int
+f (int a, struct { int b[a]; } c) /* { dg-warning "anonymous struct declared inside parameter list will not be visible outside of this definition or declaration" } */
+{
+ return c.b[0];
+}