Commit Graph

76309 Commits

Author SHA1 Message Date
Eric Botcazou
5bb51e1d55 re PR rtl-optimization/27616 (Infinite loop at -O1 and above in RTL CSE)
PR rtl-optimization/27616
	* cse.c (table_size): New static variable.
	(new_basic_block): Initialize it to 0.
	(remove_from_table): Decrement it.
	(insert): Increment it.
	(fold_rtx_mem_1): New function, renamed from fold_rtx_mem.
	(fold_rtx_mem): Enforce a cap on the recursion depth.  Call
	fold_rtx_mem_1 if under the cap.
	(fold_rtx) <RTX_COMM_ARITH>: In the associative case, delay a little
	the lookup of the equivalent expression and test for equality of the
	first operand of the equivalent expression before in turn looking up
	an equivalent constant for the second operand.

From-SVN: r116683
2006-09-04 19:33:24 +00:00
Eric Botcazou
afe08db5e6 Remove leading TAB.
From-SVN: r116681
2006-09-04 16:29:51 +00:00
Benjamin Kosnik
06e744948b re PR c++/28871 (massive C++ compile time slowdown)
2006-09-04  Benjamin Kosnik  <bkoz@redhat.com>

	PR c++/28871
	* include/ext/bitmap_allocator.h: Add comment for end of anonymous
	namespace.
	* include/ext/rope: Same.
	* include/bits/cpp_type_traits.h: Same.
	* include/tr1/tuple: Same.
	* include/tr1/functional_iterate.h: Same.

	* include/bits/cpp_type_traits.h: Revert anonymous namespace
	change, use nested detail instead.

	* testsuite/lib/libstdc++.exp (libstdc++_init): PCHFLAGS revert to
	stdc++.h.

From-SVN: r116680
2006-09-04 15:41:18 +00:00
Nathan Sidwell
88525e1bd3 PR 23287 Revert my 2006-09-01 patch.
cp/
	PR 23287 Revert my 2006-09-01 patch.
	* parser.c: Reverted.
	* pt.c: Reverted.
testsuite/
	PR c++/23287 Revert my 2006-09-01 patch
	* g++.dg/parse/dtor12.C: Remove.

From-SVN: r116679
2006-09-04 15:21:50 +00:00
Paolo Carlini
c4338a62e0 mt_allocator.cc (__pool<true>::_M_reclaim_block): Do not name a variable __used, badname on BSD.
2006-09-04  Paolo Carlini  <pcarlini@suse.de>

	* src/mt_allocator.cc (__pool<true>::_M_reclaim_block): Do
	not name a variable __used, badname on BSD.

From-SVN: r116678
2006-09-04 08:00:35 +00:00
GCC Administrator
ddde11ddfc Daily bump.
From-SVN: r116675
2006-09-04 00:17:08 +00:00
Joseph Myers
ebbc2cc3dd * vi.po: Update.
From-SVN: r116670
2006-09-03 12:54:34 +01:00
Joseph Myers
ff9ac485b0 * sv.po: Update.
From-SVN: r116668
2006-09-03 12:52:48 +01:00
GCC Administrator
75da2c1bc9 Daily bump.
From-SVN: r116666
2006-09-03 00:17:34 +00:00
Lee Millward
b89c561c2d re PR c++/27670 (ICE on invalid template parameter)
2006-09-02  Lee Millward  <lee.millward@codesourcery.com>

        PR c++/27670
        PR c++/27493
        PR c++/27494
        PR c++/27397
        * parser.c (cp_parser_template_parameter_list): Add
        invalid template parameters to the parameter list as
        error_mark_node.

        * g++.dg/template/operator9.C: New test.
        * g++.dg/template/operator7.C: New test.
        * g++.dg/template/operator8.C: New test.
        * g++.dg/template/crash57.C: New test.

        * g++.dg/template/typedef4.C: Adjust error markers.
        * g++.dg/template/typedef5.C: Likewise.

From-SVN: r116661
2006-09-02 14:15:37 +00:00
Paolo Carlini
1d3e6248e5 re PR libstdc++/24469 (Possible race condition in mt_allocator causing SIGSEGV)
2006-09-02  Paolo Carlini  <pcarlini@suse.de>
	    Richard Guenther  <rguenther@suse.de>

	PR libstdc++/24469
	* src/mt_allocator.cc (__pool<true>::_M_reserve_block,
	__pool<true>::_M_reclaim_block): Fix the logic to avoid
	races, exploit atomic counters stored in second part of
	the memory pointed by _M_used.
	(__pool<true>::_M_initialize): Adjust _M_used allocation.
	* include/ext/mt_allocator.h (__pool<true>::_Bin_record):
	Update comment.

Co-Authored-By: Richard Guenther <rguenther@suse.de>

From-SVN: r116660
2006-09-02 08:31:45 +00:00
Geoffrey Keating
b73aec4fa5 Revert this change:
2006-03-17  Alexandre Oliva  <aoliva@redhat.com>
	* dwarf2out.c (dwarf2out_stack_adjust): Always track the stack
	pointer, instead of assuming it is possible to derive the
	correct args size from a call insn.

From-SVN: r116659
2006-09-02 07:26:21 +00:00
Jakub Jelinek
bc038ad518 re PR middle-end/27567 (__builtin_memcpy generates redundant stores/moves.)
PR middle-end/27567
	* builtins.c (fold_builtin_memcpy, fold_builtin_memmove): Remove.
	(fold_builtin_mempcpy): Rename to...
	(fold_builtin_memory_op): ... this.  Optimize one element copy
	into an assignment.
	(fold_builtin_memset, fold_builtin_bzero, fold_builtin_bcopy): New
	functions.
	(expand_builtin_strcpy, expand_builtin_strncpy): Handle COMPOUND_EXPR.
	(expand_builtin_memcpy, expand_builtin_mempcpy,
	expand_builtin_memmove): Likewise.  Use fold_builtin_memory_op.
	(fold_builtin_1): Handle BUILT_IN_MEMSET, BUILT_IN_BZERO and
	BUILT_IN_BCOPY.  Use fold_builtin_memory_op for
	BUILT_IN_MEM{CPY,PCPY,MOVE}.

From-SVN: r116656
2006-09-02 08:55:09 +02:00
Jakub Jelinek
07515729e9 re PR c++/28878 (ICE using "[" instead of "{")
PR c++/28878
	* except.c (build_throw): Only set current_function_returns_abnormally
	if cfun is not NULL.

	* g++.dg/parse/crash33.C: New test.

From-SVN: r116655
2006-09-02 08:54:04 +02:00
Jakub Jelinek
b2a06efa61 re PR c++/26917 (ICE with -frepo on invalid code)
PR c++/26917
	* repo.c (repo_file): Remove.
	(open_repo_file, reopen_repo_file_for_write): Return fopened
	FILE * instead of setting global repo_file variable.
	(init_repo): Adjust caller.
	(finish_repo): Likewise.  Return instead of goto out before
	reopen_repo_file_for_write has been called.

From-SVN: r116654
2006-09-02 08:52:24 +02:00
DJ Delorie
0166ff05ca cond.md (cbranch<mode>4): Defer splitting until after reload.
* config/m32c/cond.md (cbranch<mode>4): Defer splitting until after reload.
(stzx_16): Likewise.
("stzx_24_<mode>"): Likewise.
("stzx_reversed_<mode>"): Likewise, and make mode-specific.
("cmp<mode>_op"): New.
(cmp<mode>): Change to expander; just save operands.
(b<code>_op): New.
(b<code>): Change to expander, emit compare here.
(s<code>_op): Change to use split and expander.
(s<code>_24_op): Likewise.
(s<code>_<mode>): New.
(s<code>_<mode>_24): New.
(movqicc_<code>_<mode): New.
(movhicc_<code>_<mode>): New.
(s<code>): New.
(s<code>_24): New.
* config/m32c/m32c.c (compare_op0, compare_op1): New.
(m32c_pend_compare): New.
(m32c_unpend_compare): New.
(m32c_expand_scc): New.
(m32c_expand_movcc): Emit the compare also.
* config/m32c/predicates.md (mra_nopp_operand): New.

From-SVN: r116653
2006-09-01 22:38:20 -04:00
GCC Administrator
3a79c9917c Daily bump.
From-SVN: r116651
2006-09-02 00:17:34 +00:00
J"orn Rennecke
537b8a357c re PR middle-end/27226 (Compiler looses track of alignment for emit_block_move)
2006-09-01  J"orn Rennecke  <joern.rennecke@st.com>
	Richard Guenther  <rguenther@suse.de>
	Adam Nemet  <anemet@caviumnetworks.com>

	PR middle-end/27226
	* builtins.c (get_pointer_alignment): Handle more forms
	of base addresses that can be used to derive more precise
	information about alignment.

	* gcc.target/mips/memcpy-1.c: New testcase.
	* gcc.dg/pr27226.c: Likewise.

Co-Authored-By: Adam Nemet <anemet@caviumnetworks.com>
Co-Authored-By: Richard Guenther <rguenther@suse.de>

From-SVN: r116641
2006-09-01 20:25:34 +00:00
Geoffrey Keating
cd709ec369 jni.exp (gcj_jni_invocation_test_one): Pass -lgcj to linker for C++ files on Darwin.
* testsuite/libjava.jni/jni.exp (gcj_jni_invocation_test_one):
	Pass -lgcj to linker for C++ files on Darwin.

From-SVN: r116639
2006-09-01 19:52:10 +00:00
Nathan Sidwell
4860b87477 re PR c++/28705 (ICE: in type_dependent_expression_p, at cp/pt.c:12837)
cp/
	PR c++/28705
	* semantics.c (finish_call_expr): Add assert.
	* name-lookup.c (lookup_arg_dependent): Check we found an overload
	or an object.
testsuite/
	PR c++/28705
	* g++.dg/lookup/koenig5.C: New.
	* g++.dg/template/crash56.C: New.

From-SVN: r116638
2006-09-01 18:10:17 +00:00
Jason Merrill
4832214af7 re PR c++/28899 (gimplification failed)
PR c++/28899
        * gimplify.c (gimplify_modify_expr_rhs) [BIND_EXPR]: Handle
        want_value.

        * gimplify.c (voidify_wrapper_expr): Handle null type.

From-SVN: r116637
2006-09-01 13:59:41 -04:00
Keith Seitz
a56913dd37 jvmti.cc (THREAD_DEFAULT_TO_CURRENT): Encapsulate in do..while loop.
* jvmti.cc (THREAD_DEFAULT_TO_CURRENT): Encapsulate in do..while loop.
        (THREAD_CHECK_VALID): Likewise.
        (THREAD_CHECK_IS_ALIVE): Likewise.
        (NULL_CHECK): Likewise.
        (ILLEGAL_ARGUMENT): Likewise.

From-SVN: r116636
2006-09-01 17:58:22 +00:00
Keith Seitz
e6789bef7a jvm.h (_Jv_JVMTI_Init): Declare.
* include/jvm.h (_Jv_JVMTI_Init): Declare.
        * jvmti.cc (_Jv_JVMTI_Init): New function.
        * prims.cc (_Jv_CreateJavaVM): Initialize JVMTI.

        * jvmti.cc (ILLEGAL_ARGUMENT): New macro.
        (_Jv_JVMTI_Allocate): Use ILLEGAL_ARUMENT.

        * jvmti.cc (_jvmtiEnvironments): New linked list of
        JVMTI environments.
        (FOREACH_ENVIRONMENT): New macro.
        (_envListLock): New object to act as synchronization lock
        for _jvmtiEnvironments.
        (_Jv_JVMTI_DisposeEnvironment): Check for NULL environment.
        Remove the environment from the list of known environments.
        (_Jv_GetJVMTIEnv): Add the new environment to the list
        of known environments.

From-SVN: r116635
2006-09-01 17:42:23 +00:00
Josh Conner
39ac097709 re PR middle-end/25505 (gcc uses way too much stack space for this code)
2006-09-01  Josh Conner  <jconner@apple.com>

	PR c++/25505
	gcc.dg/nrv3.c: New test.
	gcc.dg/nrv4.c: New test.
	gcc.dg/nrv5.c: New test.

From-SVN: r116634
2006-09-01 16:56:45 +00:00
Josh Conner
f0ce78583a re PR middle-end/25505 (gcc uses way too much stack space for this code)
2006-09-01  Josh Conner  <jconner@apple.com>

	PR c++/25505
	* tree-nrv.c (dest_safe_for_nrv_p): New function.
	(execute_return_slot_opt): Use it.

From-SVN: r116633
2006-09-01 16:56:14 +00:00
Gary Benson
69afd3217e InetAddress.java (getLocalHost): Refactor to avoid security check if getLocalHostname() fails and to provide...
2006-09-01  Gary Benson  <gbenson@redhat.com>

	* java/net/InetAddress.java (getLocalHost): Refactor to avoid
	security check if getLocalHostname() fails and to provide more
	meaningful exceptions it the security check fails.

From-SVN: r116627
2006-09-01 15:38:00 +00:00
Nathan Sidwell
429b876b07 re PR c++/23287 (Explicitly invoking destructor of template class in a template and is dependent)
cp/
	PR c++/23287
	* parser.c (cp_parser_id_expression): Add member_p
	argument. Update all callers.
	(cp_parser_unqualified_id): Likewise.  Lookup a destructor name in
	the object's scope, if valid.
	(cp_parser_global_scope_opt): Add object_scope_valid_p.  Update
	callers.
	(cp_parser_postfix_dot_deref_expression): Set object_scope.
	* pt.c (tsubst_copy_and_build): Lookup dependent dtor name here.
testsuite/
	PR c++/23287
	* g++.dg/parse/dtor12.C: New.

From-SVN: r116623
2006-09-01 13:46:19 +00:00
Gary Benson
39aa3581c4 InetAddress.java (getByAddress): Create Inet4Address objects when passed IPv4-mapped IPv6 addresses.
2006-09-01  Gary Benson  <gbenson@redhat.com>

	* java/net/InetAddress.java (getByAddress): Create Inet4Address
	objects when passed IPv4-mapped IPv6 addresses.
	(getByName, getAllByName): Defer to the above to ensure that the
	correct Inet*Address objects are returned.

From-SVN: r116622
2006-09-01 13:30:50 +00:00
Gary Benson
7229b95cc0 InetAddress.java (getByName, [...]): Only perform security check when DNS lookups are required.
2006-09-01  Gary Benson  <gbenson@redhat.com>

	* java/net/InetAddress.java (getByName, getAllByName):
	Only perform security check when DNS lookups are required.

From-SVN: r116621
2006-09-01 10:06:13 +00:00
GCC Administrator
c9e4c7b5c4 Daily bump.
From-SVN: r116617
2006-09-01 00:17:23 +00:00
Josh Conner
ebdd079afc re PR middle-end/25505 (gcc uses way too much stack space for this code)
2006-08-31  Josh Conner  <jconner@apple.com>

	PR c++/25505
	* tree-gimple.c (is_gimple_mem_rhs): Recognize functions
	returning aggregates.

From-SVN: r116613
2006-08-31 23:44:00 +00:00
Keith Seitz
59294c2bdf jvmti.cc (_Jv_JVMTI_RawMonitorWait): Add millis parameter.
* jvmti.cc (_Jv_JVMTI_RawMonitorWait): Add millis parameter.
        Pass millis to _Jv_CondWait.

From-SVN: r116611
2006-08-31 22:56:23 +00:00
Keith Seitz
9d5941eea8 jvmti.h: Update from Classpath to get latest fixes and improvements.
* include/jvmti.h: Update from Classpath to get latest fixes and
        improvements.

From-SVN: r116610
2006-08-31 22:37:48 +00:00
Keith Seitz
acf3d3f8bf * include/jvmti_md.h: New file.
From-SVN: r116609
2006-08-31 22:37:25 +00:00
Benjamin Kosnik
1b98c24e32 PR libstdc++/28671 continued
2006-08-31  Benjamin Kosnik  <bkoz@redhat.com>

	PR libstdc++/28671 continued
	* acinclude.m4 (GLIBCXX_ENABLE_ATOMIC_BUILTINS): Don't use
	CXXFLAGS when checking for atomic builtins.
	* configure: Regenerate.
	* include/bits/atomicity.h: Revert.

From-SVN: r116608
2006-08-31 22:20:09 +00:00
Richard Guenther
e282a2bc9f mt_allocator.h: Remove volatile qualifiers from data members and corresponding locals and...
2006-08-31  Richard Guenther  <rguenther@suse.de>

	* include/ext/mt_allocator.h: Remove volatile qualifiers
	from data members and corresponding locals and function
	signatures.

From-SVN: r116606
2006-08-31 19:52:16 +00:00
Zdenek Dvorak
1e5787ef86 re PR tree-optimization/28839 (ICE in tree-vectorizer.c with -O2 -ftree-vectorize -funswitch-loops)
PR tree-optimization/28839
	* tree-into-ssa.c (prune_unused_phi_nodes): Take into account kills in
	blocks in that phi arguments appear.

	* gcc.dg/pr28839.c: New test.

From-SVN: r116605
2006-08-31 19:33:56 +00:00
Roger Sayle
6a10f7b362 re PR other/22313 (profiledbootstrap is broken on the mainline)
PR other/22313
	* dwarf2out.c (add_fde_cfi): Use a set_loc if the current label is
	NULL, otherwise use an advance_loc4 to adjust relative to the 
	current label.
	(output_cfi) <DW_CFA_set_loc>: Update the current label.
	(dwarf2out_switch_text_section): Reset the current label to avoid
	using advance_loc4 over section boundaries.

From-SVN: r116604
2006-08-31 17:35:32 +00:00
Tom Tromey
d50341e6de re PR libgcj/28698 ([gcj] libgcj-bc only used when building shared libs, not executables)
PR libgcj/28698:
	* libgcj_bc.c (DECLARE_PRIM_TYPE): New macro.  Declare primitive
	classes.

From-SVN: r116603
2006-08-31 17:23:57 +00:00
Paolo Carlini
a7cfb1af9e gnu.ver: Correct atomic helper function signature for case where _Atomic_word is long.
2006-08-31  Paolo Carlini  <pcarlini@suse.de>

	* config/abi/pre/gnu.ver: Correct atomic helper function signature
	for case where _Atomic_word is long.

From-SVN: r116602
2006-08-31 11:46:31 +00:00
Benjamin Kosnik
f640f39eef re PR libstdc++/28671 (undefined reference to `__sync_fetch_and_add_4')
2006-08-31  Benjamin Kosnik  <bkoz@redhat.com>

	PR libstdc++/28671
	* include/bits/atomicity.h (__exchange_and_add): Declare only.
	(__atomic_add): Same.
	* config/cpu/generic/atomicity_builtins/atomicity.h: Remove comment.

From-SVN: r116601
2006-08-31 10:45:59 +00:00
Andreas Krebbel
e4f2cd43ec re PR target/24367 (unrecognizable insn with -fPIC -O2 -funroll-loops)
2006-08-31  Andreas Krebbel  <krebbel1@de.ibm.com>

	PR target/24367
	* config/s390/s390.md ("movsi", "movdi" expander): Accept rtxes like
	r12 + SYMBOLIC_CONST.

2006-08-31  Andreas Krebbel  <krebbel1@de.ibm.com>

	PR target/24367
	* gcc.dg/pr24367.c: New testcase.

From-SVN: r116599
2006-08-31 07:43:36 +00:00
GCC Administrator
99cdbefb97 Daily bump.
From-SVN: r116597
2006-08-31 00:17:15 +00:00
Joern Rennecke
b666f3cf14 Fixed attribution for patch for PR tree-optimization/17506
From-SVN: r116593
2006-08-30 19:57:54 +01:00
Jason Merrill
2200205076 re PR c++/26670 (attribute((packed)) sometimes not ignored for non-PODs)
PR c++/26670
        * class.c (check_field_decls): Don't unset TYPE_PACKED until all
        the fields have been processed.

From-SVN: r116591
2006-08-30 11:51:17 -04:00
Kazu Hirata
884f22e3a2 * match.c: Fix a comment typo.
From-SVN: r116590
2006-08-30 15:10:26 +00:00
Joseph Myers
605c8e5ab0 * gcc.dg/arm-mmx-1.c: Skip for -mfloat-abi=softfp.
From-SVN: r116588
2006-08-30 15:35:14 +01:00
Corinna Vinschen
b91f0a4123 configure.in: Never build newlib for a Mingw host.
2006-08-30  Corinna Vinschen  <corinna@vinschen.de>
* configure.in: Never build newlib for a Mingw host.
Never build newlib as Mingw target library.
Test the existence of winsup/cygwin for building a Cygwin newlib,
rather than just winsup.
Add winsup/mingw and winsup/w32api paths to FLAGS_FOR_TARGET if
building a Mingw target.
* configure: Regenerate.

From-SVN: r116587
2006-08-30 09:48:49 -04:00
Corinna Vinschen
70aec81b22 configure.ac: Add case for Mingw as host.
2006-08-30  Corinna Vinschen  <corinna@vinschen.de>
* configure.ac: Add case for Mingw as host.
* configure: Regenerate.

From-SVN: r116586
2006-08-30 09:46:50 -04:00
Benjamin Kosnik
b93d5ca9df gnu.ver: Spell out exact signatures for atomic access functions.
2006-08-30  Benjamin Kosnik  <bkoz@redhat.com>
            Richard Guenther  <rguenther@suse.de>
	
	* config/abi/pre/gnu.ver: Spell out exact signatures for atomic
	access functions.

	* include/bits/atomicity.h (__atomic_add_dispatch): Remove
	volatile qualification for _Atomic_word argument.
	(__atomic_add_single): Same.
	(__exchange_and_add_dispatch): Same.
	(__exchange_and_add_single): Same.
	

Co-Authored-By: Richard Guenther <rguenther@suse.de>

From-SVN: r116584
2006-08-30 09:39:45 +00:00