return;
/* Only check pointers and C++ references. */
+ tree curptype = TREE_TYPE (curp);
tree newptype = TREE_TYPE (newp);
- if (!POINTER_TYPE_P (newptype))
+ if (!POINTER_TYPE_P (curptype) || !POINTER_TYPE_P (newptype))
continue;
/* Skip mismatches in __builtin_va_list that is commonly
if (origloc == UNKNOWN_LOCATION)
origloc = newloc;
- tree curptype = TREE_TYPE (curp);
const std::string newparmstr = newa->array_as_string (newptype);
const std::string curparmstr = cura->array_as_string (curptype);
if (new_vla_p && !cur_vla_p)
--- /dev/null
+/* PR 97955 - ICE in build_array_type_1 on invalid redeclaration of function
+ with VLA parameter
+ { dg-do compile }
+ { dg-options "-Wall" } */
+
+void f (int n, int a[n]);
+void f (int *b) { } // { dg-error "conflicting types" }