Commit Graph

4115 Commits

Author SHA1 Message Date
Mark Mitchell b3f8d95d35 configure.in (arm*-*-eabi*): New target.
* configure.in (arm*-*-eabi*): New target.
	* configure: Regenerate.

	* configure.ac (arm*-*-eabi*): New target.
	(arm*-*-symbianelf*): Likewise.
	* configure: Regenerated.

	* config.gcc (arm*-*-eabi*): New target.
	* defaults.h (TARGET_LIBGCC_FUNCS): New macro.
	(TARGET_LIB_INT_CMP_BIASED): Likewise.
	* expmed.c (expand_divmod): Try a two-valued divmod function as a
	last resort.
	* gthr.h: Remove bogus tokens at end of #pragma.
	* optabs.c (expand_twoval_binop_libfunc): New function.
	(prepare_cmp_insn): Handle the !TARGET_LIB_INT_CMP_BIASED case.
	(prepare_float_lib_cmp): Try reversing the condition.
	(debug_optab_libfuncs): New function.
	* optabs.h (expand_twoval_binop_libfunc): Declare.
	* config/arm/arm.c (arm_init_libfuncs): New function.
	(arm_compute_initial_eliminatino_offset): Return HOST_WIDE_INT.
	(TARGET_INIT_LIBFUNCS): Define it.
	* config/arm/arm.h (TARGET_BPABI): New macro.
	* config/arm/arm-protos.h
	(arm_compute_initial_elimination_offset): Return HOST_WIDE_INT.
	* config/arm/bpabi.S: New file.
	* config/arm/bpabi.c: Likewise.
	* config/arm/bpabi.h: Likewise.
	* config/arm/ieee754-df.S (__aeabi_dneg): New function or alias.
	(__aeabi_drsub): Likewise.
	(__aeabi_dsub): Likewise.
	(__aeabi_dadd): Likewise.
	(__aeabi_ui2d): Likewise.
	(__aeabi_i2d): Likewise.
	(__aeabi_f2d): Likewise.
	(__aeabi_dmul): Likewise.
	(__aeabi_ddiv): Likewise.
	(__aeabi_cdrcmple): Likewise.
	(__aeabi_cdcmpeq): Likewise.
	(__aeabi_cdcmple): Likewise.
	(__aeabi_dcmpeq): Likewise.
	(__aeabi_dcmplt): Likewise.
	(__aeabi_dcmple): Likewise.
	(__aeabi_dcmpge): Likewise.
	(__aeabi_dcmpgt): Likewise.
	(__aeabi_dcmpun): Likewise.
	(__aeabi_d2iz): Likewise.
	(__aeabi_d2uiz): Likewise.
	(__aeabi_d2f): Likewise.
	* config/arm/ieee754-sf.S (__aeabi_fneg): New function or alias.
	(__aeabi_frsub): Likewise.
	(__aeabi_fsub): Likewise.
	(__aeabi_fadd): Likewise.
	(__aeabi_ui2f): Likewise.
	(__aeabi_i2f): Likewise.
	(__aeabi_fmul): Likewise.
	(__aeabi_fdiv): Likewise.
	(__aeabi_cfrcmple): Likewise.
	(__aeabi_cfcmpeq): Likewise.
	(__aeabi_cfcmple): Likewise.
	(__aeabi_fcmpeq): Likewise.
	(__aeabi_fcmplt): Likewise.
	(__aeabi_fcmple): Likewise.
	(__aeabi_fcmpge): Likewise.
	(__aeabi_fcmpgt): Likewise.
	(__aeabi_fcmpun): Likewise.
	(__aeabi_f2iz): Likewise.
	(__aeabi_f2uiz): Likewise.
	* config/arm/lib1funcs.asm (ARM_CALL): New macro.
	(__aeabi_uidivmod): New function or alias.
	(__aeabi_idivmod): Likewise.
	(__aeabi_idiv0): Likewise.
	(__aeabi_ldiv0): Likewise.
	(__aeabi_llsr): Likewise.
	(__aeabi_lasr): Likewise.
	(__aeabi_llsl): Likewise.
	(bpabi.S): Include it.
	* config/arm/libgcc-bpabi.ver: New file.
	* config/arm/symbian.h (ARM_DEFAULT_ABI): Remove.
	(LINK_SPEC): Remove.
	* config/arm/t-arm-elf (LIB1ASMFUNCS): Add __aeabi_lcmp and
	__aeabi_ulcmp.
	* config/arm/t-bpabi: New file.
	* doc/tm.texi (TARGET_LIBGCC_FUNCS): New entry.
	(TARGET_LIB_INT_CMP_BIASED): Likewise.

	* gcc.dg/testsuite/gcc.dg/arm-eabi1.c: New test.
	* gcc.dg/dll-2.c: Fix dg-require syntax.
	* gcc.misc-tests/arm-isr.c (abort): Declare.
	(exit): Likewise.

From-SVN: r85788
2004-08-11 02:50:14 +00:00
Mark Mitchell 550205c3ae re PR c++/16971 (ICE on duplicate definition)
PR c++/16971
	* parser.c (cp_parser_init_declarator): Robustify.

	PR c++/16971
	* g++.dg/parse/crash16.C: New test.

From-SVN: r85776
2004-08-11 00:14:37 +00:00
Roger Sayle 236573882e mips.md: New reciprocal square root patterns that match sqrt(1.0/x) in addition to the...
* config/mips/mips.md: New reciprocal square root patterns that
	match sqrt(1.0/x) in addition to the existing 1.0/sqrt(x) insns.

	* gcc.dg/mips-rsqrt-1.c: New test case.
	* gcc.dg/mips-rsqrt-2.c: New test case.
	* gcc.dg/mips-rsqrt-3.c: New test case.

From-SVN: r85759
2004-08-10 17:43:02 +00:00
Paul Brook 2bf26ede97 trans-io.c (transfer_expr): Handle pointters.
* trans-io.c (transfer_expr): Handle pointters.
testsuite/
	* gfortran.dg/der_io_1.f90: New test.

From-SVN: r85738
2004-08-10 00:57:22 +00:00
Paul Brook e9cfef6413 re PR fortran/16919 (ICE with derived type and array constructor)
PR fortran/16919
	* trans-array.c (gfc_add_loop_ss_code): Handle GFC_SS_COMPONENT.
	(gfc_conv_array_index_offset): Allow "temporary" with nonzero delta.
	(gfc_trans_preloop_setup, gfc_trans_scalarized_loop_boundary):
	Handle GFC_SS_COMPONENT.
	(gfc_conv_ss_startstride): Ditto.  Set ss->shape.
	(gfc_conv_loop_setup): Tweak commends. Remove dead code.
	Use ss->shape.
	(gfc_conv_array_initializer): Call specific initializer routines.
	* trans-expr.c (gfc_trans_structure_assign): New function.
	(gfc_trans_subarray_assign): New function.
	(gfc_trans_subcomponent_assign): New fucntion
	(gfc_conv_structure): Use them.
	* trans.h (gfc_ss_type): Add GFC_SS_COMPONENT.
	(gfc_ss): Add shape.
testsuite/
	* gfortran.dg/der_array_1.f90: New test.

From-SVN: r85730
2004-08-09 23:32:59 +00:00
David Edelsohn feb21f0d14 * gcc.dg/cpp/assert4.c: _AIX asserts #system(unix).
From-SVN: r85726
2004-08-09 18:01:05 -04:00
Paolo Bonzini b3bcf92c93 wchar_t-2.c: Fix typo.
2004-08-09  Paolo Bonzini  <bonzini@gnu.org>

	* gcc.dg/wchar_t-2.c: Fix typo.

From-SVN: r85713
2004-08-09 07:24:23 +00:00
Falk Hueffner 08a02c9e08 re PR tree-optimization/12517 ([tree-ssa] ICE in bsi_insert_on_edge_immediate)
PR tree-optimization/12517
	* gcc.c-torture/compile/pr12517.c: New test.

	PR tree-optimization/12578
	* gcc.c-torture/compile/pr12578.c: New test.

	PR tree-optimization/12899
	* gcc.c-torture/compile/pr12899.c: New test.

	PR rtl-optimization/14692
	* gcc.c-torture/compile/pr14692.c: New test.

	PR tree-optimization/16461
	* gcc.c-torture/compile/pr16461.c: New test.

From-SVN: r85698
2004-08-09 01:17:23 +02:00
Janne Blomqvist aa6fc63508 intrinsic.c (add_subroutines): Add getenv and get_environment_variable.
2004-08-06  Janne Blomqvist  <jblomqvi@cc.hut.fi>

	* intrinsic.c (add_subroutines): Add getenv and
	get_environment_variable. (add_sym_5s): New function.
	* intrinsic.h (gfc_resolve_get_environment_variable): Add
	prototype.
	* iresolve.c (gfc_resolve_get_environment_variable): New
	function.
libgfortran/
	* intrinsics/env.c: New file.
	* Makefile.am: Add env.c to build.
	* Makefile.in: Regenerate.
testsuite/
	* gfortran.dg/getenv_1.f90: New test.

From-SVN: r85656
2004-08-06 21:47:03 +00:00
Mark Mitchell 2ed9e5272e symbian.h (CC1_SPEC): Avoid passing duplicate options to the compiler.
* config/arm/symbian.h (CC1_SPEC): Avoid passing duplicate options
	to the compiler.  Use -fshort-wchar by default.

	* gcc.dg/symbian4.c: Expect a 2-byte wchar_t, not a 4-byte
	wchar_t.
	* gcc.dg/symbian5.c: Test -fno-short-wchar.

From-SVN: r85648
2004-08-06 17:51:45 +00:00
Paul Brook fc90a8f2ee trans-array.c (gfc_trans_allocate_array_storage, [...]): For functions...
* trans-array.c (gfc_trans_allocate_array_storage,
	gfc_trans_allocate_temp_array, gfc_add_loop_ss_code,
	gfc_conv_loop_setup):
	For functions, if the shape of the result is not known
	in compile-time, generate an empty array descriptor for
	the result and let the callee to allocate the memory.
	(gfc_trans_dummy_array_bias): Do nothing for pointers.
	(gfc_conv_expr_descriptor): Use function return values directly.
	* trans-expr.c (gfc_conv_function_call): Always add byref call
	insn to pre chain.
	(gfc_trans_pointer_assignment): Add comments.
	(gfc_trans_arrayfunc_assign): Don't chain on expression.
testsuite/
	* gfortran.dg/ret_array_1.f90: New test.
	* gfortran.dg/ret_pointer_1.f90: New test.

From-SVN: r85642
2004-08-06 15:01:10 +00:00
Richard Sandiford eaac467945 re PR c/13282 (A "-Wno..." switch to turn off "missing initializer" warnings)
PR c/13282
	* c.opt (Wmissing-field-initializers): New option.
	* c-opts.c (c_common_post_options): Make -Wextra turn it on by default.
	* c-typeck.c (pop_init_level): Guard the missing field warning with
	warn_missing_field_initializers rather than extra_warnings.
	* doc/invoke.texi (-Wmissing-field-initializers): Document, moving
	some of the explanation from...
	(-Wextra): ...here.  Say that the missing field warning can be
	seperately controlled by -Wmissing-field-initializers.

cp/
	* typeck2.c (process_init_constructor): Guard the missing field warning
	with warn_missing_field_initializers rather than extra_warnings.

testsuite/
	* gcc.dg/missing-field-init-[12].c: New tests.
	* g++.dg/warn/missing-field-init-[12].C: New tests.

From-SVN: r85638
2004-08-06 11:23:23 +00:00
Mark Mitchell 866cf03731 symbian.h (CC1_SPEC): Add -fno-short-enums.
* config/arm/symbian.h (CC1_SPEC): Add -fno-short-enums.
	(CC1PLUS_SPEC): Define it to be the same as CC1_SPEC.

	* gcc.dg/enum2.c: New test.
	* gcc.dg/symbian3.c: Likewise.
	* gcc.dg/symbian4.c: Likewise.
	* gcc.dg/wchar_t-2.c: Likewise.

From-SVN: r85632
2004-08-06 07:54:19 +00:00
Mark Mitchell ae232e452c visibility-8.C: Add constructor and destructor tests.
* g++.dg/ext/visibility/visibility-8.C: Add constructor and
	destructor tests.

From-SVN: r85623
2004-08-06 03:26:19 +00:00
Mark Mitchell b2ca370228 tree.c (handle_dll_attribute): Move here from i383/winnt.c.
* tree.c (handle_dll_attribute): Move here from i383/winnt.c.
	Replace use of DECL_INLINE with DECL_DECLARED_INLINE_P.  Set
	DECL_VISIBLITY.  Test TARGET_DLLIMPORT_DECL_ATTRIBUTES with #if.
	* tree.h (handle_dll_attribute): Declare.  Test
	TARGET_DLLIMPORT_DECL_ATTRIBUTES with #if.
	* c-common.h (c_determine_visibility): Declare.
	* c-common.c (c_determine_visibility): New function.
	* c-decl.c (finish_decl): Use it.
	(finish_function): Likewise.
	* defaults.h (TARGET_DLLIMPORT_DECL_ATTRIBUTES): Define it to
	zero, by default.  Use #if, not	#ifdef, to test it.
	* config/arm/arm.c (arm_attribute_table): Use
	handle_dll_attribute.  Test TARGET_DLLIMPORT_DECL_ATTRIBUTES with
	#if.
	* config/arm/pe.h (TARGET_DLLIMPORT_DECL_ATTRIBUTES): Define to 1.
	* config/i386/cygming.h (TARGET_DLLIMPORT_DECL_ATTRIBUTES): Define
	to 1.
	* config/i386/i386-protos.h (ix86_handle_dll_attribute): Remove.
	* config/i386/i386.c (ix86_attribute_table): Use
	handle_dll_attribute for dllimport/dllexport.  Test
	TARGET_DLLIMPORT_DECL_ATTRIBUTES with #if.
	* config/i386/winnt.c (ix86_handle_dll_attribute): Remove.
	* config/mcore/mcore.h (TARGET_DLLIMPORT_DECL_ATTRIBUTES): Define
	it to 1.
	* config/mcore/mcore.c (TARGET_DLLIMPORT_DECL_ATTRIBUTES): Test it
	with #if.
	* config/sh/symbian-pre.h (TARGET_DLLIMPORT_DECL_ATTRIBUTES): Define
	it to 1.
	* doc/extend.texi (dllexport): Clarify and correct documentation.
	(dllimport): Likewise.
	* doc/tm.texi (TARGET_DLLIMPORT_DECL_ATTRIBUTES): Mention
	handle_dll_attribute.

	* decl.c (start_preparsed_function): Move determine_visibility
	call.
	* decl2.c (determine_visibility): Incorporate dllexport testing.

	* g++.dg/ext/visibility/assign1.C: Use scan-hidden and
	dg-require-visiblity.
	* g++.dg/ext/visibility/fvisibility-inlines-hidden.C: Likewise.
	* g++.dg/ext/visibility/fvisibility.C: Likewise.
	* g++.dg/ext/visibility/memfuncts.C: Likewise.
	* g++.dg/ext/visibility/new1.C: Likewise.
	* g++.dg/ext/visibility/pragma.C: Likewise.
	* g++.dg/ext/visibility/staticmemfuncts.C: Likewise.
	* g++.dg/ext/visibility/virtual.C: Likewise.
	* g++/dg/ext/visibility/visibility-1.C: Likewise.
	* g++/dg/ext/visibility/visibility-2.C: Likewise.
	* g++/dg/ext/visibility/visibility-3.C: Likewise.
	* g++/dg/ext/visibility/visibility-4.C: Likewise.
	* g++/dg/ext/visibility/visibility-5.C: Likewise.
	* g++/dg/ext/visibility/visibility-6.C: Likewise.
	* g++/dg/ext/visibility/visibility-7.C: Likewise.
	* g++/dg/ext/visibility/visibility-8.C: New test.
	* gcc.c-torture/compile/dll.x: Remove.
	* gcc.dg/dll-2.c: Use dg-require-dll
	* gcc.dg/visibility-10.c: New test.
	* lib/gcc-dg.exp (dg-require-dll): Add Symbian to list of targets
	supporting DLLs.
	* testsuite/lib/scanasm.exp (scan_hidden): New function.
	(scan_not_hidden): Likewise.

From-SVN: r85621
2004-08-06 02:03:29 +00:00
David Edelsohn d279700a68 * gcc.dg/sh4a-fprun.c: Fix dg-do typo.
From-SVN: r85605
2004-08-05 13:37:02 -04:00
Richard Sandiford ea5f7a1992 i386.c (ix86_expand_prologue): If the function uses a frame pointer, restore eax with an ebp-relative address.
* config/i386/i386.c (ix86_expand_prologue): If the function uses a
	frame pointer, restore eax with an ebp-relative address.

From-SVN: r85595
2004-08-05 07:13:56 +00:00
Andrew Pinski fce731b52f 20020118-1.c: Declare abort.
2004-08-04  Andrew Pinski  <pinskia@physics.uc.edu>

        * gcc.dg/20020118-1.c: Declare abort.
        * gcc.dg/altivec_check.h: Likewise.
        * gcc.dg/iftrap-2.c: Likewise.
        * gcc.dg/pragma-darwin.c: Likewise.
        * gcc.dg/rs6000-ldouble-1.c: Declare abort and exit.

From-SVN: r85594
2004-08-04 23:06:49 -07:00
Geoffrey Keating 99b1c586a5 * g++.dg/ext/altivec_check.h: Declare exit as extern "C".
From-SVN: r85592
2004-08-05 05:31:30 +00:00
Joseph Myers 852910694f c-common.c (c_stddef_cpp_builtins): Define __INTMAX_TYPE__ and __UINTMAX_TYPE__.
* c-common.c (c_stddef_cpp_builtins): Define __INTMAX_TYPE__ and
	__UINTMAX_TYPE__.
	* c-cppbuiltin.c (builtin_define_stdint_macros): New.  Define
	__INTMAX_MAX__.
	(c_cpp_builtins): Call it.
	* doc/cpp.texi: Update.

testsuite:
	* gcc.c-torture/execute/builtins/abs-2.c,
	gcc.c-torture/execute/builtins/abs-3.c,
	gcc.c-torture/execute/builtins/lib/abs.c, gcc.dg/format/format.h,
	gcc.dg/torture/builtin-attr-1.c: Use predefined macros for
	intmax_t, uintmax_t and their limits.
	* gcc.dg/intmax_t-1.c: New test.

From-SVN: r85588
2004-08-05 01:38:31 +01:00
Giovanni Bajo f1ff6bb8a9 * g++.dg/tc1/dr147.C: Add reference to PR.
From-SVN: r85581
2004-08-04 23:36:53 +00:00
Mark Mitchell 564076f545 Add missing ChangeLog entry
From-SVN: r85570
2004-08-04 19:32:34 +00:00
Richard Sandiford 54f2f9a648 mips-args-[23].c: Declare abort() and exit().
* gcc.dg/mips-args-[23].c: Declare abort() and exit().
	* gcc.dg/torture/mips-hilo-[12].c: Likewise.

From-SVN: r85567
2004-08-04 19:12:58 +00:00
David Edelsohn b0e9ac0850 * gcc.dg/compat/struct-layout-1.exp: Fix error message typo.
From-SVN: r85538
2004-08-03 21:43:30 -04:00
Joseph Myers 9cbe78fbeb c-decl.c (implicitly_declare): Diagnose incompatible implicit declarations.
* c-decl.c (implicitly_declare): Diagnose incompatible implicit
	declarations.

testsuite:
	* gcc.dg/redecl-5.c: New test.
	* gcc.dg/format/attr-6.c: Expect warning for implicit declaration
	of scanf.

From-SVN: r85509
2004-08-03 23:09:13 +01:00
Roger Sayle a0fac73d2b re PR middle-end/16790 (Integer down cast ignored in larger expression)
PR middle-end/16790
	* fold-const.c (extract_muldiv_1) <NOP_EXPR>: Disallow local
	truncations, not just global truncations.

	* gcc.c-torture/execute/pr16790-1.c: New test case.

From-SVN: r85506
2004-08-03 21:24:32 +00:00
Mark Mitchell 5357b1f9df symbian1.c: New test.
* gcc.dg/symbian1.c: New test.
	* gcc.dg/symbian2.c: Likewise.

From-SVN: r85505
2004-08-03 21:20:36 +00:00
H.J. Lu f6bc51cbc4 re PR target/16570 (missing _mm_malloc and _mm_free functions in xmmintrin.h)
gcc/

2004-08-03  H.J. Lu  <hongjiu.lu@intel.com>

	PR target/16570
	* config.gcc (i[34567]86-*-* | x86_64-*-*): Add i386/t-gmm_malloc
	to tmake_file.
	(i[34567]86-*-linux*aout* | i[34567]86-*-linux*libc1): Likewise.
	(i[34567]86-*-linux* | x86_64-*-linux*): Add i386/t-pmm_malloc
	to tmake_file.

	* config/i386/t-gmm_malloc: New file.
	* config/i386/t-pmm_malloc: Likewise.

	* config/i386/xmmintrin.h: Include <mm_malloc.h>.

2004-08-03  H.J. Lu  <hongjiu.lu@intel.com>
	    Tanguy Fautr�  <tfautre@pandora.be>

	* config/i386/pmm_malloc.h: New file.

2004-08-03  Danny Smith  <dannysmith@users.sourceforge.net>

	* config/i386/gmm_malloc.h: New file.

gcc/testsuite/

2004-08-03  H.J. Lu  <hongjiu.lu@intel.com>

	PR target/16570
	* gcc.dg/i386-sse-9.c: New test.

From-SVN: r85496
2004-08-03 12:52:52 -07:00
Joseph Myers 7a1f75f1b7 * gcc.dg/array-7.c, gcc.dg/c99-tag-2.c: New tests.
From-SVN: r85479
2004-08-03 15:19:39 +01:00
Joseph Myers ee712eab15 20001023-1.c, [...]: Declare built-in functions used.
* gcc.dg/20001023-1.c, gcc.dg/20001108-1.c, gcc.dg/20001117-1.c,
	gcc.dg/20010202-1.c, gcc.dg/20011008-2.c, gcc.dg/20011214-1.c,
	gcc.dg/20020201-1.c, gcc.dg/20020312-2.c, gcc.dg/20020426-2.c,
	gcc.dg/20030331-2.c, gcc.dg/20030612-1.c, gcc.dg/20030926-1.c,
	gcc.dg/20031216-1.c, gcc.dg/20031218-3.c, gcc.dg/20040305-2.c,
	gcc.dg/980226-1.c, gcc.dg/Wreturn-type2.c,
	gcc.dg/Wunreachable-6.c, gcc.dg/Wunreachable-7.c,
	gcc.dg/align-1.c, gcc.dg/builtin-prefetch-1.c,
	gcc.dg/builtins-17.c, gcc.dg/builtins-19.c, gcc.dg/builtins-2.c,
	gcc.dg/builtins-20.c, gcc.dg/builtins-21.c, gcc.dg/builtins-7.c,
	gcc.dg/builtins-8.c, gcc.dg/cpp/19930510-1.c,
	gcc.dg/cpp/charconst-3.c, gcc.dg/cpp/charconst-4.c,
	gcc.dg/cpp/mi6.c, gcc.dg/cpp/tr-paste.c, gcc.dg/cpp/trad/mi6.c,
	gcc.dg/cpp/trad/paste.c, gcc.dg/cpp/trad/strify.c,
	gcc.dg/fastmath-1.c, gcc.dg/fshort-wchar.c, gcc.dg/i386-387-7.c,
	gcc.dg/i386-387-8.c, gcc.dg/i386-asm-1.c, gcc.dg/i386-cadd.c,
	gcc.dg/i386-fpcvt-3.c, gcc.dg/i386-loop-3.c,
	gcc.dg/i386-memset-1.c, gcc.dg/loop-2.c, gcc.dg/nest.c,
	gcc.dg/noncompile/971104-1.c, gcc.dg/noncompile/990416-1.c,
	gcc.dg/noncompile/scope.c, gcc.dg/pack-test-4.c,
	gcc.dg/pack-test-5.c, gcc.dg/pch/inline-4.c, gcc.dg/postincr-1.c,
	gcc.dg/pr10392-1.c, gcc.dg/pragma-align.c,
	gcc.dg/profile-generate-1.c, gcc.dg/sibcall-1.c,
	gcc.dg/sibcall-2.c, gcc.dg/sibcall-3.c, gcc.dg/sibcall-4.c,
	gcc.dg/sibcall-5.c, gcc.dg/sibcall-6.c, gcc.dg/switch-warn-1.c,
	gcc.dg/switch-warn-2.c, gcc.dg/torture/builtin-attr-1.c,
	gcc.dg/torture/builtin-math-1.c, gcc.dg/torture/builtin-noret-2.c,
	gcc.dg/trampoline-1.c, gcc.dg/tree-ssa/20030703-1.c,
	gcc.dg/tree-ssa/20030703-2.c, gcc.dg/tree-ssa/20030708-1.c,
	gcc.dg/tree-ssa/20030709-3.c, gcc.dg/tree-ssa/20030710-1.c,
	gcc.dg/tree-ssa/20030711-1.c, gcc.dg/tree-ssa/20030729-1.c,
	gcc.dg/tree-ssa/20030730-1.c, gcc.dg/tree-ssa/20030730-2.c,
	gcc.dg/tree-ssa/20030731-1.c, gcc.dg/tree-ssa/20030807-11.c,
	gcc.dg/tree-ssa/20030807-2.c, gcc.dg/tree-ssa/20030807-5.c,
	gcc.dg/tree-ssa/20030807-7.c, gcc.dg/tree-ssa/20030808-1.c,
	gcc.dg/tree-ssa/20030814-1.c, gcc.dg/tree-ssa/20030814-2.c,
	gcc.dg/tree-ssa/20030814-3.c, gcc.dg/tree-ssa/20030814-4.c,
	gcc.dg/tree-ssa/20030814-5.c, gcc.dg/tree-ssa/20030814-6.c,
	gcc.dg/tree-ssa/20030814-7.c, gcc.dg/tree-ssa/20030815-1.c,
	gcc.dg/tree-ssa/20030907-1.c, gcc.dg/tree-ssa/20030917-3.c,
	gcc.dg/tree-ssa/20030922-1.c, gcc.dg/tree-ssa/20031113-1.c,
	gcc.dg/tree-ssa/20040121-1.c, gcc.dg/tree-ssa/20040319-1.c,
	gcc.dg/tree-ssa/20040324-1.c, gcc.dg/tree-ssa/20040326-1.c,
	gcc.dg/tree-ssa/20040326-2.c, gcc.dg/tree-ssa/20040517-1.c,
	gcc.dg/tree-ssa/ssa-ccp-10.c, gcc.dg/tree-ssa/ssa-pre-1.c,
	gcc.dg/tree-ssa/tailcall-1.c, gcc.dg/tree-ssa/tailrecursion-5.c,
	gcc.dg/ultrasp3.c, gcc.dg/winline-7.c, gcc.misc-tests/bprob-1.c,
	gcc.misc-tests/bprob-2.c, gcc.misc-tests/gcov-3.c,
	gcc.misc-tests/gcov-4.c, gcc.misc-tests/gcov-4b.c,
	gcc.misc-tests/gcov-6.c, gcc.misc-tests/gcov-7.c,
	gcc.misc-tests/i386-pf-3dnow-1.c,
	gcc.misc-tests/i386-pf-athlon-1.c,
	gcc.misc-tests/i386-pf-none-1.c, gcc.misc-tests/i386-pf-sse-1.c,
	objc.dg/nested-func-1.m, objc.dg/special/unclaimed-category-1.m:
	Declare built-in functions used.
	* gcc.dg/torture/builtin-attr-1.c (nexttoward): Use FPTEST2ARG2.

From-SVN: r85465
2004-08-03 09:22:26 +01:00
Mark Mitchell 7756db0375 re PR c++/16707 (ICE with using)
PR c++/16707
	* name-lookup.c (validate_nonmember_using_decl): Robustify.

	PR c++/16707
	* g++.dg/lookup/using12.C: New test.

From-SVN: r85446
2004-08-02 18:49:07 +00:00
Mark Mitchell 6ed7c4d857 null1.C: Fix PR number.
* g++.dg/init/null1.C: Fix PR number.
	* g++.dg/parse/namespace10.C: Likewise.

From-SVN: r85444
2004-08-02 18:35:28 +00:00
Mark Mitchell b1cc95ce4c re PR c++/16224 (internal compiler error: in write_unscoped_name (template/namespace))
PR c++/16224
	* name-lookup.c (decl_namespace): Remove.
	(current_decl_namespace): Use decl_namespace_context instead of
	decl_namespace.
	(push_decl_namespace): Likewise.
	(arg_assoc_class): Likewise.
	(arg_assoc_type): Likewise.
	* pt.c (check_specialization_namespace): New function.
	(maybe_process_partial_specialization): Use it.
	(register_specialization): Likewise.

	PR c++/16224
	* g++.dg/template/spec17.C: New test.
	* g++.old-deja/g++.ns/template13.C: Remove XFAIL.
	* g++.old-deja/g++.pt/lookup10.C: Add dg-error marker.

From-SVN: r85431
2004-08-02 06:25:36 +00:00
David Billinghurst db059566fa 2004-08-02 David Billinghurst
PR fortran/16292
	* gfortran.dg/g77/cabs.f: xfail on mips-sgi-irix6*

From-SVN: r85429
2004-08-02 06:00:55 +00:00
Zack Weinberg 1f09d3eb5c ia64.c (got_symbolic_operand): Do require a symbol+offset operand to have its offset be zero mod 0x3fff when...
* config/ia64/ia64.c (got_symbolic_operand): Do require a
	symbol+offset operand to have its offset be zero mod 0x3fff
	when GOT entries are in use.  Clarify logic in SYMBOL_REF
	case.  Clarify comments.
	(ia64_expand_load_address): Split a symbol+offset load when
	the offset is nonzero mod 0x3fff, not 0x1fff.
testsuite:
	* gcc.dg/ia64-got-1.c: New test case.

From-SVN: r85426
2004-08-02 03:23:01 +00:00
Mark Mitchell 72fba2df33 Fix typos in ChangeLog.
From-SVN: r85425
2004-08-02 02:04:46 +00:00
Mark Mitchell c30b4add62 re PR c++/16338 (ICE when throwing a compound literal)
PR c++/16338
	* cp-tree.h (DECL_INTEGRAL_CONSTANT_VAR_P): New macro.
	* call.c (null_ptr_cst_p): Handle variables with constant
	initializers.
	* pt.c (convert_nontype_argument): Use
	DECL_INTEGRAL_CONSTANT_VAR_P.
	* semantics.c (finish_id_expression): Likewise.

	PR c++~/16489
	* decl.c (duplicate_decls): Reject duplicate namespace
	declarations.

	PR c++/16810
	* typeck.c (build_ptrmemfunc): Loosen assertion.

	PR c++/16338
	* g++.dg/init/null1.C: New test.
	* g++.dg/tc1/dr76.C: Adjust error marker.

	PR c++/16489
	* g++.dg/parse/namespace10.C: New test.

	PR c++/16810
	* g++.dg/inherit/ptrmem2.C: New test.

From-SVN: r85421
2004-08-02 01:58:52 +00:00
Ben Elliston a4e41fdeec Patch for PR target/16155.
2004-08-02  Ben Elliston  <bje@au.ibm.com>

	PR target/16155
	* config/rs6000/altivec.h: Replace typeof with __typeof__.

[testsuite]
2004-08-02  Ben Elliston  <bje@au.ibm.com>

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

From-SVN: r85418
2004-08-02 11:05:47 +10:00
Joseph Myers 558d1f815d c-decl.c (diagnose_mismatched_decls): Give error for external redeclaration of identifier declared with no linkage...
* c-decl.c (diagnose_mismatched_decls): Give error for external
	redeclaration of identifier declared with no linkage, not just
	warning with -Wtraditional.  Do not check DECL_CONTEXT to give
	error for redeclaration with no linkage.

testsuite:
	* gcc.dg/redecl-2.c: New test.

From-SVN: r85386
2004-07-31 18:21:27 +01:00
Geoffrey Keating c1e55850cf rs6000.c (legitimate_lo_sum_address_p): Permit non-offsettable addresses even for DImode.
2004-07-30  Geoffrey Keating  <geoffk@apple.com>

	* config/rs6000/rs6000.c (legitimate_lo_sum_address_p): Permit
	non-offsettable addresses even for DImode.
	(rs6000_split_multireg_move): Cope with non-offsettable addresses
	being moved into multiple GPRs.

	* config/rs6000/rs6000.c (RS6000_DEFAULT_LONG_DOUBLE_SIZE): Default
	to 64.
	(rs6000_override_options): Use RS6000_DEFAULT_LONG_DOUBLE_SIZE.
	* config/rs6000/darwin.h (RS6000_DEFAULT_LONG_DOUBLE_SIZE): Define
	to 128.
	* config/rs6000/darwin-ldouble.c (isless): New macro.
	(inf): New macro.
	(nonfinite): New macro.
	(FPKINF): Delete.
	(_xlqadd): Completely rewrite.
	(_xlqmul): Correct overflow handling.
	(_xlqdiv): Correct overflow handling.
	* config/rs6000/darwin-ldouble-format: New file.

Index: testsuite/ChangeLog
2004-07-30  Geoffrey Keating  <geoffk@apple.com>

	* gcc.dg/darwin-longdouble.c: New file.

From-SVN: r85371
2004-07-31 01:40:18 +00:00
Richard Henderson 0534fa5652 gimplify.c (gimplify_expr): Don't replace with DECL_INITIAL if fb_lvalue.
* gimplify.c (gimplify_expr) <case CONST_DECL>: Don't replace
        with DECL_INITIAL if fb_lvalue.
        * tree-gimple.c (is_gimple_id): Add CONST_DECL.
        * tree-pretty-print.c (dump_decl_name): Dump unnamed CONST_DECL
        with <Cxxx>.
        * tree-ssa-ccp.c (maybe_fold_stmt_indirect): Fold CONST_DECL.
fortran/
        * trans-expr.c (gfc_conv_expr_reference): Create a CONST_DECL
        for TREE_CONSTANTs.
testsuite/
        * gfortran.fortran-torture/execute/intrinsic_rrspacing.f90: Fix
        write to constant argument.
        * gfortran.fortran-torture/execute/intrinsic_scale.f90: Likewise.

From-SVN: r85365
2004-07-30 15:55:30 -07:00
Richard Henderson 782700d4f2 intrinsic_nearest.f90: Disable tests of nearest around zero.
* gfortran.fortran-torture/execute/intrinsic_nearest.f90: Disable
        tests of nearest around zero.

From-SVN: r85361
2004-07-30 15:31:20 -07:00
Andrew Pinski d60bebdd50 20040730-1.c: New test.
2004-07-30  Andrew Pinski  <apinski@apple.com>

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

From-SVN: r85360
2004-07-30 15:01:59 -07:00
Aldy Hernandez 9497a3a471 vmx.exp: Explain why we skip tests for powerpc-eabispe.
* gcc.dg/vmx/vmx.exp: Explain why we skip tests for
	powerpc-eabispe.

From-SVN: r85346
2004-07-30 18:37:03 +00:00
Aldy Hernandez 0a925a32e2 * gcc.dg/vmx/vmx.exp: Disable tests for eabispe.
From-SVN: r85331
2004-07-30 13:51:12 +00:00
Richard Sandiford 3a15f566e9 g++.exp (g++_link_flags): Check whether LD_LIBRARY_PATH already contains $ld_library_path.
* lib/g++.exp (g++_link_flags): Check whether LD_LIBRARY_PATH already
	contains $ld_library_path.
	* lib/gfortran.exp (gfortran_link_flags): Likewise.

From-SVN: r85329
2004-07-30 10:34:12 +00:00
Richard Henderson 4b9a3b371b stmtexpr2.C (alt1): Rename from expected.
* g++.dg/ext/stmtexpr2.C (alt1): Rename from expected.
        (alt2, which): New.
        (Check): Accept either alternative.

From-SVN: r85313
2004-07-29 11:35:54 -07:00
Richard Henderson b3b7f0c9df * g++.dg/template/sizeof8.C: Don't assume 32bit pointers.
From-SVN: r85312
2004-07-29 11:32:08 -07:00
Mark Mitchell 4684cd27fc c-common.h (lang_post_pch_load): New variable.
* c-common.h (lang_post_pch_load): New variable.
	* c-pch.c (lang_post_pch_load): Define it.
	(c_common_read_pch): Use it.
	* cgraphunit.c (record_call_1): Give the front end a chance to
	record additional needed entities when a variable is marked as
	needed.
	* tlink.c (recompile_files): Robustify.
	(scan_linker_output): If a symbol is assigned to a file,
	but after recompilation is not present there, issue an error
	message.

	* cp-tree.h (IDENTIFIER_REPO_CHOSEN): Define.
	(lang_decl_flags): Narrow the width of "languages".  Add
	repo_available_p.
	(DECL_NEEDED_P): Remove.
	(FOR_EACH_CLONE): New macro.
	(DECL_REPO_AVAILABLE_P): Likewise.
	(DECL_TINFO_P): Likewise.
	(set_linkage_according_to_type): Declare.
	(import_export_vtable): Remove.
	(import_export_tinfo): Likewise.
	(mark_needed): New function.
	(decl_needed_p): Likewise.
	(note_vauge_linkage_fn): Likewise.
	(init_repo): Change prototype.
	(repo_template_used): Remove.
	(repo_template_instantiated): Likewise.
	(repo_emit_p): New function.
	(repo_export_class_p): Likewise.
	(no_linkage_check): Change prototype.
	* class.c (set_linkage_according_to_type): New function.
	(build_vtable): Use it.  Do not call import_export_vtable.  Set
	DECL_IGNORED_P if appropriate.
	* decl.c (duplicate_decls): Preserve DECL_REPO_AVAILABLE_P.
	(make_rtL_for_nonlocal_decls): Check for template instantiations
	explicitly.
	(grokfndecl): Adjust call to no_linkage_check.
	(set_linkage_for_static_data_member): New function.
	(grokvardecl): Use it.  Adjust call to no_linkage_check.
	(grokdeclarator): Use set_linkage_for_static_data_member.
	* decl2.c (note_vague_linkage_fn): New function.
	(note_vague_linkage_var): Likewise.
	(finish_static_data_member_decl): Use it.
	(import_export_vtable): Remove.
	(import_export_class): Use repo_export_class_p.
	(var_finalized_p): Simplify.
	(maybe_emit_vtables): Simplify.
	(mark_needed): New function.
	(decl_needed_p): Likewise.
	(import_export_decl): Add documentation and consistency checks.
	Use repo_emit_p.  Handle virtual tables and RTTI information
	here.
	(import_export_tinfo): Remove.
	(write_out_vars): Call import_export_decl.
	(cxx_callgraph_analyze_expr): Ensure that all vtables are emitted
	whenever one is.
	(finish_file): Use decl_needed_p.  Do not call import_export_decl
	for undefined static data members.  Do not warn about undefined
	inlines when using a repository.
	(mark_used): Use note_vague_linkage_fn.  Always defer template
	instantiations.
	* lex.c (cxx_init): Adjust call to init_repo.  Always set
	flag_unit_at_a-time.
	* method.c (synthesize_method): Remove unncessary
	import_export_decl call.
	(implicitly_declare_fn): Use set_linkage_according_to_type.
	* optimize.c (maybe_clone_body): Use FOR_EACH_CLONE.
	* pt.c (instantiate_class_template): Don't redundantly add classes
	to keyed_classes.  Don't call repo_template_used.
	(tsubst_decl): Set DECL_INTERFACE_KNOWN for instantiations of
	templates with internal linkage.
	(check_instantiated_args): Adjust call to no_linkage_check.
	(instantiate_template): Use FOR_EACH_CLONE.
	(mark_definable): New function.
	(mark_decl_instantiated): Use it.
	(do_decl_instantiation): Adjust tests for explicit instantiation
	after "extern template".
	(instantiate_class_member): Do not use repo_template_instantiated.
	(do_type_instantiation): Simplify.
	(instantiate_decl): Use mark_definable.  Check repo_emit_p.
	Simplify.
	* repo.c (repo_get_id): Remove.
	(original_repo): Remove.
	(IDENTIFIER_REPO_USED): Remove.
	(IDENTIFIER_REPO_CHOSEN): Remove.
	Remove all #if 0'd code.
	(repo_template_used): Remove.
	(repo_template_instantiated): Remove.
	(temporary_obstack_initialized_p): New variable.
	(init_repo): Register with lang_post_pch_load.  Avoid creating
	identifiers unnecessarily.  Don't use original_repo.  Close the
	file here.
	(reopen_repo_file_for_write): Not here.
	(finish_repo): Always write out a new repository file.
	(repo_emit_p): New function.
	(repo_export_class_p): Likewise.
	* rtti.c (get_tinfo_decl): Use set_linkage_according_to_type.
	(involves_incomplete_p): New function.
	(tinfo_base_init): Use it.
	(ptr_initializer): Remove non_public_ptr parameter.
	(ptm_initializer): Likewise.
	(get_pseudo_ti_init): Likewise.
	(unemitted_tinfo_decl_p): Remove.
	(emit_tinfo_decl): Use import_export_decl.
	* semantics.c (expand_body): Move updates of static_ctors and
	static_dtors to ...
	(expand_or_defer_fn): ... here.
	* tree.c (no_linkage_check): Add relaxed_p parameter.

	* g++.dg/abi/inline1.C: New test.
	* g++.dg/abi/local1-a.cc: Likewise.
	* g++.dg/abi/local1.C: Likewise.
	* g++.dg/abi/mangle11.C: Tweak location of warnings.
	* g++.dg/abi/mangle12.C: Likewise.
	* g++.dg/abi/mangle17.C: Likewise.
	* g++.dg/abi/mangle20-2.C: Likewise.
	* g++.dg/opt/interface1.C: Likewise.
	* g++.dg/opt/interface1.h: Likewise.
	* g++.dg/opt/interface1-a.cc: New test.
	* g++.dg/parse/repo1.C: New test.
	* g++.dg/template/repo1.C: Likewise.
	* g++.dg/warn/Winline-1.C: Likewise.
	* lib/gcc-dg.exp (gcc-dg-test-1): Fix -frepo handling.

From-SVN: r85309
2004-07-29 17:59:31 +00:00
Diego Novillo d397dbcd99 tree-ssa-operands.c (get_expr_operands): Revert changes to ADDR_EXPR processing introduced by...
* tree-ssa-operands.c (get_expr_operands): Revert changes
	to ADDR_EXPR processing introduced by:
	    2004-06-21  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
	    * tree-ssa-operands.c (get_expr_operands): Minor rearrangements.

testsuite/ChangeLog

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

From-SVN: r85306
2004-07-29 13:15:38 -04:00