Skip to content

Commit fbb7f7a

Browse files
author
paolo
committed
/cp
2010-07-02 Paolo Carlini <[email protected]> PR c++/44039 * pt.c (tsubst_baselink): Return error_mark_node if lookup_fnfields returns NULL_TREE. /testsuite 2010-07-02 Paolo Carlini <[email protected]> PR c++/44039 * g++.dg/template/crash101.C: New. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@161698 138bc75d-0d04-0410-961f-82ee72b054a4
1 parent 019fb48 commit fbb7f7a

File tree

4 files changed

+25
-0
lines changed

4 files changed

+25
-0
lines changed

gcc/cp/ChangeLog

+6
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
2010-07-02 Paolo Carlini <[email protected]>
2+
3+
PR c++/44039
4+
* pt.c (tsubst_baselink): Return error_mark_node if lookup_fnfields
5+
returns NULL_TREE.
6+
17
2010-07-01 Richard Guenther <[email protected]>
28

39
* cp-gimplify.c (cp_gimplify_expr): Open-code the rhs

gcc/cp/pt.c

+2
Original file line numberDiff line numberDiff line change
@@ -10737,6 +10737,8 @@ tsubst_baselink (tree baselink, tree object_type,
1073710737
if (IDENTIFIER_TYPENAME_P (name))
1073810738
name = mangle_conv_op_name_for_type (optype);
1073910739
baselink = lookup_fnfields (qualifying_scope, name, /*protect=*/1);
10740+
if (!baselink)
10741+
return error_mark_node;
1074010742

1074110743
/* If lookup found a single function, mark it as used at this
1074210744
point. (If it lookup found multiple functions the one selected

gcc/testsuite/ChangeLog

+5
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
2010-07-02 Paolo Carlini <[email protected]>
2+
3+
PR c++/44039
4+
* g++.dg/template/crash101.C: New.
5+
16
2010-07-02 Iain Sandoe <[email protected]>
27

38
* obj-c++.dg/cxx-ivars-3.mm: Make the test require OSX <= 10.4.
+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
// PR c++/44039
2+
3+
struct locale { };
4+
5+
template<class charT>
6+
void
7+
foo()
8+
{ locale::locale(); } // // { dg-error "cannot call|function-style" }
9+
10+
void
11+
bar()
12+
{ foo<char>(); }

0 commit comments

Comments
 (0)