Message ID | 1524495.xhjpCim1za@polaris |
---|---|
State | New |
Headers | show |
Index: gcc-interface/decl.c =================================================================== --- gcc-interface/decl.c (revision 204913) +++ gcc-interface/decl.c (working copy) @@ -1117,8 +1117,12 @@ gnat_to_gnu_entity (Entity_Id gnat_entit as we have a VAR_DECL for the pointer we make. */ } - gnu_expr = build_unary_op (ADDR_EXPR, gnu_type, - maybe_stable_expr); + if (type_annotate_only + && TREE_CODE (maybe_stable_expr) == ERROR_MARK) + gnu_expr = NULL_TREE; + else + gnu_expr = build_unary_op (ADDR_EXPR, gnu_type, + maybe_stable_expr); gnu_size = NULL_TREE; used_by_ref = true;