re PR tree-optimization/42890 (Crash in type_like_member_ptr_p in ipa-prop.c:382)

PR tree-optimization/42890
	* g++.dg/torture/pr42890.C: New test.

From-SVN: r156604
This commit is contained in:
Jakub Jelinek 2010-02-08 16:49:30 +01:00 committed by Jakub Jelinek
parent 8d9eca14ae
commit 783b008c60
2 changed files with 30 additions and 0 deletions

View File

@ -1,3 +1,8 @@
2010-02-08 Jakub Jelinek <jakub@redhat.com>
PR tree-optimization/42890
* g++.dg/torture/pr42890.C: New test.
2010-02-08 Richard Guenther <rguenther@suse.de>
PR middle-end/42995

View File

@ -0,0 +1,25 @@
// PR tree-optimization/42890
// { dg-do compile }
extern "C" int puts (const char *) throw ();
struct S
{
const char *a;
const char **b;
S (const char *s) { a = s; b = &a; }
~S () { puts (a); }
};
void
foo (int (*fn) (const char *))
{
S a ("foo");
fn ("bar");
}
int
main ()
{
foo (puts);
}