summaryrefslogtreecommitdiff
path: root/gcc/c-convert.c
diff options
context:
space:
mode:
authordnovillo <dnovillo@138bc75d-0d04-0410-961f-82ee72b054a4>2004-05-13 06:41:07 +0000
committerdnovillo <dnovillo@138bc75d-0d04-0410-961f-82ee72b054a4>2004-05-13 06:41:07 +0000
commit4ee9c6840ad3fc92a9034343278a1e476ad6872a (patch)
treea2568888a519c077427b133de9ece5879a8484a5 /gcc/c-convert.c
parentebb338380ab170c91e64d38038e6b5ce930d69a1 (diff)
downloadgcc-4ee9c6840ad3fc92a9034343278a1e476ad6872a.tar.gz
Merge tree-ssa-20020619-branch into mainline.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@81764 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/c-convert.c')
-rw-r--r--gcc/c-convert.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/gcc/c-convert.c b/gcc/c-convert.c
index 582ec8bfe34..3067137c372 100644
--- a/gcc/c-convert.c
+++ b/gcc/c-convert.c
@@ -114,6 +114,9 @@ convert (tree type, tree expr)
return fold (convert_to_complex (type, e));
if (code == VECTOR_TYPE)
return fold (convert_to_vector (type, e));
+ if ((code == RECORD_TYPE || code == UNION_TYPE)
+ && lang_hooks.types_compatible_p (type, TREE_TYPE (expr)))
+ return e;
error ("conversion to non-scalar type requested");
return error_mark_node;