Commit 06636b32 by Marek Polacek Committed by Marek Polacek

re PR sanitizer/59667 (ubsan: ICE ubsan_type_descriptor)

	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
parent c15677b6
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
......
/* { 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)" } */
......@@ -311,6 +311,9 @@ ubsan_type_descriptor (tree type, bool want_pointer_type_p)
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)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment