summaryrefslogtreecommitdiff
path: root/gcc/cp/rtti.c
diff options
context:
space:
mode:
authormrs <mrs@138bc75d-0d04-0410-961f-82ee72b054a4>1996-04-05 18:07:00 +0000
committermrs <mrs@138bc75d-0d04-0410-961f-82ee72b054a4>1996-04-05 18:07:00 +0000
commitbae9fce78f5f7ea80aa750ab26356363a8cca6ec (patch)
tree8a343198dabd156e47435a027112d522a10d8bf8 /gcc/cp/rtti.c
parentbd297402ff47260f898aae54051b7f749ffe53e3 (diff)
downloadgcc-bae9fce78f5f7ea80aa750ab26356363a8cca6ec.tar.gz
86th Cygnus<->FSF quick merge
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@11672 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cp/rtti.c')
-rw-r--r--gcc/cp/rtti.c17
1 files changed, 8 insertions, 9 deletions
diff --git a/gcc/cp/rtti.c b/gcc/cp/rtti.c
index 4a762eb58b5..bd6a0acaf01 100644
--- a/gcc/cp/rtti.c
+++ b/gcc/cp/rtti.c
@@ -196,7 +196,7 @@ build_dynamic_cast (type, expr)
goto fail;
if (TREE_CODE (TREE_TYPE (exprtype)) != RECORD_TYPE)
goto fail;
- if (TYPE_SIZE (TREE_TYPE (exprtype)) == 0)
+ if (TYPE_SIZE (TREE_TYPE (exprtype)) == NULL_TREE)
goto fail;
if (TREE_READONLY (TREE_TYPE (exprtype)) &&
! TYPE_READONLY (TREE_TYPE (type)))
@@ -205,9 +205,11 @@ build_dynamic_cast (type, expr)
break;
/* else fall through */
case REFERENCE_TYPE:
- if (TREE_CODE (TREE_TYPE (type)) == RECORD_TYPE
- && TYPE_SIZE (TREE_TYPE (type)) != NULL_TREE)
- break;
+ if (TREE_CODE (TREE_TYPE (type)) != RECORD_TYPE)
+ goto fail;
+ if (TYPE_SIZE (TREE_TYPE (type)) == NULL_TREE)
+ goto fail;
+ break;
/* else fall through */
default:
goto fail;
@@ -230,7 +232,7 @@ build_dynamic_cast (type, expr)
goto fail;
if (TREE_CODE (TREE_TYPE (exprtype)) != RECORD_TYPE)
goto fail;
- if (TYPE_SIZE (TREE_TYPE (exprtype)) == 0)
+ if (TYPE_SIZE (TREE_TYPE (exprtype)) == NULL_TREE)
goto fail;
if (TREE_READONLY (TREE_TYPE (exprtype)) &&
! TYPE_READONLY (TREE_TYPE (type)))
@@ -308,10 +310,7 @@ build_dynamic_cast (type, expr)
else
td1 = build_typeid (expr);
- if (tc == POINTER_TYPE)
- td2 = get_typeid (TREE_TYPE (type));
- else
- td2 = get_typeid (TYPE_MAIN_VARIANT (TREE_TYPE (type)));
+ td2 = get_typeid (TYPE_MAIN_VARIANT (TREE_TYPE (type)));
elems = tree_cons (NULL_TREE, td2,
tree_cons (NULL_TREE, build_int_2 (1, 0),