+2018-03-23 Jakub Jelinek <jakub@redhat.com>
+
+ PR sanitizer/85029
+ * sanopt.c (maybe_optimize_ubsan_ptr_ifn): If DECL_REGISTER (base),
+ just don't try to optimize it rather than assert it never happens.
+
2018-03-22 Kelvin Nilsen <kelvin@gcc.gnu.org>
* config/rs6000/rs6000-builtin.def: Remove various BU_ALTIVEC_X
&unsignedp, &reversep, &volatilep);
if ((offset == NULL_TREE || TREE_CODE (offset) == INTEGER_CST)
&& DECL_P (base)
+ && !DECL_REGISTER (base)
&& pbitpos.is_constant (&bitpos))
{
- gcc_assert (!DECL_REGISTER (base));
offset_int expr_offset;
if (offset)
expr_offset = wi::to_offset (offset) + bitpos / BITS_PER_UNIT;
+2018-03-23 Jakub Jelinek <jakub@redhat.com>
+
+ PR sanitizer/85029
+ * g++.dg/ubsan/pr85029.C: New test.
+
2018-03-23 Alexandre Oliva <aoliva@redhat.com>
PR c++/71251
* g++.old-deja/g++.robertl/eb58.C: Likewise.
* g++.old-deja/g++.robertl/eb63.C: Likewise.
-2018-03-22 Steven G. Kargl <kargl@gcc.gnu.org
+2018-03-22 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/84922
* gfortran.dg/interface_42.f90: New test.
--- /dev/null
+// PR sanitizer/85029
+// { dg-do compile }
+// { dg-skip-if "" { *-*-* } { "-flto -fno-fat-lto-objects" } }
+// { dg-options "-fsanitize=undefined" }
+
+struct B {
+ virtual B bar ();
+ int e;
+} register a; // { dg-error "register name not specified for 'a'" }
+
+int
+foo (...)
+{
+ return foo (a);
+}