aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
Diffstat (limited to 'gcc')
-rw-r--r--gcc/config/rs6000/rs6000-c.cc4
1 files changed, 4 insertions, 0 deletions
diff --git a/gcc/config/rs6000/rs6000-c.cc b/gcc/config/rs6000/rs6000-c.cc
index 2f0f4fe..84bb98f 100644
--- a/gcc/config/rs6000/rs6000-c.cc
+++ b/gcc/config/rs6000/rs6000-c.cc
@@ -1686,6 +1686,10 @@ find_instance (bool *unsupported_builtin, ovlddata **instance,
ovlddata *inst = *instance;
gcc_assert (inst != NULL);
+ /* It is possible for an instance to require a data type that isn't
+ defined on this target, in which case inst->fntype will be NULL. */
+ if (!inst->fntype)
+ return error_mark_node;
tree fntype = rs6000_builtin_info[inst->bifid].fntype;
tree parmtype0 = TREE_VALUE (TYPE_ARG_TYPES (fntype));
tree parmtype1 = TREE_VALUE (TREE_CHAIN (TYPE_ARG_TYPES (fntype)));