1 /* Handle types for the GNU compiler for the Java(TM) language.
2 Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2007, 2008
3 Free Software Foundation, Inc.
5 This file is part of GCC.
7 GCC is free software; you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation; either version 3, or (at your option)
12 GCC is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
17 You should have received a copy of the GNU General Public License
18 along with GCC; see the file COPYING3. If not see
19 <http://www.gnu.org/licenses/>.
21 Java and all Java-based marks are trademarks or registered trademarks
22 of Sun Microsystems, Inc. in the United States and other countries.
23 The Free Software Foundation is independent of Sun Microsystems, Inc. */
25 /* Written by Per Bothner <bothner@cygnus.com> */
29 #include "coretypes.h"
35 #include "java-tree.h"
41 static tree convert_ieee_real_to_integer (tree, tree);
42 static tree parse_signature_type (const unsigned char **,
43 const unsigned char *);
44 static tree lookup_do (tree, int, tree, tree, tree (*)(tree));
45 static tree build_null_signature (tree);
49 /* Set the type of the local variable with index SLOT to TYPE. */
52 set_local_type (int slot, tree type)
54 int max_locals = DECL_MAX_LOCALS(current_function_decl);
55 int nslots = TYPE_IS_WIDE (type) ? 2 : 1;
57 gcc_assert (slot >= 0 && (slot + nslots - 1 < max_locals));
59 type_map[slot] = type;
61 type_map[++slot] = void_type_node;
64 /* Convert an IEEE real to an integer type. The result of such a
65 conversion when the source operand is a NaN isn't defined by
66 IEEE754, but by the Java language standard: it must be zero. Also,
67 overflows must be clipped to within range. This conversion
68 produces something like:
70 ((expr >= (float)MAX_INT)
72 : ((expr <= (float)MIN_INT)
79 convert_ieee_real_to_integer (tree type, tree expr)
82 expr = save_expr (expr);
84 result = fold_build3 (COND_EXPR, type,
85 fold_build2 (NE_EXPR, boolean_type_node, expr, expr),
86 convert (type, integer_zero_node),
87 convert_to_integer (type, expr));
89 result = fold_build3 (COND_EXPR, type,
90 fold_build2 (LE_EXPR, boolean_type_node, expr,
91 convert (TREE_TYPE (expr),
92 TYPE_MIN_VALUE (type))),
93 TYPE_MIN_VALUE (type),
96 result = fold_build3 (COND_EXPR, type,
97 fold_build2 (GE_EXPR, boolean_type_node, expr,
98 convert (TREE_TYPE (expr),
99 TYPE_MAX_VALUE (type))),
100 TYPE_MAX_VALUE (type),
106 /* Create an expression whose value is that of EXPR,
107 converted to type TYPE. The TREE_TYPE of the value
108 is always TYPE. This function implements all reasonable
109 conversions; callers should filter out those that are
110 not permitted by the language being compiled. */
113 convert (tree type, tree expr)
115 enum tree_code code = TREE_CODE (type);
118 return error_mark_node;
120 if (type == TREE_TYPE (expr)
121 || TREE_CODE (expr) == ERROR_MARK)
123 if (TREE_CODE (TREE_TYPE (expr)) == ERROR_MARK)
124 return error_mark_node;
125 if (code == VOID_TYPE)
126 return build1 (CONVERT_EXPR, type, expr);
127 if (code == BOOLEAN_TYPE)
128 return fold_convert (type, expr);
129 if (code == INTEGER_TYPE)
131 if (type == char_type_node || type == promoted_char_type_node)
132 return fold_convert (type, expr);
133 if ((really_constant_p (expr) || ! flag_unsafe_math_optimizations)
134 && TREE_CODE (TREE_TYPE (expr)) == REAL_TYPE)
135 return convert_ieee_real_to_integer (type, expr);
138 /* fold very helpfully sets the overflow status if a type
139 overflows in a narrowing integer conversion, but Java
141 tree tmp = fold (convert_to_integer (type, expr));
142 if (TREE_CODE (tmp) == INTEGER_CST)
143 TREE_OVERFLOW (tmp) = 0;
147 if (code == REAL_TYPE)
148 return fold (convert_to_real (type, expr));
149 if (code == POINTER_TYPE)
150 return fold (convert_to_pointer (type, expr));
151 error ("conversion to non-scalar type requested");
152 return error_mark_node;
156 /* Return a data type that has machine mode MODE.
157 If the mode is an integer,
158 then UNSIGNEDP selects between signed and unsigned types. */
161 java_type_for_mode (enum machine_mode mode, int unsignedp)
163 if (mode == TYPE_MODE (int_type_node))
164 return unsignedp ? unsigned_int_type_node : int_type_node;
165 if (mode == TYPE_MODE (long_type_node))
166 return unsignedp ? unsigned_long_type_node : long_type_node;
167 if (mode == TYPE_MODE (short_type_node))
168 return unsignedp ? unsigned_short_type_node : short_type_node;
169 if (mode == TYPE_MODE (byte_type_node))
170 return unsignedp ? unsigned_byte_type_node : byte_type_node;
171 if (mode == TYPE_MODE (float_type_node))
172 return float_type_node;
173 if (mode == TYPE_MODE (double_type_node))
174 return double_type_node;
179 /* Return an integer type with BITS bits of precision,
180 that is unsigned if UNSIGNEDP is nonzero, otherwise signed. */
183 java_type_for_size (unsigned bits, int unsignedp)
185 if (bits <= TYPE_PRECISION (byte_type_node))
186 return unsignedp ? unsigned_byte_type_node : byte_type_node;
187 if (bits <= TYPE_PRECISION (short_type_node))
188 return unsignedp ? unsigned_short_type_node : short_type_node;
189 if (bits <= TYPE_PRECISION (int_type_node))
190 return unsignedp ? unsigned_int_type_node : int_type_node;
191 if (bits <= TYPE_PRECISION (long_type_node))
192 return unsignedp ? unsigned_long_type_node : long_type_node;
196 /* Thorough checking of the arrayness of TYPE. */
199 is_array_type_p (tree type)
201 return TREE_CODE (type) == POINTER_TYPE
202 && TREE_CODE (TREE_TYPE (type)) == RECORD_TYPE
203 && TYPE_ARRAY_P (TREE_TYPE (type));
206 /* Return the length of a Java array type.
207 Return -1 if the length is unknown or non-constant. */
210 java_array_type_length (tree array_type)
213 if (TREE_CODE (array_type) == POINTER_TYPE)
214 array_type = TREE_TYPE (array_type);
215 arfld = TREE_CHAIN (TREE_CHAIN (TYPE_FIELDS (array_type)));
216 if (arfld != NULL_TREE)
218 tree index_type = TYPE_DOMAIN (TREE_TYPE (arfld));
219 if (index_type != NULL_TREE)
221 tree high = TYPE_MAX_VALUE (index_type);
222 if (TREE_CODE (high) == INTEGER_CST)
223 return TREE_INT_CST_LOW (high) + 1;
229 /* An array of unknown length will be ultimately given a length of
230 -2, so that we can still have `length' producing a negative value
231 even if found. This was part of an optimization aiming at removing
232 `length' from static arrays. We could restore it, FIXME. */
235 build_prim_array_type (tree element_type, HOST_WIDE_INT length)
241 tree max_index = build_int_cst (sizetype, length - 1);
242 index = build_index_type (max_index);
244 return build_array_type (element_type, index);
247 /* Return a Java array type with a given ELEMENT_TYPE and LENGTH.
248 These are hashed (shared) using IDENTIFIER_SIGNATURE_TYPE.
249 The LENGTH is -1 if the length is unknown. */
252 build_java_array_type (tree element_type, HOST_WIDE_INT length)
254 tree sig, t, fld, atype, arfld;
256 tree elsig = build_java_signature (element_type);
257 tree el_name = element_type;
260 sprintf (buf+1, HOST_WIDE_INT_PRINT_DEC, length);
263 sig = ident_subst (IDENTIFIER_POINTER (elsig), IDENTIFIER_LENGTH (elsig),
265 t = IDENTIFIER_SIGNATURE_TYPE (sig);
267 return TREE_TYPE (t);
269 IDENTIFIER_SIGNATURE_TYPE (sig) = build_pointer_type (t);
270 TYPE_ARRAY_P (t) = 1;
272 if (TREE_CODE (el_name) == POINTER_TYPE)
273 el_name = TREE_TYPE (el_name);
274 el_name = TYPE_NAME (el_name);
275 if (TREE_CODE (el_name) == TYPE_DECL)
276 el_name = DECL_NAME (el_name);
280 sprintf (suffix, "[%d]", (int)length);
282 strcpy (suffix, "[]");
285 = build_decl (input_location, TYPE_DECL,
286 identifier_subst (el_name, "", '.', '.', suffix),
288 TYPE_DECL_SUPPRESS_DEBUG (TYPE_STUB_DECL (t)) = true;
291 set_java_signature (t, sig);
292 set_super_info (0, t, object_type_node, 0);
293 if (TREE_CODE (element_type) == RECORD_TYPE)
294 element_type = promote_type (element_type);
295 TYPE_ARRAY_ELEMENT (t) = element_type;
297 /* Add length pseudo-field. */
298 fld = build_decl (input_location,
299 FIELD_DECL, get_identifier ("length"), int_type_node);
300 TYPE_FIELDS (t) = fld;
301 DECL_CONTEXT (fld) = t;
302 FIELD_PUBLIC (fld) = 1;
303 FIELD_FINAL (fld) = 1;
304 TREE_READONLY (fld) = 1;
306 atype = build_prim_array_type (element_type, length);
307 arfld = build_decl (input_location,
308 FIELD_DECL, get_identifier ("data"), atype);
309 DECL_CONTEXT (arfld) = t;
310 TREE_CHAIN (fld) = arfld;
311 DECL_ALIGN (arfld) = TYPE_ALIGN (element_type);
313 /* We could layout_class, but that loads java.lang.Object prematurely.
314 * This is called by the parser, and it is a bad idea to do load_class
315 * in the middle of parsing, because of possible circularity problems. */
316 push_super_field (t, object_type_node);
322 /* Promote TYPE to the type actually used for fields and parameters. */
325 promote_type (tree type)
327 switch (TREE_CODE (type))
330 return build_pointer_type (type);
332 if (type == boolean_type_node)
333 return promoted_boolean_type_node;
336 if (type == char_type_node)
337 return promoted_char_type_node;
339 if (TYPE_PRECISION (type) < TYPE_PRECISION (int_type_node))
341 if (type == short_type_node)
342 return promoted_short_type_node;
343 if (type == byte_type_node)
344 return promoted_byte_type_node;
345 return int_type_node;
347 /* ... else fall through ... */
353 /* Parse a signature string, starting at *PTR and ending at LIMIT.
354 Return the seen TREE_TYPE, updating *PTR. */
357 parse_signature_type (const unsigned char **ptr, const unsigned char *limit)
360 gcc_assert (*ptr < limit);
364 case 'B': (*ptr)++; return byte_type_node;
365 case 'C': (*ptr)++; return char_type_node;
366 case 'D': (*ptr)++; return double_type_node;
367 case 'F': (*ptr)++; return float_type_node;
368 case 'S': (*ptr)++; return short_type_node;
369 case 'I': (*ptr)++; return int_type_node;
370 case 'J': (*ptr)++; return long_type_node;
371 case 'Z': (*ptr)++; return boolean_type_node;
372 case 'V': (*ptr)++; return void_type_node;
374 for ((*ptr)++; (*ptr) < limit && ISDIGIT (**ptr); ) (*ptr)++;
375 type = parse_signature_type (ptr, limit);
376 type = build_java_array_type (type, -1);
380 const unsigned char *start = ++(*ptr);
381 const unsigned char *str = start;
384 gcc_assert (str < limit);
389 type = lookup_class (unmangle_classname ((const char *) start, str - start));
395 return promote_type (type);
398 /* Parse a Java "mangled" signature string, starting at SIG_STRING,
399 and SIG_LENGTH bytes long.
400 Return a gcc type node. */
403 parse_signature_string (const unsigned char *sig_string, int sig_length)
406 const unsigned char *str = sig_string;
407 const unsigned char *limit = str + sig_length;
409 if (str < limit && str[0] == '(')
411 tree argtype_list = NULL_TREE;
413 while (str < limit && str[0] != ')')
415 tree argtype = parse_signature_type (&str, limit);
416 argtype_list = tree_cons (NULL_TREE, argtype, argtype_list);
418 if (str++, str >= limit)
420 result_type = parse_signature_type (&str, limit);
421 argtype_list = chainon (nreverse (argtype_list), end_params_node);
422 result_type = build_function_type (result_type, argtype_list);
425 result_type = parse_signature_type (&str, limit);
427 error ("junk at end of signature string");
431 /* Convert a signature to its type.
432 * Uses IDENTIFIER_SIGNATURE_TYPE as a cache (except for primitive types).
436 get_type_from_signature (tree signature)
438 const unsigned char *sig = (const unsigned char *) IDENTIFIER_POINTER (signature);
439 int len = IDENTIFIER_LENGTH (signature);
441 /* Primitive types aren't cached. */
443 return parse_signature_string (sig, len);
444 type = IDENTIFIER_SIGNATURE_TYPE (signature);
445 if (type == NULL_TREE)
447 type = parse_signature_string (sig, len);
448 IDENTIFIER_SIGNATURE_TYPE (signature) = type;
453 /* Ignore signature and always return null. Used by has_method. */
456 build_null_signature (tree type ATTRIBUTE_UNUSED)
461 /* Return the signature string for the arguments of method type TYPE. */
464 build_java_argument_signature (tree type)
466 extern struct obstack temporary_obstack;
467 tree sig = TYPE_ARGUMENT_SIGNATURE (type);
468 if (sig == NULL_TREE)
470 tree args = TYPE_ARG_TYPES (type);
471 if (TREE_CODE (type) == METHOD_TYPE)
472 args = TREE_CHAIN (args); /* Skip "this" argument. */
473 for (; args != end_params_node; args = TREE_CHAIN (args))
475 tree t = build_java_signature (TREE_VALUE (args));
476 obstack_grow (&temporary_obstack,
477 IDENTIFIER_POINTER (t), IDENTIFIER_LENGTH (t));
479 obstack_1grow (&temporary_obstack, '\0');
481 sig = get_identifier (obstack_base (&temporary_obstack));
482 TYPE_ARGUMENT_SIGNATURE (type) = sig;
483 obstack_free (&temporary_obstack, obstack_base (&temporary_obstack));
488 /* Return the signature of the given TYPE. */
491 build_java_signature (tree type)
494 while (TREE_CODE (type) == POINTER_TYPE)
495 type = TREE_TYPE (type);
496 MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC (type);
497 sig = TYPE_SIGNATURE (type);
498 if (sig == NULL_TREE)
501 switch (TREE_CODE (type))
503 case BOOLEAN_TYPE: sg[0] = 'Z'; goto native;
504 case VOID_TYPE: sg[0] = 'V'; goto native;
506 if (type == char_type_node || type == promoted_char_type_node)
511 switch (TYPE_PRECISION (type))
513 case 8: sg[0] = 'B'; goto native;
514 case 16: sg[0] = 'S'; goto native;
515 case 32: sg[0] = 'I'; goto native;
516 case 64: sg[0] = 'J'; goto native;
517 default: goto bad_type;
520 switch (TYPE_PRECISION (type))
522 case 32: sg[0] = 'F'; goto native;
523 case 64: sg[0] = 'D'; goto native;
524 default: goto bad_type;
528 sig = get_identifier (sg);
531 if (TYPE_ARRAY_P (type))
533 t = build_java_signature (TYPE_ARRAY_ELEMENT (type));
534 sig = ident_subst (IDENTIFIER_POINTER (t), IDENTIFIER_LENGTH (t),
539 t = DECL_NAME (TYPE_NAME (type));
540 sig = ident_subst (IDENTIFIER_POINTER (t), IDENTIFIER_LENGTH (t),
547 extern struct obstack temporary_obstack;
548 sig = build_java_argument_signature (type);
549 obstack_1grow (&temporary_obstack, '(');
550 obstack_grow (&temporary_obstack,
551 IDENTIFIER_POINTER (sig), IDENTIFIER_LENGTH (sig));
552 obstack_1grow (&temporary_obstack, ')');
554 t = build_java_signature (TREE_TYPE (type));
555 obstack_grow0 (&temporary_obstack,
556 IDENTIFIER_POINTER (t), IDENTIFIER_LENGTH (t));
558 sig = get_identifier (obstack_base (&temporary_obstack));
559 obstack_free (&temporary_obstack,
560 obstack_base (&temporary_obstack));
567 TYPE_SIGNATURE (type) = sig;
572 /* Save signature string SIG (an IDENTIFIER_NODE) in TYPE for future use. */
575 set_java_signature (tree type, tree sig)
578 while (TREE_CODE (type) == POINTER_TYPE)
579 type = TREE_TYPE (type);
580 MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC (type);
581 old_sig = TYPE_SIGNATURE (type);
582 if (old_sig != NULL_TREE && old_sig != sig)
584 TYPE_SIGNATURE (type) = sig;
585 #if 0 /* careful about METHOD_TYPE */
586 if (IDENTIFIER_SIGNATURE_TYPE (sig) == NULL_TREE && TREE_PERMANENT (type))
587 IDENTIFIER_SIGNATURE_TYPE (sig) = type;
591 /* Search in SEARCHED_CLASS and its superclasses for a method matching
592 METHOD_NAME and signature METHOD_SIGNATURE. This function will
593 only search for methods declared in the class hierarchy; interfaces
594 will not be considered. Returns NULL_TREE if the method is not
597 lookup_argument_method (tree searched_class, tree method_name,
598 tree method_signature)
600 return lookup_do (searched_class, 0,
601 method_name, method_signature,
602 build_java_argument_signature);
605 /* Like lookup_argument_method, but lets the caller set any flags
608 lookup_argument_method_generic (tree searched_class, tree method_name,
609 tree method_signature, int flags)
611 return lookup_do (searched_class, flags,
612 method_name, method_signature,
613 build_java_argument_signature);
617 /* Search in class SEARCHED_CLASS (and its superclasses) for a method
618 matching METHOD_NAME and signature METHOD_SIGNATURE. Return a
619 FUNCTION_DECL on success, or NULL_TREE if none found. (Contrast
620 lookup_argument_method, which ignores return type.) If
621 SEARCHED_CLASS is an interface, search it too. */
623 lookup_java_method (tree searched_class, tree method_name,
624 tree method_signature)
626 return lookup_do (searched_class, SEARCH_INTERFACE, method_name,
627 method_signature, build_java_signature);
630 /* Return true iff KLASS (or its ancestors) has a method METHOD_NAME. */
632 has_method (tree klass, tree method_name)
634 return lookup_do (klass, SEARCH_INTERFACE,
635 method_name, NULL_TREE,
636 build_null_signature) != NULL_TREE;
639 /* Search in class SEARCHED_CLASS, but not its superclasses, for a
640 method matching METHOD_NAME and signature SIGNATURE. A private
641 helper for lookup_do. */
643 shallow_find_method (tree searched_class, int flags, tree method_name,
644 tree signature, tree (*signature_builder) (tree))
647 for (method = TYPE_METHODS (searched_class);
648 method != NULL_TREE; method = TREE_CHAIN (method))
650 tree method_sig = (*signature_builder) (TREE_TYPE (method));
651 if (DECL_NAME (method) == method_name && method_sig == signature)
653 /* If the caller requires a visible method, then we
654 skip invisible methods here. */
655 if (! (flags & SEARCH_VISIBLE)
656 || ! METHOD_INVISIBLE (method))
663 /* Search in the superclasses of SEARCHED_CLASS for a method matching
664 METHOD_NAME and signature SIGNATURE. A private helper for
667 find_method_in_superclasses (tree searched_class, int flags,
668 tree method_name, tree signature,
669 tree (*signature_builder) (tree))
672 for (klass = CLASSTYPE_SUPER (searched_class); klass != NULL_TREE;
673 klass = CLASSTYPE_SUPER (klass))
676 method = shallow_find_method (klass, flags, method_name,
677 signature, signature_builder);
678 if (method != NULL_TREE)
685 /* Search in the interfaces of SEARCHED_CLASS and its superinterfaces
686 for a method matching METHOD_NAME and signature SIGNATURE. A
687 private helper for lookup_do. */
689 find_method_in_interfaces (tree searched_class, int flags, tree method_name,
690 tree signature, tree (*signature_builder) (tree))
693 tree binfo, base_binfo;
695 for (binfo = TYPE_BINFO (searched_class), i = 1;
696 BINFO_BASE_ITERATE (binfo, i, base_binfo); i++)
698 tree iclass = BINFO_TYPE (base_binfo);
701 /* If the superinterface hasn't been loaded yet, do so now. */
702 if (!CLASS_LOADED_P (iclass))
703 load_class (iclass, 1);
705 /* First, we look in ICLASS. If that doesn't work we'll
706 recursively look through all its superinterfaces. */
707 method = shallow_find_method (iclass, flags, method_name,
708 signature, signature_builder);
709 if (method != NULL_TREE)
712 method = find_method_in_interfaces
713 (iclass, flags, method_name, signature, signature_builder);
714 if (method != NULL_TREE)
722 /* Search in class SEARCHED_CLASS (and its superclasses) for a method
723 matching METHOD_NAME and signature SIGNATURE. FLAGS control some
724 parameters of the search.
726 SEARCH_INTERFACE means also search interfaces and superinterfaces
729 SEARCH_SUPER means skip SEARCHED_CLASS and start with its
732 SEARCH_VISIBLE means skip methods for which METHOD_INVISIBLE is
735 Return the matched method DECL or NULL_TREE. SIGNATURE_BUILDER is
736 used on method candidates to build their (sometimes partial)
739 lookup_do (tree searched_class, int flags, tree method_name,
740 tree signature, tree (*signature_builder) (tree))
743 tree orig_class = searched_class;
745 if (searched_class == NULL_TREE)
748 if (flags & SEARCH_SUPER)
750 searched_class = CLASSTYPE_SUPER (searched_class);
751 if (searched_class == NULL_TREE)
755 /* First look in our own methods. */
756 method = shallow_find_method (searched_class, flags, method_name,
757 signature, signature_builder);
761 /* Then look in our superclasses. */
762 if (! CLASS_INTERFACE (TYPE_NAME (searched_class)))
763 method = find_method_in_superclasses (searched_class, flags, method_name,
764 signature, signature_builder);
768 /* If that doesn't work, look in our interfaces. */
769 if (flags & SEARCH_INTERFACE)
770 method = find_method_in_interfaces (orig_class, flags, method_name,
771 signature, signature_builder);
776 /* Search in class CLAS for a constructor matching METHOD_SIGNATURE.
777 Return a FUNCTION_DECL on success, or NULL_TREE if none found. */
780 lookup_java_constructor (tree clas, tree method_signature)
782 tree method = TYPE_METHODS (clas);
783 for ( ; method != NULL_TREE; method = TREE_CHAIN (method))
785 tree method_sig = build_java_signature (TREE_TYPE (method));
786 if (DECL_CONSTRUCTOR_P (method) && method_sig == method_signature)
792 /* Return a type which is the Binary Numeric Promotion of the pair T1,
793 T2 and convert EXP1 and/or EXP2. See 5.6.2 Binary Numeric
794 Promotion. It assumes that both T1 and T2 are eligible to BNP. */
797 binary_numeric_promotion (tree t1, tree t2, tree *exp1, tree *exp2)
799 if (t1 == double_type_node || t2 == double_type_node)
801 if (t1 != double_type_node)
802 *exp1 = convert (double_type_node, *exp1);
803 if (t2 != double_type_node)
804 *exp2 = convert (double_type_node, *exp2);
805 return double_type_node;
807 if (t1 == float_type_node || t2 == float_type_node)
809 if (t1 != float_type_node)
810 *exp1 = convert (float_type_node, *exp1);
811 if (t2 != float_type_node)
812 *exp2 = convert (float_type_node, *exp2);
813 return float_type_node;
815 if (t1 == long_type_node || t2 == long_type_node)
817 if (t1 != long_type_node)
818 *exp1 = convert (long_type_node, *exp1);
819 if (t2 != long_type_node)
820 *exp2 = convert (long_type_node, *exp2);
821 return long_type_node;
824 if (t1 != int_type_node)
825 *exp1 = convert (int_type_node, *exp1);
826 if (t2 != int_type_node)
827 *exp2 = convert (int_type_node, *exp2);
828 return int_type_node;