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
+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'
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;
+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
--- /dev/null
+// 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();
+}