Commit Graph

84714 Commits

Author SHA1 Message Date
Jakub Jelinek
d2dda7fed0 omp-low.c (lookup_decl_in_outer_ctx): Allow calling this with !ctx->is_nested.
* omp-low.c (lookup_decl_in_outer_ctx): Allow calling this
	with !ctx->is_nested.
	(maybe_lookup_decl_in_outer_ctx): Look up in outer contexts
	even if !ctx->is_nested.
	(lower_copyprivate_clauses, lower_send_clauses,
	lower_send_shared_vars): Call lookup_decl_in_outer_ctx
	unconditionally.

	* testsuite/libgomp.c/private-1.c: New test.

From-SVN: r130590
2007-12-04 00:06:55 +01:00
Jakub Jelinek
22164c3db7 re PR middle-end/29749 (Missing byte swap optimizations)
PR middle-end/29749
	* fold-const.c (fold_binary) <case BIT_AND_EXPR>: Optimize
	(X << C1) & C2 into (X << C1) & (C2 | ((1 << C1) - 1))
	and (X >> C1) & C2 into (X >> C1) & (C2 | ~((type) -1 >> C1)).
	(fold_binary) <case LSHIFT_EXPR, case RSHIFT_EXPR>: Optimize
	(X & C2) << C1 into (X << C1) & (C2 << C1) and
	(X & C2) >> C1 into (X >> C1) & (C2 >> C1) if that allows further
	optimizations.

	* gcc.dg/fold-rotate-1.c: New test.

From-SVN: r130589
2007-12-03 23:38:28 +01:00
Jakub Jelinek
36ad7922cb re PR tree-optimization/33453 (ICE in build2_stat, at tree.c:3110 with -ftree-parallelize-loops=4 -ftree-vectorize)
PR tree-optimization/33453
	* tree-data-ref.c (split_constant_offset): Use POINTER_PLUS_EXPR
	for pointer addition.
	* tree-parloops.c (canonicalize_loop_ivs): Likewise.
	(separate_decls_in_loop_name): Copy DECL_GIMPLE_REG_P from var to
	var_copy.

	* gcc.c-torture/compile/20071203-1.c: New test.

From-SVN: r130588
2007-12-03 23:35:39 +01:00
Tom Tromey
d56a25e130 ( 5)
From-SVN: r130586
2007-12-03 21:04:47 +00:00
Paolo Carlini
4d00757444 hashtable.cc: New.
2007-12-03  Paolo Carlini  <pcarlini@suse.de>

	* src/hashtable.cc: New.
	* src/hashtable_c++0x.cc: Likewise.
	* src/Makefile.am: Add.
	* src/Makefile.in: Regenerate.
	* include/tr1_impl/hashtable_policy.h (struct _Primes): Remove.
	(_Prime_rehash_policy::_M_next_bkt, _M_bkt_for_elements,
	_M_need_rehash): Adjust.
	* config/abi/pre/gnu.ver: Update exports.

	* src/hash.cc: Minor tweak.

From-SVN: r130585
2007-12-03 17:22:44 +00:00
Bernd Schmidt
78a1179776 Fix date in ChangeLog.
From-SVN: r130584
2007-12-03 16:34:26 +00:00
Bernd Schmidt
f13488c072 bfin.h (TARGET_CPU_CPP_BUILTINS): Define __FDPIC__ as necessary.
* config/bfin/bfin.h (TARGET_CPU_CPP_BUILTINS): Define __FDPIC__ as
	necessary.

From-SVN: r130583
2007-12-03 16:29:18 +00:00
Robert Dewar
403fd93996 re PR ada/34287 (Simple Ada bug [Barnes' Silly])
2007-12-03  Robert Dewar <dewar@adacore.com>
            Samuel Tardieu  <sam@rfc1149.net>

        gcc/ada/
    	PR ada/34287
    	* sem_util.adb (Safe_To_Capture_Value): Do not capture values
    	of variables declared in a library-level package.
    
        gcc/testsuite/gnat.dg/
    	PR ada/34287
    	* check_elaboration_code.adb: New test.
    
    	* bug_elaboration_code.ads, bug_elaboration_code.adb: New support
    	files.

Co-Authored-By: Samuel Tardieu <sam@rfc1149.net>

From-SVN: r130582
2007-12-03 16:01:57 +00:00
Paolo Carlini
69b3331e2a unordered_map (operator==(const unordered_map&, const unordered_map&), [...]): Remove.
2007-12-03  Paolo Carlini  <pcarlini@suse.de>

	* include/debug/unordered_map (operator==(const unordered_map&,
	const unordered_map&), operator!=(const unordered_map&,
	const unordered_map&), operator==(const unordered_multimap&,
	const unordered_multimap&), operator!=(const unordered_multimap&,
	const unordered_multimap&)): Remove.
	(unordered_map<>::unordered_map(unordered_map&&),
	operator=(unordered_map&&), clear, _M_invalidate_all,
	unordered_multimap<>::unordered_multimap(unordered_multimap&&),
	operator=(unordered_map&&), clear, _M_invalidate_all,	
	swap(unordered_map<>&&, unordered_map<>&), swap(unordered_map<>&,
	unordered_map<>&&), swap(unordered_multimap<>&&,
	unordered_multimap<>&), swap(unordered_multimap<>&,
	unordered_multimap<>&&)): Add.
	* include/debug/unordered_set (operator==(const unordered_set&,
	const unordered_set&), operator!=(const unordered_set&,
	const unordered_set&), operator==(const unordered_multiset&,
	const unordered_multiset&), operator!=(const unordered_multiset&,
	const unordered_multiset&)): Remove.
	(unordered_set<>::unordered_set(unordered_set&&),
	operator=(unordered_set&&), clear, _M_invalidate_all,
	unordered_multiset<>::unordered_multiset(unordered_multiset&&),
	operator=(unordered_set&&), clear, _M_invalidate_all,	
	swap(unordered_set<>&&, unordered_set<>&), swap(unordered_set<>&,
	unordered_set<>&&), swap(unordered_multiset<>&&,
	unordered_multiset<>&), swap(unordered_multiset<>&,
	unordered_multiset<>&&)): Add.
	* include/debug/safe_association.h (_Safe_association<>::
	_Safe_association(_Safe_association&&)): Add.
	(_Safe_association<>::clear, _M_invalidate_all): Remove.

From-SVN: r130581
2007-12-03 13:12:51 +00:00
Razya Ladelsky
aa1a4968d3 invoke.texi (fipa-cp, [...]): Add documentation.
2007-12-03  Razya Ladelsky <razya@il.ibm.com>

    * doc/invoke.texi (fipa-cp, fipa-matrix-reorg): Add documentation.

From-SVN: r130580
2007-12-03 11:16:36 +00:00
Jakub Jelinek
e90338556a re PR middle-end/34317 (-fno-tree-store-copy-prop causes an ICE)
PR middle-end/34317
	* opts.c (common_handle_option): Handle OPT_ftree_store_copy_prop.
	* common.opt (ftree-store-copy-prop): Use the same help text as for
	other nop switches.

From-SVN: r130579
2007-12-03 11:45:53 +01:00
GCC Administrator
e75ca1a3af Daily bump.
From-SVN: r130577
2007-12-03 00:17:43 +00:00
Jerry DeLisle
2ea7440786 re PR libfortran/33985 (access="stream",form="unformatted" doesn't buffer)
2007-12-02  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
	    Thomas Koenig  <tkoenig@gcc.gnu.org>

	PR libfortran/33985
	* io/transfer.c (read_block, read_block_direct, write_block, write_buf):
	Don't seek if file position is already there for STREAM I/O.
	(finalize_transfer): For STREAM I/O don't flush unless the file position
	has moved past the start position before the transfer.

Co-Authored-By: Thomas Koenig <tkoenig@gcc.gnu.org>

From-SVN: r130574
2007-12-02 23:17:16 +00:00
Paolo Carlini
0b93f014a7 re PR c++/34061 (ICE with template-template parameters and inheritance)
/cp
2007-12-02  Paolo Carlini  <pcarlini@suse.de>

        PR c++/34061
        * pt.c (current_template_args): Use error_operand_p.

/testsuite
2007-12-02  Paolo Carlini  <pcarlini@suse.de>

        PR c++/34061
        * g++.dg/cpp0x/pr34061.C: New.

From-SVN: r130573
2007-12-02 19:47:18 +00:00
Samuel Tardieu
dd9c642a8b Makefile.in: Add support for sh4-linux.
gcc/ada/
	* Makefile.in: Add support for sh4-linux.

	* system-linux-sh4.ads: New file.

From-SVN: r130572
2007-12-02 18:29:04 +00:00
Samuel Tardieu
0bcb4d2a2a clean.adb (Clean_Library_Directory): Use Empty_String'Access intead of Empty_String'Unchecked_Access.
gcc/ada/
	* clean.adb (Clean_Library_Directory): Use Empty_String'Access intead
	of Empty_String'Unchecked_Access.

From-SVN: r130571
2007-12-02 18:27:53 +00:00
Paolo Carlini
06be4f564b re PR c++/34273 (Broken diagnostic: 'tree_binfo' not supported by dump_decl)
/cp
2007-12-02  Paolo Carlini  <pcarlini@suse.de>

        PR c++/34273
        * error.c (dump_decl): Handle TREE_BINFO.

/testsuite
2007-12-02  Paolo Carlini  <pcarlini@suse.de>

        PR c++/34273
        * g++.dg/other/error21.C: New.

From-SVN: r130570
2007-12-02 16:58:34 +00:00
Tobias Burnus
19cfe6c08d re PR fortran/34186 (dump-parse-tree: ICE for ts->cl->length, if ts->cl == NULL)
2007-12-02  Tobias Burnus  <burnus@net-b.de>

        PR fortran/34186
        * symbol.c (generate_isocbinding_symbol): Fix setting string
        length.

From-SVN: r130569
2007-12-02 15:23:48 +01:00
Matthias Klose
aba7501e3f config-ml.in: Remove 64bit configure tests.
2007-12-02  Matthias Klose  <doko@ubuntu.com>

        * config-ml.in: Remove 64bit configure tests.

From-SVN: r130568
2007-12-02 13:27:37 +00:00
Revital Eres
d48b46e04d Fix the direction of the scheduling window & Fix scheduling order within a row
From-SVN: r130567
2007-12-02 11:01:26 +00:00
Samuel Tardieu
083f0d3a04 sh.md (cmpgeusi_t): Fix condition.
gcc/
	* config/sh/sh.md (cmpgeusi_t): Fix condition.

From-SVN: r130566
2007-12-02 09:26:09 +00:00
GCC Administrator
b9d4915c0f Daily bump.
From-SVN: r130564
2007-12-02 00:17:18 +00:00
Francois-Xavier Coudert
101eebdb8a stat.c (stat_i4_sub_0, [...]): Mark parameter with unused attribute.
* intrinsic/stat.c (stat_i4_sub_0, stat_i8_sub_0): Mark parameter
	with unused attribute.
	* intrinsics/system_clock.c (system_clock_4, system_clock_8):
	Remove unused variable.
	* intrinsics/umask.c: Include unistd.h.

From-SVN: r130561
2007-12-01 21:16:26 +00:00
Jan Hubicka
dd56b4c5ab ggc-common.c (dump_ggc_loc_statistics): Reset ggc_force_collect flag.
* ggc-common.c (dump_ggc_loc_statistics): Reset ggc_force_collect
	flag.

From-SVN: r130560
2007-12-01 21:06:31 +00:00
Andreas Tobler
162871481a re PR libffi/31937 (libffi doesn't support ppc without FPU)
2007-12-01  Andreas Tobler  <a.tobler@schweiz.org>

	PR libffi/31937
	* src/powerpc/ffitarget.h: Introduce new ABI FFI_LINUX_SOFT_FLOAT.
	Add local FFI_TYPE_UINT128 to handle soft-float long-double-128.
	* src/powerpc/ffi.c: Distinguish between __NO_FPRS__ and not and
	set the NUM_FPR_ARG_REGISTERS according to.
	Add support for potential soft-float support under hard-float
	architecture.
	(ffi_prep_args_SYSV): Set NUM_FPR_ARG_REGISTERS to 0 in case of
	FFI_LINUX_SOFT_FLOAT, handle float, doubles and long-doubles according
	to the FFI_LINUX_SOFT_FLOAT ABI.
	(ffi_prep_cif_machdep): Likewise.
	(ffi_closure_helper_SYSV): Likewise.
	* src/powerpc/ppc_closure.S: Make sure not to store float/double
	on archs where __NO_FPRS__ is true.
	Add FFI_TYPE_UINT128 support.
	* src/powerpc/sysv.S: Add support for soft-float long-double-128.
	Adjust copyright notice.

From-SVN: r130559
2007-12-01 22:00:04 +01:00
Paolo Carlini
e78b91ce0e hashtable_policy.h (struct _LessThan): Remove.
2007-12-01  Paolo Carlini  <pcarlini@suse.de>

	* include/tr1_impl/hashtable_policy.h (struct _LessThan): Remove.
	(_Prime_rehash_policy::_M_bkt_for_elements, _Prime_rehash_policy::
	_M_need_rehash): Adjust.

From-SVN: r130558
2007-12-01 18:31:17 +00:00
Paolo Carlini
d87135d45a stl_tempbuf.h (__get_temporary_buffer): Fold in get_temporary_buffer.
2007-12-01  Paolo Carlini  <pcarlini@suse.de>

	* include/bits/stl_tempbuf.h (__get_temporary_buffer): Fold
	in get_temporary_buffer.

From-SVN: r130557
2007-12-01 16:29:22 +00:00
Kostik Belousov
353301145b re PR ada/33722 (putenv() is made posix-conformant on FreeBSD 7.x)
2007-12-01  Kostik Belousov  <kostikbel@ukr.net>

    gcc/ada/
	PR ada/33722
	* env.c (__gnat_setenv): FreeBSD 7 has a POSIX conformant putenv()
	and its argument must not be free()ed.

From-SVN: r130555
2007-12-01 11:52:42 +00:00
Ollie Wild
867f133ec4 re PR c++/8171 (Cannot compare pointer to member function of base and derived class)
PR c++/8171

	gcc/cp/
	* typeck.c (build_binary_op): Add conversion of pointers to function
	members appearing as operands to the equality operators.

	gcc/testsuite/
	* g++.dg/conversion/ptrmem9.C: New test.

From-SVN: r130554
2007-12-01 08:56:55 +00:00
GCC Administrator
c23ebce246 Daily bump.
From-SVN: r130552
2007-12-01 00:17:31 +00:00
Jerry DeLisle
63e8b6a565 re PR libfortran/34291 (Segfault in io/list_read.c handling of end conditions)
2007-11-30  Jerry DeLisle  <jvdelisle@gcc.gnu.org>

	PR libfortran/34291
	* gfortran.dg/namelist_41.f90: New test.

From-SVN: r130549
2007-11-30 23:21:48 +00:00
Jerry DeLisle
3c55599b1f re PR libfortran/34291 (Segfault in io/list_read.c handling of end conditions)
2007-11-30  Jerry DeLisle  <jvdelisle@gcc.gnu.org>

	PR libfortran/34291
	* io/list_read.c (read_character): When reading an unquoted string,
	return if special characters that could signify the end of the namelist
	read are encountered.

From-SVN: r130548
2007-11-30 23:19:34 +00:00
Samuel Tardieu
a6968b8b9d Change bogus PR in ChangeLog (15803->15804)
From-SVN: r130547
2007-11-30 22:11:32 +00:00
Tom Tromey
607f74e9c6 re PR preprocessor/32868 (Don't warn about redefinitions of __STDC_FORMAT_MACROS)
libcpp
	PR preprocessor/32868:
	* macro.c (_cpp_create_definition): Special case
	__STDC_FORMAT_MACROS.
gcc/testsuite
	PR preprocessor/32868:
	* gcc.dg/cpp/pr32868.c: New file.

From-SVN: r130544
2007-11-30 18:24:01 +00:00
Jerry DeLisle
28d67019f9 re PR fortran/34248 (ICE on assumed length character function)
2007-11-30  Jerry DeLisle  <jvdelisle@gcc.gnu.org>

	PR fortran/34248
	* gfortran.dg/result_in_spec_3.f90: Add dg-option -std=gnu.

From-SVN: r130542
2007-11-30 17:55:55 +00:00
Tom Tromey
dc3800e59e Really remove accidentally committed ChangeLog entry
From-SVN: r130541
2007-11-30 17:44:03 +00:00
Seongbae Park
6c3d0e311a re PR rtl-optimization/34171 (Segfault in df_chain_remove_problem with -O3 on alpha)
gcc/testsuite/ChangeLog:

2007-11-30  Martin Michlmayr <tbm@cyrius.com>

	PR rtl-optimization/34171
	* gcc.dg/pr34171.c: New testcase.

gcc/ChangeLog:

2007-11-30  Seongbae Park <seongbae.park@gmail.com>

	PR rtl-optimization/34171
	* cfgrtl.c (update_bb_for_insn_chain): New function,
	refactored from update_bb_for_insn.
	(update_bb_for_insn): Call update_bb_for_insn.
	(rtl_merge_blocks, try_redirect_by_replacing_jump):
	Replace a loop with update_bb_for_insn_chain call.
	(cfg_layout_merge_blocks): Add a call to
	update_bb_for_insn_chain. Replace the for loop
	with a call to update_bb_for_insn_chain.

From-SVN: r130539
2007-11-30 17:02:43 +00:00
Zdenek Dvorak
b88782e14d pr34244.c: Fixed.
* gcc.dg/tree-ssa/pr34244.c: Fixed.

From-SVN: r130536
2007-11-30 12:48:28 +00:00
Tobias Burnus
1eabf70a84 re PR fortran/34133 (Bind(c,name="") should be rejected for dummies; F2008: allow bind(c) for internal procs)
2007-11-20  Tobias Burnus  <burnus@net-b.de>

        PR fortran/34133
        * match.h: Add bool allow_binding_name to gfc_match_bind_c.
        * decl.c
        * (match_attr_spec,gfc_match_bind_c_stmt,gfc_match_entry):
        Adjust accordingly.
        (gfc_match_bind_c): Add allow_binding_name argument, reject
        binding name for dummy arguments.
        (gfc_match_suffix,gfc_match_subroutine): Make use of
        allow_binding_name.

2007-11-20  Tobias Burnus  <burnus@net-b.de>

        PR fortran/34133
        * gfortran.dg/bind_c_usage_9.f03: Fixes; add -std=f2003.
        * gfortran.dg/bind_c_usage_11.f03: New.
        * gfortran.dg/bind_c_usage_12.f03: New.

From-SVN: r130535
2007-11-30 13:16:35 +01:00
Tobias Burnus
e6ef7325b8 re PR fortran/34186 (dump-parse-tree: ICE for ts->cl->length, if ts->cl == NULL)
2007-11-30  Tobias Burnus  <burnus@net-b.de>

        PR fortran/34186
        * symbol.c (generate_isocbinding_symbol): Set string length.
        * dump-parse-tree.c (gfc_show_attr): Show BIND(C) attribute.
        * misc.c (gfc_basic_typename): Handle BT_VOID.

From-SVN: r130534
2007-11-30 10:31:56 +01:00
Jakub Jelinek
89ab8ba092 re PR c++/34275 (Broken diagnostic: 'obj_type_ref' not supported by dump_expr)
PR c++/34275
	* error.c (dump_expr): Handle OBJ_TYPE_REF.

	* g++.dg/other/error20.C: New test.

From-SVN: r130533
2007-11-30 08:24:54 +01:00
Steven G. Kargl
6aa38454ca re PR fortran/34230 (Expressions of parameters evaluated with too high precision)
2007-11-29  Steven G. Kargl  <kargls@comcast.net>

	PR fortran/34230
	* gfortran.dg/real_const_3.f90: Fix up for new range-check handling.

From-SVN: r130532
2007-11-30 04:18:05 +00:00
Steven G. Kargl
786a435680 re PR libfortran/33583 (FAIL: gfortran.dg/gamma_1.f90)
2007-11-29  Steven G. Kargl  <kargls@comcast.net>

	PR libfortran/33583
	* libgfortran/gfortran.map: Add tgammaf, tgamma, lgamma, and lgammaf.
	* gfortran.dg/gamma_5.f90: Remove xfail.

From-SVN: r130531
2007-11-30 04:14:01 +00:00
Steven G. Kargl
a84b9ee86e re PR fortran/34230 (Expressions of parameters evaluated with too high precision)
2007-11-29  Steven G. Kargl  <kargls@comcast.net>

	PR fortran/34230
	* fortran/arith.c (gfc_check_real_range): Set intermediate values
	to +-Inf and 0 when -fno-range-check is in effect.
	* fortran/invoke.texi: Improve -fno-range-check description.

	PR fortran/34203
	* fortran/invoke.texi: Document the C escaped characters activated
	by -fbackslash.

From-SVN: r130530
2007-11-30 04:10:47 +00:00
Ben Elliston
04fe2e7b30 * config/vax/vax.h (ASM_FORMAT_PRIVATE_NAME): Remove. Use default.
From-SVN: r130529
2007-11-30 13:47:26 +11:00
Zdenek Dvorak
13285d512d re PR tree-optimization/34244 (VRP/SCEV miscompiles Firefox)
PR tree-optimization/34244
	* tree-vrp.c (adjust_range_with_scev): Clear scev cache.
	(record_numbers_of_iterations): New function.
	(execute_vrp): Cache the numbers of iterations of loops.
	* tree-scalar-evolution.c (scev_reset_except_niters):
	New function.
	(scev_reset): Use scev_reset_except_niters.
	* tree-scalar-evolution.h (scev_reset_except_niters): Declare.

	* gcc.dg/tree-ssa/pr34244.c: New test.

From-SVN: r130527
2007-11-30 00:32:04 +00:00
GCC Administrator
54bded776c Daily bump.
From-SVN: r130525
2007-11-30 00:17:33 +00:00
Jan Hubicka
f6f2da7df7 re PR tree-optimization/33434 (inlining miscompilation)
PR tree-optimization/33434
	* tree-inline.c (setup_one_parameter): If the value passed to
	a parameter is never used, don't set it up.

	* gcc.dg/pr33434-1.c: New test.
	* gcc.dg/pr33434-2.c: New test.
	* gcc.dg/pr33434-3.c: New test.
	* gcc.dg/pr33434-4.c: New test.

From-SVN: r130521
2007-11-29 22:57:38 +01:00
Jakub Jelinek
42924ed71f re PR c++/34270 (ICE applying __decltype to ternary expression)
PR c++/34270
	* tree.c (lvalue_p_1) <case COND_EXPR>: Handle x ?: y
	in templates.
	* typeck.c (is_bitfield_expr_with_lowered_type) <case COND_EXPR>:
	Likewise.

	* g++.dg/template/cond7.C: New test.

From-SVN: r130520
2007-11-29 22:06:18 +01:00
Jakub Jelinek
7a547b936c re PR c++/34267 (ICE applying __decltype to name of template class)
PR c++/34267
	PR c++/34268
	* parser.c (cp_parser_decltype): Don't call finish_id_expression
	on ~type.
	* semantics.c (finish_decltype_type): Issue error on types, TYPE_DECLs
	and ~type early.

	* g++.dg/cpp0x/decltype7.C: New test.
	* g++.dg/cpp0x/decltype8.C: New test.

From-SVN: r130519
2007-11-29 22:04:04 +01:00