Commit Graph

65381 Commits

Author SHA1 Message Date
Matt Austern
86a43457bf objc-act.c (objc_finish_file): In ObjC++ mode, set at_eof before calling instantiate_pending_templates.
* objc-act.c (objc_finish_file): In ObjC++ mode, set at_eof before
        calling instantiate_pending_templates.

From-SVN: r94362
2005-01-28 05:54:55 +00:00
Richard Henderson
046625fab2 builtins.c (expand_builtin_copysign): New.
* 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-27 16:55:07 -08:00
Richard Henderson
17a7d6d75a * gcc.dg/uninit-I.c: Fix typos in dg-options and dg-warning directives.
From-SVN: r94356
2005-01-27 16:42:46 -08:00
GCC Administrator
378d4011e6 Daily bump.
From-SVN: r94354
2005-01-28 00:16:26 +00:00
Arend Bayer
6c6678595b cse.c: (find_best_addr): Don't call copy_rtx before calling fold_rtx.
* cse.c: (find_best_addr): Don't call copy_rtx before calling
	fold_rtx.  Save cost recomputation if fold_rtx did nothing.
	(fold_rtx) <ASM_OPERANDS>: Don't do anything if INSN is
	NULL_RTX.

Co-Authored-By: Kazu Hirata <kazu@cs.umass.edu>

From-SVN: r94345
2005-01-27 23:00:19 +00:00
Jeff Law
88af764e45 tree-into-ssa.c (ssa_rewrite_initialize_block): Do not register definitions of SSA_NAMEs which are not being rewritten.
* tree-into-ssa.c (ssa_rewrite_initialize_block): Do not register
        definitions of SSA_NAMEs which are not being rewritten.
        (rewrite_ssa_into_ssa): Only initialize the current definition
        of an SSA_NAME if that SSA_NAME has been marked for rewriting.
        If checking is enabled, assert that SSA_NAME_AUX is clear for all
        SSA_NAMEs before returning.

From-SVN: r94343
2005-01-27 15:33:14 -07:00
Eric Botcazou
e4652e3759 Fix a couple of typos.
From-SVN: r94340
2005-01-27 21:46:36 +00:00
Laurent GUERBY
74a2249713 Makefile.in: Fix a-intnam.ads from previous commit, add 2005 to copyright.
2005-01-27  Laurent GUERBY <laurent@guerby.net>

	* Makefile.in: Fix a-intnam.ads from previous commit,
	add 2005 to copyright.
	* a-intman-rtems.ads: Renamed to...
	* a-intnam-rtems.ads:

From-SVN: r94335
2005-01-27 20:19:50 +00:00
Richard Sandiford
6198f99a31 * gcc.dg/intmax_t-1.c: Extend dg-error to cover mips*-elf targets.
From-SVN: r94332
2005-01-27 20:02:56 +00:00
Richard Sandiford
1c71d7961c * gcc.dg/mips-movcc-1.c, gcc.dg/mips-movcc-2.c, gcc.dg/mips-movcc-3.c,
* gcc.dg/mips-nmadd-1.c, gcc.dg/mips-nmadd-2.c, gcc.dg/mips-rsqrt-1.c,
	* gcc.dg/mips-rsqrt-2, gcc.dg/mips-rsqrt-3.c: Add dummy asm statements
	to cope with cases where the multilib options override the dg-options.

From-SVN: r94331
2005-01-27 19:50:02 +00:00
Stuart Hastings
00adda9fd8 Per request from Eric Botcazou, fix my ChangeLog entry of 26jan2005:
fix relative path, move new testcase to testsuite ChangeLog.

From-SVN: r94329
2005-01-27 18:58:44 +00:00
Kazu Hirata
f93089d26f c-common.def, [...]: Update copyright.
* c-common.def, c-dump.c, c-gimplify.c, c-objc-common.c,
	cfgexpand.c, dbxout.c, function.h, opts.c, tree-flow-inline.h,
	tree-ssa-operands.h, tree-ssa-threadupdate.c, tree-tailcall.c,
	config/avr/avr.md, config/cris/aout.h, config/cris/cris.h,
	config/mips/iris6.h, config/sh/sh.c: Update copyright.

From-SVN: r94328
2005-01-27 18:22:35 +00:00
Steven Bosscher
116cb604cc re PR middle-end/17278 (8% C++ compile-time regression in comparison with 3.4.1 at -O1 optimization level)
PR middle-end/17278
	* opts.c (decode_options): Move flag_thread_jumps from -O1 and
	higher to -O2 and higher.  Likewise for tree PRE.
	* tree-ssa-dom.c (tree_ssa_dominator_optimize): Only iterate at -O2
	and better.

From-SVN: r94325
2005-01-27 16:32:12 +00:00
Ian Lance Taylor
6737ba67d5 re PR middle-end/19583 (Incorrect diagnostic: control may reach end of non-void function '...' being inlined)
PR middle-end/19583
	* gimple-low.c (try_catch_may_fallthru): New static function.
	(block_may_fallthru): Handle TRY_CATCH_EXPR.
	* tree-inline.c (expand_call_inline): Don't warn about reaching
	the end of a non-void function being inlined if the function uses
	a return slot.

From-SVN: r94323
2005-01-27 14:36:17 +00:00
Jakub Jelinek
9d72d99675 * config/i386/i386.h (CALL_USED_REGISTERS): Fix comment pastos.
From-SVN: r94321
2005-01-27 13:41:40 +01:00
Jakub Jelinek
d8dd2f3a64 re PR c/18946 (ICE in pushdecl)
PR c/18946
	* c-decl.c (warn_if_shadowing): Handle old_decl error_mark_node.
	(pushdecl): Only use DECL_FILE_SCOPE_P if DECL_P.
	(implicitly_declare): Handle error_mark_node.

	* gcc.dg/noncompile/20050120-1.c: New test.

From-SVN: r94320
2005-01-27 13:38:38 +01:00
Laurent GUERBY
7d921ba4c9 Makefile.in: Rename GNAT RTEMS specific files.
2005-01-27  Laurent GUERBY <laurent@guerby.net>

	* Makefile.in: Rename GNAT RTEMS specific files.
	* 5rtpopsp.adb, 4rintnam.ads, 5rosinte.adb,
 	5rosinte.ads, 5rparame.adb: Replaced by files below.
	* s-tpopsp-rtems.adb, a-intman-rtems.ads, s-osinte-rtems.adb,
	s-osinte-rtems.ads, s-parame-rtems.adb: Replace files above.

From-SVN: r94319
2005-01-27 11:57:04 +00:00
Joel Sherrill
9011d4bba2 re PR ada/19488 (RTEMS Ada RTS doesn't compile)
2005-01-27  Joel Sherrill <joel.sherrill@oarcorp.com>
	    Laurent GUERBY <laurent@guerby.net>

	PR ada/19488
	* 5rosinte.ads: Add No_Key constant.
        * 5rtpopsp.adb: Initialize ATCB_Key with No_Key and fix style.
        * gsocket.h: Do not include <sys/socket.h> with RTEMS either.

Co-Authored-By: Laurent GUERBY <laurent@guerby.net>

From-SVN: r94318
2005-01-27 11:52:46 +00:00
Richard Henderson
dad2a933ba re PR c++/14329 ([4.1 only] badly formatted warnings for SRA replacements used uninitialized)
PR tree-opt/14329
        * tree.h (struct tree_decl): Add debug_expr_is_from.
        (DECL_DEBUG_EXPR_IS_FROM): New.
        (DECL_DEBUG_EXPR): Rename from DECL_DEBUG_ALIAS_OF.
        * dwarf2out.c (dwarf2out_var_location): Update to match.
        * tree-outof-ssa.c (create_temp): Likewise.
        * var-tracking.c (track_expr_p): Likewise.
        * tree-sra.c (instantiate_element): Set DECL_DEBUG_EXPR.
        * c-objc-common.c (c_tree_printer) <'D'>: Handle DECL_DEBUG_EXPR.
        * toplev.c (default_tree_printer): Likewise.

From-SVN: r94317
2005-01-27 01:28:45 -08:00
Alexandre Oliva
17c2195719 frv.c (frv_class_likely_spilled_p): Add GR8_REGS, GR9_REGS, GR89_REGS, FDPIC_FPTR_REGS, FDPIC_REGS.
* config/frv/frv.c (frv_class_likely_spilled_p): Add GR8_REGS,
GR9_REGS, GR89_REGS, FDPIC_FPTR_REGS, FDPIC_REGS.

From-SVN: r94316
2005-01-27 08:37:19 +00:00
Steven Bosscher
ebaae5827a tree.h (SWITCH_COND, [...]): Add tree checks.
* tree.h (SWITCH_COND, SWITCH_BODY, SWITCH_LABELS, CASE_LOW,
	CASE_HIGH, CASE_LABEL, ASM_STRING, ASM_OUTPUTS, ASM_INPUTS,
	ASM_CLOBBERS): Add tree checks.

	* c-common.h (SWITCH_TYPE): Rename to SWITCH_STMT_TYPE.
	(SWITCH_STMT_COND, SWITCH_STMT_BODY): New.
	* c-common.def (SWITCH_STMT): Update to match.
	* c-common.c (c_do_switch_warnings): Use SWITCH_STMT accessor
	macros instead of SWITCH_EXPR ones.
	* c-dump.c (c_dump_tree): Likewise.
	* c-gimplify.c (gimplify_switch_stmt): Likewise.
	* c-typeck.c (c_start_case, do_case, c_finish_case): Likewise.

cp/
	* decl.c (finish_case_label): Use SWITCH_STMT accessor macros
	instead of SWITCH_EXPR ones.
	* pt.c (tsubst_expr): Likewise.
	* semantics.c (begin_switch_stmt, finish_switch_cond,
	finish_switch_stmt): Likewise.

doc/
	* c-tree.texi (SWITCH_STMT): Update accessor macro names.

From-SVN: r94315
2005-01-27 07:32:26 +00:00
Alan Modra
7a70673865 unwind-dw2.c (execute_stack_op): Add missing cases for DW_OP_shl, DW_OP_shr, DW_OP_shra, DW_OP_xor.
* unwind-dw2.c (execute_stack_op): Add missing cases for
	DW_OP_shl, DW_OP_shr, DW_OP_shra, DW_OP_xor.

From-SVN: r94314
2005-01-27 17:56:49 +10:30
Eric Botcazou
fe15407d97 config.gcc (Obsolete configurations): Remove 'dummy'...
* config.gcc (Obsolete configurations): Remove 'dummy', add
	sparclite-*-coff*, sparclite-*-elf*, sparc86x-*-elf* and
	sparc-*-openbsd*.

From-SVN: r94313
2005-01-27 07:15:36 +00:00
Diego Novillo
87637d21c0 re PR tree-optimization/19633 (local address incorrectly thought to escape)
PR tree-optimization/19633
	* tree-ssa-alias.c (ptr_is_dereferenced_by): Also handle
	CALL_EXPRs.
	(maybe_create_global_var): Do not create .GLOBAL_VAR if there
	are no call-clobbered variables.
	* tree-outof-ssa.c (check_replaceable): Return false for calls
	with side-effects.

testsuite/ChangeLog

	PR tree-optimization/19633
	* gcc.dg/pr19633.c: New test.
	* gcc.dg/tree-ssa/pr19633.c: New test.

From-SVN: r94311
2005-01-26 23:45:20 -05:00
Ulrich Weigand
9ff93eb01c dbxout.c (dbxout_symbol_location): Resolve constant pool references even for variables with NULL DECL_INITIAL.
ChangeLog:
	* dbxout.c (dbxout_symbol_location): Resolve constant pool references
	even for variables with NULL DECL_INITIAL.

testsuite/ChangeLog:
	* gcc.dg/20041216-1.c: New test.

From-SVN: r94303
2005-01-27 01:49:01 +00:00
Stuart Hastings
4356a1bf59 gimplify.c (shortcut_cond_expr): Re-compute side-effects.
2005-01-26  Stuart Hastings  <stuart@apple.com>

	* gcc/gimplify.c (shortcut_cond_expr): Re-compute side-effects.
	* gcc/testsuite/gcc.c-torture/execute/20050125-1.c: New.

From-SVN: r94300
2005-01-27 01:03:27 +00:00
Steven Bosscher
c006df4eec trans-decl.c (gfc_build_label_decl): Set DECL_ARTIFICAL and TREE_USED for all labels.
* trans-decl.c (gfc_build_label_decl): Set DECL_ARTIFICAL and
	TREE_USED for all labels.
	(gfc_trans_entry_master_switch): Use it instead of building a
	label by hand.
	* trans-io.c (add_case): Likewise.
	* trans-stmt.c (gfc_trans_integer_select): Likewise.

From-SVN: r94299
2005-01-27 00:58:11 +00:00
GCC Administrator
2f0a3aa2db Daily bump.
From-SVN: r94297
2005-01-27 00:16:39 +00:00
Richard Henderson
48cc8d3b41 For real this time...
PR middle-end/18008
        * c-decl.c (finish_struct): Set DECL_MODE after resetting a
        field's type.
        * expr.c (store_field): Strip conversions to odd-bit-sized types
        if the destination field width matches.

From-SVN: r94294
2005-01-26 16:07:41 -08:00
Richard Henderson
eec6bb06c6 Revert last change.
From-SVN: r94291
2005-01-26 15:21:45 -08:00
Richard Henderson
78ef1e3d9f re PR middle-end/18008 (Duplicate mask on bitfield insertion)
PR middle-end/18008
        * c-decl.c (finish_struct): Set DECL_MODE after resetting a
        field's type.
        * expmed.c (store_fixed_bit_field): Create a paradoxical subreg
        if we don't need the bits above those present in the current mode.
        * expr.c (store_field): Strip conversions to odd-bit-sized types
        if the destination field width matches.

From-SVN: r94290
2005-01-26 15:18:14 -08:00
Richard Sandiford
5596990faf iris6.h (ENDFILE_SPEC): Don't link in irix-csr.o if either -ffast-math or -funsafe-math-optimizations...
* config/mips/iris6.h (ENDFILE_SPEC): Don't link in irix-csr.o if
	either -ffast-math or -funsafe-math-optimizations is in use.

From-SVN: r94289
2005-01-26 22:32:27 +00:00
Marek Michalkiewicz
a3cf59927a re PR target/19293 (avr-gcc crashes when using shifts with negative shift count)
PR target/19293
	PR target/19329
	* config/avr/avr.c (notice_update_cc): Only set condition code for
	ashrqi3 if shift count > 0.
	(out_shift_with_cnt): Handle shift count <= 0 as a no-op.
	(ashlqi3_out, ashlhi3_out, ashlsi3_out, ashrqi3_out, ashrhi3_out,
	ashrsi3_out, lshrqi3_out, lshrhi3_out, lshrsi3_out): Handle shift
	count <= 0 as a no-op, and shift count >= width by copying zero
	or sign bit to all bits of the result.
	* config/avr/avr.md (all shifts): Add alternatives for zero shift
	count, with attribute "length" set to 0 and "cc" set to "none".

From-SVN: r94288
2005-01-26 21:44:25 +00:00
Laurent GUERBY
d487e3c10a re PR ada/19414 (ACATS cxb4003 - valgrind detects wrong code (invalid read))
2005-01-26  Laurent GUERBY <laurent@guerby.net>

	PR ada/19414
	* i-cobol.adb (Valid_Numeric): Handle zero length case.

From-SVN: r94287
2005-01-26 21:35:50 +00:00
Alexander Malmberg
4bb3aa7e32 re PR objc/18862 (ICE on gcc-4.0-20041205/gcc/testsuite/objc.dg/selector-1.m)
2005-01-26  Alexander Malmberg  <alexander@malmberg.org>

        PR objc/18862
        * objc.dg/selector-2.m: New test.

From-SVN: r94286
2005-01-26 13:03:31 -08:00
Alexander Malmberg
b0676216f7 re PR objc/18862 (ICE on gcc-4.0-20041205/gcc/testsuite/objc.dg/selector-1.m)
2005-01-26  Alexander Malmberg  <alexander@malmberg.org>

        PR objc/18862
        * objc-act.c (build_selector_translation_table): Use
        input_location in the diagnostic for the GNU runtime or if
        TREE_PURPOSE (chain) is NULL.

From-SVN: r94285
2005-01-26 13:01:57 -08:00
Aldy Hernandez
e4dd71deb7 invoke.texi: Document -mTLS.
* doc/invoke.texi: Document -mTLS.

	* testsuite/gcc.target/frv/all-tls-global-dynamic.c: New.
	* testsuite/gcc.target/frv/all-tls-initial-exec.c: New.
	* testsuite/gcc.target/frv/all-tls-initial-exec-pic.c: New.
	* testsuite/gcc.target/frv/all-tls-local-dynamic.c: New.
	* testsuite/gcc.target/frv/all-tls-local-dynamic-plt.c: New.
	* testsuite/gcc.target/frv/all-tls-local-dynamic-plt-pic.c: New.
	* testsuite/gcc.target/frv/all-tls-local-exec.c: New.
	* testsuite/gcc.target/frv/all-tls-local-exec-TLS.c: New.

	* configure.ac: Check for a TLS capable gas.

	* configure: Regenerate.

From-SVN: r94283
2005-01-26 20:36:07 +00:00
Richard Henderson
55e79aef81 re PR middle-end/18008 (Duplicate mask on bitfield insertion)
PR middle-end/18008
        * combine.c (make_field_assignment): Simplify store to zero_extract
        from a source with an overlapping mask.

From-SVN: r94282
2005-01-26 12:29:25 -08:00
Joern Rennecke
d951ae1e66 Fix filename typo.
From-SVN: r94275
2005-01-26 19:02:32 +00:00
Joern Rennecke
960f41cfcc Add bug number:
PR c++/18370
	* parse.c (cp_parser_initializer_clause): Initialize *non_constant_p.

From-SVN: r94274
2005-01-26 18:58:59 +00:00
Aldy Hernandez
af30facda4 frv.md: Add fr400_integer automaton.
* config/frv/frv.md: Add fr400_integer automaton. Don't
        allow TYPE_MUL, TYPE_MACC, or TYPE_CUT to issue in parallel
        to TYPE_MACC.

From-SVN: r94272
2005-01-26 18:57:03 +00:00
J"orn Rennecke
b2802a4b4c * parse.c (cp_parser_initializer_clause): Initialize *non_constant_p.
From-SVN: r94270
2005-01-26 18:45:00 +00:00
Steven Bosscher
f7aa1423e2 re PR middle-end/16585 (current_function_has_computed_jump incorrectly changed in make_edges)
PR middle-end/16585
	* cfgbuild.c (make_edges): Do not clear or set
	current_function_has_computed_jump.
	* function.h (struct function): Remove the has_computed_jump field.
	(current_function_has_computed_jump): Do not define.
	* sched-rgn.c (is_cfg_nonregular): Return true if a basic block ends
	in a computed jump.  Ignore current_function_has_computed_jump.

From-SVN: r94269
2005-01-26 17:26:33 +00:00
Paolo Carlini
b929615a7c mt_allocator.h (struct __per_type_pool_policy<,, [...]): Scale _M_chunk_size too with sizeof(_Tp)...
2005-01-26  Paolo Carlini  <pcarlini@suse.de>

	* include/ext/mt_allocator.h
	(struct __per_type_pool_policy<,, false>::_S_get_pool,
	struct __per_type_pool_policy<,, true>::_S_get_pool): Scale
	_M_chunk_size too with sizeof(_Tp), otherwise the allocator
	breaks down as soon as sizeof(_Tp) >~ _S_chunk_size / 128;
	reduce to 64 the multiplier for _M_max_bytes (safer wrt
	_Binmap_type being a short); trivial reformattings.
	* testsuite/ext/mt_allocator/check_allocate_big_per_type.cc: New.

From-SVN: r94268
2005-01-26 16:34:58 +00:00
Richard Henderson
6f642f9852 re PR middle-end/19515 (Violation of C99 6.7.8 §21 for unions)
PR middle-end/19515
        * expr.c (categorize_ctor_elements): New argument p_must_clear.
        (categorize_ctor_elements_1): Likewise.  Detect a union that isn't
        fully initialized.
        (mostly_zeros_p): Update for new categorize_ctor_elements argument.
        * gimplify.c (gimplify_init_constructor): Likewise.  Only shove
        objects into static storage if they have more than one non-zero value.
        * tree.h (categorize_ctor_elements): Update decl.

From-SVN: r94266
2005-01-26 07:20:53 -08:00
Steven Bosscher
ead553a1d9 re PR middle-end/19616 (missed tail call)
PR middle-end/19616
	* tree.h (CALL_EXPR_TAILCALL): Add comment.
	* calls.c (check_sibcall_argument_overlap_1): Revert the change
	to this function from 2004-07-10.
	* tree-tailcall.c (suitable_for_tail_opt_p): Do not consider the
	the current function for tail call optimizations if the address
	of one of it its arguments is taken.

From-SVN: r94265
2005-01-26 15:08:50 +00:00
Kazu Hirata
7533544070 * cse.c (fold_rtx): Call equiv_constant only when necessary.
From-SVN: r94260
2005-01-26 12:44:58 +00:00
Bernd Schmidt
4018444567 function.c (expand_function_end): If current_function_calls_alloca...
* function.c (expand_function_end): If current_function_calls_alloca,
	emit stack restore in a place that is reached when the function falls
	through at the end.

From-SVN: r94259
2005-01-26 11:22:33 +00:00
Paolo Carlini
02a65d230f acinclude.m4 ([GLIBCXX_ENABLE_C99]): Add ac_c99_complex to the final test for enable_c99, thus robustifying it...
2005-01-26  Paolo Carlini  <pcarlini@suse.de>

	* acinclude.m4 ([GLIBCXX_ENABLE_C99]): Add ac_c99_complex
	to the final test for enable_c99, thus robustifying it; remove
	duplicate final test on ac_99_math.
	* configure: Regenerate.

	* include/std/std_complex.h: Remove usages of the dead
	_GLIBCXX_BUGGY_COMPLEX macro.

	* testsuite/26_numerics/cmath/19322.cc: Protect with
	_GLIBCXX_USE_C99_MATH instead of the stronger _GLIBCXX_USE_C99,
	since only C99 math facilities are involved.
	* testsuite/26_numerics/cmath/c99_classification_macros_c++.cc:
	Likewise.

From-SVN: r94257
2005-01-26 10:34:53 +00:00
Steven Bosscher
97bd954f1c Fix PR number on Honza's checkin
From-SVN: r94256
2005-01-26 09:20:57 +00:00