if (is_code_segment) t1 = build_code_segment_type (valtype, TYPE_ARG_TYPES (t2)); else t1 = build_function_type (valtype, TYPE_ARG_TYPES (t2)); t1 = build_type_attribute_variant (t1, attributes); return qualify_type (t1, t2);