re PR sanitizer/70342 (g++ -fsanitize=undefined never finishes compiling (>24h) in qtxmlpatterns test suite)
PR sanitizer/70342 * fold-const.c (tree_single_nonzero_warnv_p): For TARGET_EXPR, use TARGET_EXPR_SLOT as a base. * g++.dg/ubsan/null-7.C: New test. Co-Authored-By: Jakub Jelinek <jakub@redhat.com> From-SVN: r235637
This commit is contained in:
parent
a1f7021242
commit
500ecf4abd
4 changed files with 39 additions and 0 deletions
|
@ -1,3 +1,10 @@
|
|||
2016-04-29 Marek Polacek <polacek@redhat.com>
|
||||
Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
PR sanitizer/70342
|
||||
* fold-const.c (tree_single_nonzero_warnv_p): For TARGET_EXPR, use
|
||||
TARGET_EXPR_SLOT as a base.
|
||||
|
||||
2016-04-29 Andrew Burgess <andrew.burgess@embecosm.com>
|
||||
|
||||
* config/arc/arc.md (*loadqi_update): Replace use of 'rI'
|
||||
|
|
|
@ -13534,6 +13534,9 @@ tree_single_nonzero_warnv_p (tree t, bool *strict_overflow_p)
|
|||
if (!DECL_P (base))
|
||||
base = get_base_address (base);
|
||||
|
||||
if (base && TREE_CODE (base) == TARGET_EXPR)
|
||||
base = TARGET_EXPR_SLOT (base);
|
||||
|
||||
if (!base)
|
||||
return false;
|
||||
|
||||
|
|
|
@ -1,3 +1,8 @@
|
|||
2016-04-29 Marek Polacek <polacek@redhat.com>
|
||||
|
||||
PR sanitizer/70342
|
||||
* g++.dg/ubsan/null-7.C: New test.
|
||||
|
||||
2016-04-29 Dominik Vogt <vogt@linux.vnet.ibm.com>
|
||||
|
||||
PR/69089
|
||||
|
|
24
gcc/testsuite/g++.dg/ubsan/null-7.C
Normal file
24
gcc/testsuite/g++.dg/ubsan/null-7.C
Normal file
|
@ -0,0 +1,24 @@
|
|||
// PR sanitizer/70342
|
||||
// { dg-do compile }
|
||||
// { dg-options "-fsanitize=null" }
|
||||
|
||||
class A {};
|
||||
class B {
|
||||
public:
|
||||
B(A);
|
||||
};
|
||||
class C {
|
||||
public:
|
||||
C operator<<(B);
|
||||
};
|
||||
class D {
|
||||
D(const int &);
|
||||
C m_blackList;
|
||||
};
|
||||
D::D(const int &) {
|
||||
m_blackList << A() << A() << A() << A() << A() << A() << A() << A() << A()
|
||||
<< A() << A() << A() << A() << A() << A() << A() << A() << A()
|
||||
<< A() << A() << A() << A() << A() << A() << A() << A() << A()
|
||||
<< A() << A() << A() << A() << A() << A() << A() << A() << A()
|
||||
<< A() << A() << A() << A() << A() << A() << A() << A() << A();
|
||||
}
|
Loading…
Add table
Reference in a new issue