pr59250.C: New test.

2013-11-25  Marek Polacek  <polacek@redhat.com>

testsuite/
	* g++.dg/ubsan/pr59250.C: New test.

From-SVN: r205349
This commit is contained in:
Marek Polacek 2013-11-25 11:17:23 +00:00 committed by Marek Polacek
parent 7d7b5c7a4b
commit ecd51813f1
2 changed files with 24 additions and 0 deletions

View File

@ -1,3 +1,8 @@
2013-11-25 Marek Polacek <polacek@redhat.com>
PR sanitizer/59250
* g++.dg/ubsan/pr59250.C: New test.
2013-11-25 Janus Weil <janus@gcc.gnu.org>
PR fortran/59143

View File

@ -0,0 +1,19 @@
// PR sanitizer/59250
// { dg-do compile }
// { dg-options "-fsanitize=undefined" }
// { dg-skip-if "" { *-*-* } { "-flto" } { "" } }
struct E {
int i;
};
struct S {
const char *s;
S (const char *);
static E *e;
};
S::S (const char *) : s (0)
{
e = new E ();
}