aboutsummaryrefslogtreecommitdiff
path: root/gcc/builtins.c
AgeCommit message (Collapse)AuthorFilesLines
2005-03-30tree.def (FILE_TYPE): Removed.Tom Tromey1-1/+0
gcc: * tree.def (FILE_TYPE): Removed. * typeclass.h (enum type_class): Removed file_type_class. * dwarf2out.c (is_base_type): Updated. (gen_type_die): Likewise. * dbxout.c (dbxout_type): Updated. * builtins.c (type_to_class): Updated. * tree.c (type_contains_placeholder_1): Updated. * config/sparc/sparc.c (sparc_type_code): Updated. * config/ia64/ia64.c (hfa_element_mode): Updated. * expr.c (count_type_elements): Updated. * stor-layout.c (layout_type): Updated. * tree-inline.c (remap_type): Updated. * tree-pretty-print.c (dump_generic_node): Updated. gcc/java: * decl.c (gnat_substitute_in_type): Don't handle FILE_TYPE. From-SVN: r97282
2005-03-30Fix problem with calling powi* builtins.Fariborz Jahanian1-4/+8
OKed by Richard Henderson. From-SVN: r97278
2005-03-30re PR target/20203 (unrecognizable insn when using long long and memset)Alan Modra1-6/+2
PR target/20203 * builtins.c (get_memory_rtx): Expand address exp using EXPAND_NORMAL. Remove convert_memory_address call duplicating that in memory_address. From-SVN: r97233
2005-03-24optabs.h (enum optab_index): Remove OTI_llrint.Uros Bizjak1-2/+1
* optabs.h (enum optab_index): Remove OTI_llrint. (llrint_optab): Remove macro. * optabs.c (init_optabs): Remove llrint_optab initialization. * genopinit.c (optabs): Remove llrint_optab implementation. * builtins.c (expand_builtin_mathfn): Handle BUILT_IN_LLRINT{,F,L} using lrint_optab. From-SVN: r96983
2005-03-21optabs.h (enum optab_index): Add new OTI_lrint and OTI_llrint.Uros Bizjak1-0/+14
* optabs.h (enum optab_index): Add new OTI_lrint and OTI_llrint. (lrint_optab, llrint_optab): Define corresponding macros. * optabs.c (init_optabs): Initialize lrint_optab and llrint_optab. * genopinit.c (optabs): Implement lrint_optab using lrintsi2 pattern and llrint_optab using llrintdi2 patterns. * builtins.c (expand_builtin_mathfn): Handle BUILT_IN_LRINT{,F,L} using lrint_optab and BUILT_IN_LLRINT{,F,L} using llrint_optab. (expand_builtin): Expand BUILT_IN_LRINT{,F,L} and BUILT_IN_LLRINT{,F,L} using expand_builtin_mathfn if flag_unsafe_math_optimizations is set. testsuite: * gcc.dg/builtins-46.c: Also check lrint* and llrint*. From-SVN: r96802
2005-03-21builtins.c (fold_builtin): Take decomposed arguments of CALL_EXPR.Kazu Hirata1-5/+2
* builtins.c (fold_builtin): Take decomposed arguments of CALL_EXPR. * fold-const.c (fold_ternary): Update a call to fold_builtin. * gimplify.c (gimplify_call_expr): Likewise. * tree-ssa-ccp.c (ccp_fold, ccp_fold_builtin): Likewise. * tree.h: Update the prototype of fold_builtin. From-SVN: r96800
2005-03-21builtins.c (fold_builtin_1): Take decomposed arguments of CALL_EXPR.Kazu Hirata1-5/+6
* builtins.c (fold_builtin_1): Take decomposed arguments of CALL_EXPR. From-SVN: r96797
2005-03-20builtins.c (fold_builtin_1): Update a call to targetm.fold_builtin.Kazu Hirata1-1/+1
* builtins.c (fold_builtin_1): Update a call to targetm.fold_builtin. * hooks.c (hook_tree_tree_bool_null): Rename to hook_tree_tree_tree_bool_null. Take one more argument of type tree. * hooks.h: Update the prototype of hook_tree_tree_bool_null. * target-def.h (TARGET_FOLD_BUILTIN): Define it as hook_tree_tree_tree_bool_null. * target.h (gcc_target): Update the prototype of fold_builtin. * config/alpha/alpha.c (alpha_fold_builtin): Take decomposed arguments of CALL_EXPR. * doc/tm.texi (TARGET_FOLD_BUILTIN): Update. Mention the new prototype. From-SVN: r96762
2005-03-20builtins.c (fold_fixed_mathfn, [...]): Take decomposed arguments of CALL_EXPR.Kazu Hirata1-29/+17
* builtins.c (fold_fixed_mathfn, fold_builtin_trunc, fold_builtin_floor, fold_builtin_ceil, fold_builtin_lround): Take decomposed arguments of CALL_EXPR. (fold_builtin_1): Update calls to the functions mentioned above. From-SVN: r96759
2005-03-19builtins.c (fold_trunc_transparent_mathfn): Take decomposed arguments of ↵Kazu Hirata1-9/+7
CALL_EXPR. * builtins.c (fold_trunc_transparent_mathfn): Take decomposed arguments of CALL_EXPR. (fold_builtin_trunc, fold_builtin_floor, fold_builtin_ceil, fold_builtin_found, fold_builtin_1): Update calls to fold_trunc_transparent_mathfn. From-SVN: r96736
2005-03-19builtins.c (fold_builtin_memcpy): Take decomposed arguments of CALL_EXPR.Kazu Hirata1-6/+5
* builtins.c (fold_builtin_memcpy): Take decomposed arguments of CALL_EXPR. (expand_builtin_memcpy, fold_builtin_1): Update calls to fold_builtin_memcpy. From-SVN: r96735
2005-03-18builtins.c (fold_builtin_signbit): Take decomposed arguments of CALL_EXPR.Kazu Hirata1-5/+3
* builtins.c (fold_builtin_signbit): Take decomposed arguments of CALL_EXPR. (fold_builtin_1): Update a call to fold_builtin_signbit. From-SVN: r96649
2005-03-18builtins.c (fold_builtin_bitop): Take decomposed arguments of CALL_EXPR.Kazu Hirata1-5/+3
* builtins.c (fold_builtin_bitop): Take decomposed arguments of CALL_EXPR. (fold_builtin_1): Update a call to fold_builtin_bitop. From-SVN: r96648
2005-03-16builtins.c (expand_movstr): Update a call to fold_builtin_strcpy.Kazu Hirata1-10/+8
* builtins.c (expand_movstr): Update a call to fold_builtin_strcpy. (expand_builtin_strncpy): Update a call to fold_builtin_strncpy. (fold_builtin_strcpy, fold_builtin_strncpy): Take decomosed arguments of CALL_EXPR. (fold_builtin_1): Update calls to fold_builtin_strcpy and fold_builtin_strncpy. * tree-ssa-ccp.c (ccp_fold_builtin): Likewise. * tree.h: Update the prototypes of fold_builtin_strcpy and fold_builtin_strncpy. From-SVN: r96555
2005-03-15real.h (struct real_format): Split the signbit field into two two fields, ↵Roger Sayle1-1/+1
signbit_ro and signbit_rw. * real.h (struct real_format): Split the signbit field into two two fields, signbit_ro and signbit_rw. * real.c (ieee_single_format, mips_single_format, ieee_double_format, mips_double_format, ieee_extended_motorola_format, ieee_extended_intel_96_format, ieee_extended_intel_96_round_53_format, ieee_extended_intel_128_format, ibm_extended_format, mips_extended_format, ieee_quad_format, mips_quad_format, vax_f_format, vax_d_format, vax_g_format, i370_single_format, i370_double_format, c4x_single_format, c4x_extended_format, real_internal_format): Update initializers for new field. * builtins.c (expand_builtin_signbit): Use signbit_ro field of the real_format structure. * optabs.c (expand_absneg_bit, expand_copysign): Use signbit_rw field of the real_format structure. From-SVN: r96471
2005-03-13builtins.c (expand_builtin_mathfn_3): Remove local variable before_call.Kazu Hirata1-3/+1
* builtins.c (expand_builtin_mathfn_3): Remove local variable before_call. From-SVN: r96372
2005-03-13builtins.c (fold_trunc_transparent_mathfn, [...]): Use TYPE (TYPE (fndecl)) ↵Kazu Hirata1-17/+28
instead of TREE_TYPE (exp). * builtins.c (fold_trunc_transparent_mathfn, fold_fixed_mathfn, fold_builtin_atan, fold_builtin_trunc, fold_builtin_floor, fold_builtin_ceil, fold_builtin_round, fold_builtin_lround, fold_builtin_bitop, fold_builtin_memcpy, fold_builtin_strcpy, fold_builtin_strncpy, fold_builtin_signbit): Use TYPE (TYPE (fndecl)) instead of TREE_TYPE (exp). From-SVN: r96371
2005-03-13builtins.c (fold_builtin_classify): Take decomposed arguments of CALL_EXPR.Kazu Hirata1-6/+4
* builtins.c (fold_builtin_classify): Take decomposed arguments of CALL_EXPR. (fold_builtin_1): Update a call to fold_builtin_classify. From-SVN: r96364
2005-03-12builtins.c (fold_builtin_logarithm): Take decomposed arguments of CALL_EXPR.Kazu Hirata1-7/+5
* builtins.c (fold_builtin_logarithm): Take decomposed arguments of CALL_EXPR. (fold_builtin_1): Update a call to fold_builtin_logarithm. From-SVN: r96342
2005-03-12builtins.c (fold_builtin_exponent): Take decomposed arguments of CALL_EXPR.Kazu Hirata1-7/+5
* builtins.c (fold_builtin_exponent): Take decomposed arguments of CALL_EXPR. (fold_builtin_1): Update a call to fold_builtin_exponent. From-SVN: r96341
2005-03-12re PR middle-end/20419 (ICE in gen_lowpart_general, at rtlhooks.c:58)Roger Sayle1-0/+5
PR middle-end/20419 * builtins.c (expand_builtin_signbit): Force the signbit's word into an integer register to avoid SUBREGs of floating point modes. From-SVN: r96328
2005-03-10builtins.c (expand_builtin_signbit): Extend to handle floating point modes ↵Roger Sayle1-34/+39
wider than the largest integer type... * builtins.c (expand_builtin_signbit): Extend to handle floating point modes wider than the largest integer type, using the operand_subword_force function to obtain the signbit's word. * gcc.dg/builtins-32.c: Add new run-time tests for long double. From-SVN: r96263
2005-03-09builtins.c (fold_builtin_cbrt, [...]): Rearrange code.Kaveh R. Ghazi1-61/+121
* builtins.c (fold_builtin_cbrt, fold_builtin_pow): Rearrange code. Add more cbrt transformations. testsuite: * gcc.dg/builtins-10.c: Reactivate disabled test. * gcc.dg/torture/builtin-power-1.c: Likewise. Also add tests for new cbrt transformations. From-SVN: r96206
2005-03-09builtins.c (fold_builtin_unordered_cmp): Change prototype to take a fndecl ↵Roger Sayle1-11/+12
and an arglist instead of a CALL_EXPR, exp. * builtins.c (fold_builtin_unordered_cmp): Change prototype to take a fndecl and an arglist instead of a CALL_EXPR, exp. From-SVN: r96196
2005-02-24re PR middle-end/19953 (Special-case real + complex arithmetic operation ↵Richard Henderson1-1/+47
(-ffast-math)) PR middle-end/19953 * builtins.c (fold_builtin_complex_mul, fold_builtin_complex_div): New. (fold_builtin_1): Call them. * fold-const.c (fold_complex_mult_parts): Split out from ... (fold_complex_mult): ... here. Fix typo in both imaginary case. (fold_complex_div_parts, fold_complex_div): New. (fold): Use them. * tree.h (fold_complex_mult_parts, fold_complex_div_parts): Declare. From-SVN: r95511
2005-02-20re PR middle-end/18785 (isdigit builtin function fails with EBCDIC character ↵Zack Weinberg1-4/+11
sets) PR 18785 libcpp: * charset.c (LAST_POSSIBLY_BASIC_SOURCE_CHAR): New helper macro. (cpp_host_to_exec_charset): New function. * include/cpplib.h: Declare cpp_host_to_exec_charset. gcc: * langhooks.h (struct lang_hooks): Add to_target_charset. * langhooks.c (lhd_to_target_charset): New function. * langhooks-def.h: Declare lhd_to_target_charset. (LANG_HOOKS_TO_TARGET_CHARSET): New macro. (LANG_HOOKS_INITIALIZER): Update. * c-common.c (c_common_to_target_charset): New function. * c-common.h: Declare it. * c-objc-common.h (LANG_HOOKS_TO_TARGET_CHARSET): Set to c_common_to_target_charset. * defaults.c (TARGET_BELL, TARGET_BS, TARGET_CR, TARGET_DIGIT0) (TARGET_ESC, TARGET_FF, TARGET_NEWLINE, TARGET_TAB, TARGET_VT): Delete definitions. * system.h: Poison them. * doc/tm.texi: Don't discuss them. * builtins.c (fold_builtin_isdigit): Use lang_hooks.to_target_charset. * c-pretty-print.c (pp_c_integer_constant): Don't use pp_c_char. (pp_c_char): Do not attempt to generate letter escapes for newline, tab, etc. * config/arm/arm.c (output_ascii_pseudo_op): Likewise. * config/mips/mips.c (mips_output_ascii): Likewise. gcc/cp: * cp-objcp-common.h (LANG_HOOKS_TO_TARGET_CHARSET): Set to c_common_to_target_charset. Delete bogus comment. gcc/testsuite: * gcc.dg/charset/builtin1.c: New test. From-SVN: r95304
2005-02-17builtins.c (expand_builtin_return_addr): Remove tem parameter.Andreas Krebbel1-5/+9
2005-02-17 Andreas Krebbel <krebbel1@de.ibm.com> * builtins.c (expand_builtin_return_addr): Remove tem parameter. tem becomes a local variable which is set to the value of the back end defined INITIAL_FRAME_ADDRESS macro. (expand_builtin_frame_address): Omit the base parameter to expand_builtin_return_addr. (expand_builtin_profile_func): Likewise. * config/s390/s390.h (INITIAL_FRAME_ADDRESS_RTX): Define new macro. (DYNAMIC_CHAIN_ADDRESS): Remove the case for the initial frame. * doc/tm.texi: Documentation for INITIAL_FRAME_ADDRESS_RTX added. From-SVN: r95194
2005-02-16re PR tree-optimization/19967 (built-in folding causes excess diagnostics)Kazu Hirata1-36/+44
PR tree-optimization/19967 * builtins.c (expand_builtin_strstr, expand_builtin_strpbrk, expand_builtin_strchr, expand_builtin_strrchr): Take a new argument TYPE. Adjust calls to fold_builtin_XXX. (expand_builtin, fold_builtin_1): Adjust calls to expand_builtin_XXX. (fold_builtin_strchr, fold_builtin_strpbrk, fold_builtin_strstr, fold_builtin_strrchr): Convert the folded result to a requested type TYPE. * testsuite/gcc.dg/pr19967.c: New. From-SVN: r95109
2005-02-12optabs.h (enum optab_index): Add new OTI_ldexp.Uros Bizjak1-1/+14
* optabs.h (enum optab_index): Add new OTI_ldexp. (ldexp_optab): Define corresponding macro. * optabs.c (init_optabs): Initialize ldexp_optab. * genopinit.c (optabs): Implement ldexp_optab using ldexp?f3 patterns. * builtins.c (expand_builtin_mathfn_2): Handle BUILT_IN_LDEXP{,F,L} using ldexp_optab. (expand_builtin): Expand BUILT_IN_LDEXP{,F,L} using expand_builtin_mathfn_2 if flag_unsafe_math_optimizations is set. * config/i386/i386.md (ldexpsf3, ldexpdf3, ldexpxf3): New expanders to implement ldexpf, ldexp and ldexpl built-ins as inline x87 intrinsics. testsuite: * gcc.dg/builtins-34.c: Also check ldexp*. From-SVN: r94931
2005-02-11tree-complex.c (expand_complex_libcall): New.Richard Henderson1-1/+1
* tree-complex.c (expand_complex_libcall): New. (expand_complex_multiplication): Use it for c99 compliance. (expand_complex_division): Likewise. * fold-const.c (fold_complex_add, fold_complex_mult): New. (fold): Call them. * builtins.c (built_in_names): Remove const. * tree.c (build_common_builtin_nodes): Build complex arithmetic builtins. * tree.h (BUILT_IN_COMPLEX_MUL_MIN, BUILT_IN_COMPLEX_MUL_MAX): New. (BUILT_IN_COMPLEX_DIV_MIN, BUILT_IN_COMPLEX_DIV_MAX): New. (built_in_names): Remove const. * c-common.c (c_common_type_for_mode): Handle complex modes. * flags.h, toplev.c (flag_complex_method): Rename from flag_complex_divide_method. * libgcc2.c (__divsc3, __divdc3, __divxc3, __divtc3, __mulsc3, __muldc3, __mulxc3, __multc3): New. * libgcc2.h: Declare them. * libgcc-std.ver: Export them. * mklibgcc.in (lib2funcs): Build them. From-SVN: r94909
2005-02-10builtins.c (fold_builtin_powi): New function.Richard Guenther1-0/+53
2005-02-10 Richard Guenther <rguenth@gcc.gnu.org> * builtins.c (fold_builtin_powi): New function. (fold_builtin_1): Call it. * gcc.dg/builtins-52.c: New testcase. From-SVN: r94831
2005-02-09builtins.c (DEF_BUILTIN): Add COND argument.Richard Henderson1-1/+1
* builtins.c (DEF_BUILTIN): Add COND argument. * tree.h (DEF_BUILTIN): Likewise. * builtins.def (DEF_GCC_BUILTIN, DEF_LIB_BUILTIN, DEF_EXT_LIB_BUILTIN, DEF_C94_BUILTIN, DEF_C99_BUILTIN, DEF_C99_C90RES_BUILTIN): Update to match. (DEF_BUILTIN_STUB): New. (BUILT_IN_STACK_SAVE, BUILT_IN_STACK_RESTORE, BUILT_IN_INIT_TRAMPOLINE, BUILT_IN_ADJUST_TRAMPOLINE, BUILT_IN_NONLOCAL_GOTO, BUILT_IN_PROFILE_FUNC_ENTER, BUILT_IN_PROFILE_FUNC_EXIT): Use it. * c-common.c (DEF_BUILTIN): Add COND argument. * tree.c (local_define_builtin): New. (build_common_builtin_nodes): New. ada/ * utils.c (gnat_define_builtin): Remove. (gnat_install_builtins): Use build_common_builtin_nodes. fortran/ * f95-lang.c (gfc_init_builtin_functions): Call build_common_builtin_nodes; do not define any functions handled by it. java/ * builtins.c (initialize_builtins): Call build_common_builtin_nodes. * decl.c (java_init_decl_processing): Initialize const_ptr_type_node. treelang/ * treetree.c (treelang_init_decl_processing): Call build_common_builtin_nodes. From-SVN: r94785
2005-02-09fold-const.c (fold_strip_sign_ops): New function to simplify a floating ↵Roger Sayle1-14/+34
point expression ignoring the sign of the... * fold-const.c (fold_strip_sign_ops): New function to simplify a floating point expression ignoring the sign of the result. (fold) <ABS_EXPR>: Use it to simplify fabs(x). (fold) <MULT_EXPR>: Use it to simplify x*x. * tree.h (fold_strip_sign_ops): Prototype here. * builtins.c (fold_builtin_copysign): Take an additional FNDECL argument. Use fold_strip_sign_ops to simplify the first argument. (fold_builtin_pow): Use fold_strip_sign_ops to simplify the first argument when the second argument is an even integer constant, but only with -funsafe_math_optimizations. (fold_builtin_1): Update call to fold_builtin_copysign. * gcc.dg/builtins-48.c: New test case. * gcc.dg/builtins-49.c: New test case. * gcc.dg/builtins-50.c: New test case. * gcc.dg/builtins-51.c: New test case. From-SVN: r94779
2005-02-09re PR middle-end/19402 (__builtin_powi? still missing)Richard Guenther1-0/+69
2005-02-09 Richard Guenther <rguenth@gcc.gnu.org> PR middle-end/19402 * builtins.def: New __builtin_powi[lf]. * builtins.c (mathfn_built_in): Handle BUILT_IN_POWI. (expand_builtin_powi): New function. (expand_builtin): Dispatch to expand_builtin_powi. * libgcc2.h: Add prototypes for __builtin_powi[lf]. * libgcc2.c: Add __builtin_powi[lf] implementation. * mklibgcc.in: Add __builtin_powi[lf] to lib2funcs. * optabs.h: Add powi_optab. * optabs.c (init_optabs): Initialize powi_optab. * doc/extend.texi: Document __builtin_powi[lf]. * gcc.dg/pr19402-1.c: New testcase. * gcc.dg/pr19402-2.c: likewise. From-SVN: r94774
2005-02-07re PR middle-end/19775 (sqrt(pow(x,y)) != pow(x,y*0.5) (with -ffast-math))Richard Guenther1-3/+6
2005-02-07 Richard Guenther <rguenth@gcc.gnu.org> PR middle-end/19775 * builtins.c (fold_builtin_sqrt): Transform sqrt(pow(x,y)) to pow(fabs(x),y*0.5), not pow(x,y*0.5). * gcc.dg/torture/builtin-power-1.c: Disable test for invalid transformation. * gcc.dg/builtins-10.c: Likewise. Disable one test we no longer optimize. * gcc.dg/builtins-47.c: New testcase. From-SVN: r94701
2005-01-27builtins.c (expand_builtin_copysign): New.Richard Henderson1-0/+31
* builtins.c (expand_builtin_copysign): New. (expand_builtin): Call it. * genopinit.c (optabs): Add copysign_optab. * optabs.c (init_optabs): Initialize it. (expand_copysign): New. * optabs.h (OTI_copysign, copysign_optab): New. (expand_copysign): Declare. * config/alpha/alpha.md (UNSPEC_COPYSIGN): New. (copysignsf3, ncopysignsf3, copysigndf3, ncopysigndf3): New. * config/i386/i386.c (ix86_build_signbit_mask): Split from ... (ix86_expand_fp_absneg_operator): ... here. (ix86_split_copysign): New. * config/i386/i386-protos.h: Update. * config/i386/i386.md (UNSPEC_COPYSIGN): New. (copysignsf3, copysigndf3): New. * config/ia64/ia64.md (UNSPEC_COPYSIGN): New. (copysignsf3, ncopysignsf3): New. (copysigndf3, ncopysigndf3): New. (copysignxf3, ncopysignxf3): New. * config/ia64/ia64.c (rtx_needs_barrier): Handle UNSPEC_COPYSIGN. From-SVN: r94357
2005-01-24builtins.c (get_pointer_alignment, [...]): Use POINTER_TYPE_P instead ↵Jakub Jelinek1-13/+19
TREE_CODE checking against POINTER_TYPE. * builtins.c (get_pointer_alignment, gimplify_va_arg_expr, expand_builtin_printf, expand_builtin_fprintf, expand_builtin_sprintf): Use POINTER_TYPE_P instead TREE_CODE checking against POINTER_TYPE. (validate_arglist): Handle POINTER_TYPE code by checking POINTER_TYPE_P. * g++.dg/tree-ssa/empty-1.C: New test. From-SVN: r94147
2005-01-12builtins.c (fold_builtin_fabs): Convert argument to the appropriate type as ↵Roger Sayle1-0/+2
args of unprototyped builtins... * builtins.c (fold_builtin_fabs): Convert argument to the appropriate type as args of unprototyped builtins aren't automatically promoted. (fold_builtin_abs): Likewise. From-SVN: r93220
2005-01-11re PR target/18916 (mis-aligned vector code with copy memory (-maltivec))Alan Modra1-1/+13
PR target/18916 * builtins.c (std_gimplify_va_arg_expr): Adjust alignment of *ap. * expr.h (struct locate_and_pad_arg_data): Add "boundary". * function.c (locate_and_pad_parm): Set new field. (assign_parm_find_stack_rtl): Use it instead of FUNCTION_ARG_BOUNDARY. Tweak where_pad test to include "none". Always set mem align for stack_parm. (assign_parm_adjust_stack_rtl): Discard stack_parm if alignment not sufficient for type. (assign_parm_setup_block): If stack_parm is zero on entry, always make a new stack local. Block move old stack parm if necessary to new aligned stack local. (assign_parm_setup_stack): Use a block move to handle potentially misaligned entry_parm. (assign_parms_unsplit_complex): Specify required alignment when creating stack local. * calls.c (compute_argument_addresses): Override alignment of stack arg calculated from its type with the alignment given by FUNCTION_ARG_BOUNDARY. (store_one_arg): Likewise. From-SVN: r93179
2005-01-07re PR tree-optimization/18828 (Extraneous warning with var_start and ↵Jakub Jelinek1-52/+34
optimization) PR tree-optimization/18828 * builtins.c (expand_builtin_next_arg): Remove argument and all the argument checking. (expand_builtin): Adjust caller. (expand_builtin_va_start): Likewise. Remove error for too many arguments. (fold_builtin_next_arg): Issue error for too many arguments. After checking arguments, replace them with magic arguments that prevent further checking of the args. * gcc.dg/20050105-2.c: New test. From-SVN: r93040
2004-12-14re PR middle-end/18951 (Invalid code generated by expand_errno_check)Jakub Jelinek1-0/+4
PR middle-end/18951 * builtins.c (expand_builtin_mathfn, expand_builtin_mathfn_2, expand_builtin_mathfn_3): Avoid using arguments passed to save_expr after that call. * gcc.c-torture/execute/20041213-1.c: New test. From-SVN: r92151
2004-12-09tree.def (SET_TYPE): Remove.Nathan Sidwell1-1/+0
* tree.def (SET_TYPE): Remove. (CONSTRUCTOR): Update description. * builtins.c (type_to_class) Remove SET_TYPE case. * dbxout.c (dbxout_type): Likewise. * dwarf2out.c (is_base_type): Likewise. (gen_set_type_die): Remove. (gen_type_die): Remove SET_TYPE case. * expr.c (count_type_elements): Likewise. (mostly_zeroes_p): Likewise. (store_constructor): Likewise. * print_tree.c (print_node): Likewise. * stor-layout.c (layout_type): Likewise. * tree-browser.c (browse_tree): Likewise. * tree-inline.c (remap_type): Likewise. * tree-pretty-print.c (dump_generic_node): Likewise. * tree.c (type_contains_plaeholder_1, type_hash_eq, variably_modified_type_p, initializer_zerop): Likewise. * tree.h (SET_OR_ARRAY_CHECK): Remove. (AGGREGATE_TYPE_P): Remove SET_TYPE check. (TYPE_DOMAIN): Use ARRAY_TYPE_CHECK. * typeclass.h (enum type_class): Remove set_type_class. * varasm.c (const_hash_1): Remove SET_TYPE case. (compare_constant, copy_constant, output_constant): Likewise. * config/i386/i386.c (classify_argument): Likewise. * config/ia64/ia64.c (hfa_element_mode): Likewise. * config/sparc/sparc.c (sparc_type_code): Likewise. * ada/decl.c (gnat_substitute_in_type): Remove SET_TYPE case. From-SVN: r91931
2004-12-05* builtins.c: Fix comment typos.Kazu Hirata1-4/+6
From-SVN: r91749
2004-12-04re PR middle-end/17909 (ICE: verifiy_stms failed)Andrew Pinski1-9/+28
2004-12-04 Andrew Pinski <pinskia@physics.uc.edu> PR middle-end/17909 * builtins.c (fold_builtin_next_arg): Export and return true when there is a warning or an error. (expand_builtin_va_start): When fold_builtin_next_arg returns true, return const0_rtx. (expand_builtin): Likewise. * gimplify.c (gimplify_call_expr): Error out if there is not enough arguments to va_start. Call fold_builtin_next_arg also on the second argument. * tree.h (fold_builtin_next_arg): Prototype. From-SVN: r91727
2004-11-23function.h (struct function): Remove calls_longjmp.Zack Weinberg1-2/+0
* function.h (struct function): Remove calls_longjmp. (current_function_calls_longjmp): Delete. * tree.h (ECF_LONGJMP): Delete. (ECF_SIBCALL, ECF_PURE, ECF_SP_DEPRESSED, ECF_ALWAYS_RETURN) (ECF_LIBCALL_BLOCK): Everybody slide down one. (ECF_CONST, ECF_NORETURN, ECF_SIBCALL): Clarify comments. * builtins.c (expand_builtin_longjmp): Don't set current_function_calls_longjmp. * calls.c (special_function_p): Mark longjmp and siglongjmp with ECF_NORETURN, not ECF_LONGJMP. (emit_call_1, expand_call, emit_library_call_value_1): Don't check for ECF_LONGJMP. * tree-cfg.c (make_exit_edges, is_ctrl_altering_stmt) (need_fake_edge_p): Likewise. * config/avr/avr.h, config/ip2k/ip2k.h: Don't define NON_SAVING_SETJMP. * system.h: Poison NON_SAVING_SETJMP. * function.c (use_register_for_decl) * gcse.c (compute_hash_table_work, compute_store_table) * postreload-gcse.c (record_opr_changes) * reload.c (find_equiv_reg) * reload1.c (reload) * config/i386/i386.c (ix86_can_use_return_insn_p): Remove code conditional on NON_SAVING_SETJMP. * doc/tm.texi: Delete documentation of NON_SAVING_SETJMP. * config/i386/sysv3.h: Delete file. * config/i386/i386.c (ix86_svr3_asm_out_constructor): Delete. From-SVN: r91101
2004-11-09builtins.c, [...]: Say "argument" instead of "arg" in diagnostics.Joseph Myers1-9/+10
* builtins.c, c-common.c, c-decl.c, c-format.c: Say "argument" instead of "arg" in diagnostics. testsuite: * gcc.dg/builtin-prefetch-1.c: Update expected diagnostic. From-SVN: r90338
2004-11-09builtins.c, [...]: Avoid "`" as left quote, using "'" or %q, %< and %> as ↵Joseph Myers1-3/+3
appropriate. * builtins.c, c-common.c, c-decl.c, c-format.c, c-format.h, c-parse.in, c-pch.c, c-pragma.c, collect2.c, final.c, gcc.c, gcov.c, opts.c, pretty-print.h, protoize.c, reg-stack.c, rtl.c, tlink.c, config/alpha/alpha.c, config/arc/arc.c, config/arm/arm.c, config/avr/avr.c, config/c4x/c4x.c, config/darwin.c, config/frv/frv.c, config/h8300/h8300.c, config/i386/i386.c, config/i386/winnt.c, config/ia64/ia64.c, config/ip2k/ip2k.c, config/iq2000/iq2000.c, config/m32r/m32r.c, config/m68hc11/m68hc11.c, config/m68k/m68k.c, config/m68k/m68k.h, config/mcore/mcore.c, config/mips/mips.c, config/mmix/mmix.c, config/ns32k/ns32k.c, config/rs6000/host-darwin.c, config/rs6000/rs6000.c, config/s390/s390.c, config/sh/sh.c, config/sh/symbian.c, config/stormy16/stormy16.c, config/v850/v850.c: Avoid "`" as left quote, using "'" or %q, %< and %> as appropriate. Use %' as apostrophe in diagnostics where applicable. Use %< and %> in place of '' quotes where applicable. Use %qs in place of %<%s%>. Consistently quote __builtin function names. ada: * misc.c (gnat_handle_option): Use %< and %> for quoting in warning message. cp: * call.c, class.c, decl.c, decl2.c, error.c, mangle.c, parser.c, pt.c, search.c, semantics.c, typeck.c: Use %q, %< and %> for quoting in diagnostics. * parser.c (cp_parser_sizeof_operand): Use '' instead of `' for quoting in printf format. * decl.c (duplicate_decls, start_decl): Use %qD instead of unquoted %D. objc: * objc-act.c: Use %q, %< and %> for quoting in diagnostics. testsuite: * gcc.dg/builtin-prefetch-1.c: Adjust expected messages. From-SVN: r90337
2004-11-04builtins.c (expand_builtin_return_addr, [...]): Make them static.Kazu Hirata1-3/+3
* builtins.c (expand_builtin_return_addr, expand_builtin_longjmp, expand_builtin_trap): Make them static. * expr.h: Remove the prototypes for expand_builtin_longjmp and expand_builtin_trap. * tree.h: Remove the prototype for expand_builtin_return_addr. From-SVN: r90087
2004-10-27btest-gcc.sh (TESTLOGS): Examine regressions in libstdc++, libffi, and libjava.Geoffrey Keating1-33/+27
* btest-gcc.sh (TESTLOGS): Examine regressions in libstdc++, libffi, and libjava. From-SVN: r89629
2004-10-19builtins.c (expand_builtin_memmove): If fold_builtin_memmove succeeds, only ↵Richard Henderson1-1/+1
expand the result. * builtins.c (expand_builtin_memmove): If fold_builtin_memmove succeeds, only expand the result. From-SVN: r89282