re PR c++/11006 ([CNI] ICE with use of __java_boolean)
/cp 2013-11-06 Paolo Carlini <paolo.carlini@oracle.com> PR c++/11006 * init.c (build_new_1): Don't call build_java_class_ref on non-class types. /testsuite 2013-11-06 Paolo Carlini <paolo.carlini@oracle.com> PR c++/11006 * g++.dg/other/java3.C: New. From-SVN: r204469
This commit is contained in:
parent
f038dae646
commit
71b71b96f0
4 changed files with 26 additions and 1 deletions
|
@ -1,3 +1,9 @@
|
|||
2013-11-06 Paolo Carlini <paolo.carlini@oracle.com>
|
||||
|
||||
PR c++/11006
|
||||
* init.c (build_new_1): Don't call build_java_class_ref on non-class
|
||||
types.
|
||||
|
||||
2013-11-05 Jason Merrill <jason@redhat.com>
|
||||
|
||||
PR c++/58868
|
||||
|
|
|
@ -2461,9 +2461,16 @@ build_new_1 (vec<tree, va_gc> **placement, tree type, tree nelts,
|
|||
if (vec_safe_is_empty (*placement) && TYPE_FOR_JAVA (elt_type))
|
||||
{
|
||||
tree class_addr;
|
||||
tree class_decl = build_java_class_ref (elt_type);
|
||||
tree class_decl;
|
||||
static const char alloc_name[] = "_Jv_AllocObject";
|
||||
|
||||
if (!MAYBE_CLASS_TYPE_P (elt_type))
|
||||
{
|
||||
error ("%qT isn%'t a valid Java class type", elt_type);
|
||||
return error_mark_node;
|
||||
}
|
||||
|
||||
class_decl = build_java_class_ref (elt_type);
|
||||
if (class_decl == error_mark_node)
|
||||
return error_mark_node;
|
||||
|
||||
|
|
|
@ -1,3 +1,8 @@
|
|||
2013-11-06 Paolo Carlini <paolo.carlini@oracle.com>
|
||||
|
||||
PR c++/11006
|
||||
* g++.dg/other/java3.C: New.
|
||||
|
||||
2013-11-06 Uros Bizjak <ubizjak@gmail.com>
|
||||
|
||||
PR target/59021
|
||||
|
|
7
gcc/testsuite/g++.dg/other/java3.C
Normal file
7
gcc/testsuite/g++.dg/other/java3.C
Normal file
|
@ -0,0 +1,7 @@
|
|||
// PR c++/11006
|
||||
|
||||
typedef int* jclass;
|
||||
|
||||
void foo () {
|
||||
new __java_boolean; // { dg-error "valid" }
|
||||
}
|
Loading…
Add table
Reference in a new issue