PR sanitizer/59667
* ubsan.c (ubsan_type_descriptor): Call strip_array_types on type2.
testsuite/
* c-c++-common/ubsan/pr59667.c: New test.
From-SVN: r206423
+2014-01-08 Marek Polacek <polacek@redhat.com>
+
+ PR sanitizer/59667
+ * ubsan.c (ubsan_type_descriptor): Call strip_array_types on type2.
+
2014-01-08 Jakub Jelinek <jakub@redhat.com>
PR rtl-optimization/59649
+2014-01-08 Marek Polacek <polacek@redhat.com>
+
+ PR sanitizer/59667
+ * c-c++-common/ubsan/pr59667.c: New test.
+
2014-01-08 Richard Biener <rguenther@suse.de>
PR middle-end/59630
--- /dev/null
+/* { dg-do run } */
+/* { dg-options "-fsanitize=undefined" } */
+/* { dg-shouldfail "ubsan" } */
+/* { dg-skip-if "" { *-*-* } { "-flto" } { "" } } */
+
+int
+main (void)
+{
+ unsigned int len = 1;
+ float (*P)[len][len] = 0;
+ (*P)[0][0] = 1;
+ return 0;
+}
+
+/* { dg-output "store to null pointer of type 'float'(\n|\r\n|\r)" } */
type2 = TYPE_METHOD_BASETYPE (type2);
}
+ /* If an array, get its type. */
+ type2 = strip_array_types (type2);
+
if (TYPE_NAME (type2) != NULL)
{
if (TREE_CODE (TYPE_NAME (type2)) == IDENTIFIER_NODE)