summaryrefslogtreecommitdiff
path: root/gcc/cp/error.c
diff options
context:
space:
mode:
authormpolacek <mpolacek@138bc75d-0d04-0410-961f-82ee72b054a4>2014-12-01 15:29:11 +0000
committermpolacek <mpolacek@138bc75d-0d04-0410-961f-82ee72b054a4>2014-12-01 15:29:11 +0000
commit6b71bdb441780c191383d997c7f878920efaebcb (patch)
treeab16ac18207414d807131a6cc0d31d9904341699 /gcc/cp/error.c
parentdd418b395da1d1dece33d60ea8268a4a9fbf8627 (diff)
downloadgcc-6b71bdb441780c191383d997c7f878920efaebcb.tar.gz
PR sanitizer/63956
* ubsan.c (is_ubsan_builtin_p): Check also built-in class. cp/ * constexpr.c: Include ubsan.h. (cxx_eval_call_expression): Bail out for IFN_UBSAN_{NULL,BOUNDS} internal functions and for ubsan builtins. * error.c: Include internal-fn.h. (dump_expr): Add printing of internal functions. testsuite/ * c-c++-common/ubsan/shift-5.c: Add xfails. * g++.dg/ubsan/div-by-zero-1.C: Don't use -w. Add xfail. * g++.dg/ubsan/pr63956.C: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@218221 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cp/error.c')
-rw-r--r--gcc/cp/error.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/gcc/cp/error.c b/gcc/cp/error.c
index 5dcc149e185..ff26fb91f73 100644
--- a/gcc/cp/error.c
+++ b/gcc/cp/error.c
@@ -33,6 +33,7 @@ along with GCC; see the file COPYING3. If not see
#include "tree-pretty-print.h"
#include "c-family/c-objc.h"
#include "ubsan.h"
+#include "internal-fn.h"
#include <new> // For placement-new.
@@ -2039,6 +2040,14 @@ dump_expr (cxx_pretty_printer *pp, tree t, int flags)
tree fn = CALL_EXPR_FN (t);
bool skipfirst = false;
+ /* Deal with internal functions. */
+ if (fn == NULL_TREE)
+ {
+ pp_string (pp, internal_fn_name (CALL_EXPR_IFN (t)));
+ dump_call_expr_args (pp, t, flags, skipfirst);
+ break;
+ }
+
if (TREE_CODE (fn) == ADDR_EXPR)
fn = TREE_OPERAND (fn, 0);