aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorMark Mitchell <mmitchell@usa.net>1997-12-15 04:40:01 +0000
committerJason Merrill <jason@gcc.gnu.org>1997-12-14 23:40:01 -0500
commit3042d5bea216f3e39670cd679adb399f963e2436 (patch)
tree29ca97f99698e73b0bec81feffdac9096a63b83e /gcc
parentbe296fdb536bbfc8bfc1d4cfd507c1755eba5e31 (diff)
downloadgcc-3042d5bea216f3e39670cd679adb399f963e2436.zip
gcc-3042d5bea216f3e39670cd679adb399f963e2436.tar.gz
gcc-3042d5bea216f3e39670cd679adb399f963e2436.tar.bz2
call.c (implicit_conversion): Don't call build_user_type_conversion_1 with a NULL expr, since it will crash.
* call.c (implicit_conversion): Don't call build_user_type_conversion_1 with a NULL expr, since it will crash. * pt.c (unify): Don't try to unify array bounds if either array is unbounded. From-SVN: r17095
Diffstat (limited to 'gcc')
-rw-r--r--gcc/cp/ChangeLog9
-rw-r--r--gcc/cp/call.c3
-rw-r--r--gcc/cp/pt.c8
3 files changed, 17 insertions, 3 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index 7d1ab25..7184927 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -1,3 +1,12 @@
+Sun Dec 14 20:38:35 1997 Mark Mitchell <mmitchell@usa.net>
+
+ * call.c (implicit_conversion): Don't call
+ build_user_type_conversion_1 with a NULL expr, since it will
+ crash.
+
+ * pt.c (unify): Don't try to unify array bounds if either array is
+ unbounded.
+
Fri Dec 12 16:09:14 1997 Jason Merrill <jason@yorick.cygnus.com>
* errfn.c (cp_pedwarn, cp_pedwarn_at, cp_error_at, cp_warning_at):
diff --git a/gcc/cp/call.c b/gcc/cp/call.c
index 64f3a97..e3c3e51 100644
--- a/gcc/cp/call.c
+++ b/gcc/cp/call.c
@@ -3318,7 +3318,8 @@ implicit_conversion (to, from, expr, flags)
if (conv)
;
- else if ((IS_AGGR_TYPE (non_reference (from))
+ else if (expr != NULL_TREE
+ && (IS_AGGR_TYPE (non_reference (from))
|| IS_AGGR_TYPE (non_reference (to)))
&& (flags & LOOKUP_NO_CONVERSION) == 0)
{
diff --git a/gcc/cp/pt.c b/gcc/cp/pt.c
index 644370c..e3bfb34 100644
--- a/gcc/cp/pt.c
+++ b/gcc/cp/pt.c
@@ -3873,8 +3873,12 @@ unify (tparms, targs, ntparms, parm, arg, nsubsts, strict)
case ARRAY_TYPE:
if (TREE_CODE (arg) != ARRAY_TYPE)
return 1;
- if (unify (tparms, targs, ntparms, TYPE_DOMAIN (parm), TYPE_DOMAIN (arg),
- nsubsts, strict) != 0)
+ if ((TYPE_DOMAIN (parm) == NULL_TREE)
+ != (TYPE_DOMAIN (arg) == NULL_TREE))
+ return 1;
+ if (TYPE_DOMAIN (parm) != NULL_TREE
+ && unify (tparms, targs, ntparms, TYPE_DOMAIN (parm),
+ TYPE_DOMAIN (arg), nsubsts, strict) != 0)
return 1;
return unify (tparms, targs, ntparms, TREE_TYPE (parm), TREE_TYPE (arg),
nsubsts, strict);