Commit Graph

89449 Commits

Author SHA1 Message Date
Anatoly Sokolov d3dd4dbd1d re PR target/11259 ([avr] gcc Double 'andi' missed optimization)
PR target/11259
	* config/avr/avr.md (UNSPEC_SWAP): New constants.
	(*swap): New insn pattern.
	(*ashlqi3): Rename from ashlqi3 insn pattern.
	(ashlqi3): New expanders.
	(*lshrqi3): Rename from lshrqi3 insn pattern.
	(lshrqi3): New expanders.	
	(ashlqi3_const4, ashlqi3_const5, ashlqi3_const6, lshrqi3_const4,
	lshrqi3_const5, lshrqi3_const6): New splitters.
	(andi, ashlqi3_l_const4, ashlqi3_l_const5, ashlqi3_l_const6,
	lshrqi3_l_const4, lshrqi3_l_const5, lshrqi3_l_const6): Define
	peephole2 patterns.

From-SVN: r139502
2008-08-23 01:24:56 +04:00
Richard Guenther 36159cf857 re PR middle-end/37078 (ICE in set_value_range, at tree-vrp.c:401 when compiling gmp 4.2.3)
2008-08-22  Richard Guenther  <rguenther@suse.de>

	PR tree-optimization/37078
	* tree-vrp.c (extract_range_from_unary_expr): Avoid generating
	[+INF, +INF] ranges.

	* gcc.c-torture/compile/pr37078.c: New testcase.

From-SVN: r139501
2008-08-22 21:13:00 +00:00
Richard Guenther d3cbd7deea re PR tree-optimization/37143 (ICE in VRP with the auto-vectorizer)
2008-08-22  Richard Guenther  <rguenther@suse.de>

	PR tree-optimization/37143
	* tree-vect-transform.c (vect_create_cond_for_align_checks): Build
	a conversion statement instead of a copy.

	* g++.dg/vect/pr37143.C: New testcase.

From-SVN: r139500
2008-08-22 21:11:48 +00:00
Daniel Kraft fee3292b14 re PR fortran/30239 (duplicate data type assignment not detected)
2008-08-22  Daniel Kraft  <d@domob.eu>

	PR fortran/30239
	* symbol.c (gfc_add_type): Warn on -Wsurprising if a function-result
	type is re-declared but neither -pedantic nor -std=f* is given and so
	this is no error.
	* invoke.texi (-Wsurprising): Document this new behaviour.

From-SVN: r139499
2008-08-22 22:36:12 +02:00
Paolo Carlini 9b410dd0ec 2008-08-22 Paolo Carlini <paolo.carlini@oracle.com>
Revert again the N2179 patch.

From-SVN: r139497
2008-08-22 18:59:41 +00:00
Uros Bizjak 05cce88cbf pr21658.c (dg-options): Use -fdump-tree-ccp1-details.
* gcc.dg/tree-ssa/pr21658.c (dg-options): Use -fdump-tree-ccp1-details.
	(dg-final): Use cleanup-tree-dump "ccp1".
	* gcc.dg/tree-prof/ic-misattribution-1a.c: Cleanup tree_profile.
	* gcc.dg/ipa/iinline-1.c: Cleanup ipa dump, not tree dump.
	* g++.dg/ipa/iinline-1.C: Ditto.
	* gfortran.dg/intrinsic_std_1.f90: Cleanup "original" tree dump.
	* gfortran.dg/char_eoshift_5.f90: Ditto.
	* gfortran.dg/index_2.f90: Ditto.

From-SVN: r139496
2008-08-22 20:10:21 +02:00
Andrew Haley ee3cea07f0 Fix PR#.
2008-08-22  Andrew Haley  <aph@redhat.com>

        PR libgcj/8995:

        * interpret-run.cc (REWRITE_INSN): Null this macro.

        * include/jvm.h (class _Jv_Linker): Declare resolve_mutex, init.
        (read_cpool_entry, write_cpool_entry): New functions.
        * link.cc (_Jv_Linker::resolve_mutex): new.
        (_Jv_Linker::init): New function.
        (_Jv_Linker::resolve_pool_entry): Use {read,write}_cpool_entry
        to ensure atomic access to constant pool entries.

From-SVN: r139493
2008-08-22 16:17:19 +00:00
Andrew Haley e4493315fc re PR libgcj/8995 (race cases in interpreter)
2008-08-22  Andrew Haley  <aph@redhat.com>

        PR libgcj/8895:

        * interpret-run.cc (REWRITE_INSN): Null this macro.

        * include/jvm.h (class _Jv_Linker): Declare resolve_mutex, init.
        (read_cpool_entry, write_cpool_entry): New functions.
        * link.cc (_Jv_Linker::resolve_mutex): new.
        (_Jv_Linker::init): New function.
        (_Jv_Linker::resolve_pool_entry): Use {read,write}_cpool_entry
        to ensure atomic access to constant pool entries.

From-SVN: r139492
2008-08-22 16:04:29 +00:00
Robert Dewar c9f1fdfe4c Minor code fix to avoid warning.
From-SVN: r139491
2008-08-22 17:47:50 +02:00
Arnaud Charlet 5b2da94828 s-wwdcha.adb: Minor code reorganization Remove dead code
2008-08-22  Robert Dewar  <dewar@adacore.com>

	* s-wwdcha.adb: Minor code reorganization
	Remove dead code

From-SVN: r139490
2008-08-22 17:46:29 +02:00
Robert Dewar f5e811d597 s-utf_32.adb (Get_Category): Fix obvious typo
2008-08-22  Robert Dewar  <dewar@adacore.com>

	* s-utf_32.adb (Get_Category): Fix obvious typo

From-SVN: r139489
2008-08-22 17:46:13 +02:00
Robert Dewar 48afdf8c0d s-sopco4.adb: Minor code fix to avoid warning
2008-08-22  Robert Dewar  <dewar@adacore.com>

	* s-sopco4.adb: Minor code fix to avoid warning

	* s-sopco5.adb: Minor code fix to avoid warning

	* s-strops.adb: Minor code fix to avoid warning

From-SVN: r139488
2008-08-22 17:46:00 +02:00
Arnaud Charlet aec35074d7 lib-xref.ads: Fix typo in subprogram reference definition.
2008-08-22  Arnaud Charlet  <charlet@adacore.com>

	* lib-xref.ads: Fix typo in subprogram reference definition.

From-SVN: r139487
2008-08-22 17:45:45 +02:00
Robert Dewar 6b5352bf15 s-sopco3.adb: Minor code fix to avoid warning
2008-08-22  Robert Dewar  <dewar@adacore.com>

	* s-sopco3.adb: Minor code fix to avoid warning

From-SVN: r139486
2008-08-22 17:45:29 +02:00
Arnaud Charlet 4351c21b9c checks.adb (Determine_Range): Deal with values that might be invalid
2008-08-22  Robert Dewar  <dewar@adacore.com>

	* checks.adb (Determine_Range): Deal with values that might be invalid

	* opt.adb, opt.ads (Assume_No_Invalid_Values[_Config]): New configuration
	switches.

	* par-prag.adb: Dummy entry for pragma Assume_No_Invalid_Values

	* sem_prag.adb: Implement pragma Assume_No_Default_Values

	* snames.adb, snames.ads, snames.h:
	Add entries for pragma Assume_No_Invalid_Values

	* switch-c.adb: Add processing for -gnatB switch

	* usage.adb: Add entry for flag -gnatB (no bad invalid values)

From-SVN: r139484
2008-08-22 17:07:34 +02:00
Javier Miranda 575a1b32b7 exp_ch3.adb (Build_Init_Statements): Transfer to the body of the init procedure all the expanded code associated...
2008-08-22  Javier Miranda  <miranda@adacore.com>

	* exp_ch3.adb (Build_Init_Statements): Transfer to the body of the
	init procedure all the expanded code associated with the spec of
	task types and protected types.

From-SVN: r139483
2008-08-22 17:07:18 +02:00
Arnaud Charlet 2743d81dfb opt.ads: Minor code reorganization (put entries in alpha order)
2008-08-22  Robert Dewar  <dewar@adacore.com>

	* opt.ads: Minor code reorganization (put entries in alpha order)

From-SVN: r139481
2008-08-22 16:56:55 +02:00
Gary Dismukes 9f4e488138 sem_util.adb (Has_Preelaborable_Initialization): Revise checking of private types to allow for types derived from a private type...
2008-08-22  Gary Dismukes  <dismukes@adacore.com>

	* sem_util.adb (Has_Preelaborable_Initialization): Revise checking of
	private types to allow for types derived from a private type with
	preelaborable initialization, but return False for a private extension
	(unless it has the pragma).

From-SVN: r139480
2008-08-22 16:56:32 +02:00
Gary Dismukes 9b4b0a1ac9 exp_aggr.adb (Static_Array_Aggregate): Call Analyze_And_Resolve on the component expression copies rather than...
2008-08-22  Gary Dismukes  <dismukes@adacore.com>

	* exp_aggr.adb (Static_Array_Aggregate): Call Analyze_And_Resolve on the
	component expression copies rather than directly setting Etype and
	Is_Static_Expression.

From-SVN: r139479
2008-08-22 16:56:20 +02:00
Javier Miranda b7cc33a4ce exp_ch3.adb: Revert previous patch.
2008-08-22  Javier Miranda  <miranda@adacore.com>

	* exp_ch3.adb: Revert previous patch.

From-SVN: r139478
2008-08-22 16:55:14 +02:00
Arnaud Charlet a5ad324803 exp_ch3.adb (Build_Init_Statements): Transfer to the body of the init procedure all the expanded code associated...
2008-08-22  Javier Miranda  <miranda@adacore.com>

	* exp_ch3.adb (Build_Init_Statements): Transfer to the body of the
	init procedure all the expanded code associated with the spec of
	task types and protected types.

From-SVN: r139477
2008-08-22 16:38:14 +02:00
Pascal Obry af90c55af0 initialize.c, adaint.c: Use Lock_Task and Unlock_Task for non-blocking spawn.
2008-08-22  Pascal Obry  <obry@adacore.com>

	* initialize.c, adaint.c: Use Lock_Task and Unlock_Task for non-blocking
	spawn.

From-SVN: r139476
2008-08-22 16:37:57 +02:00
Uros Bizjak a3d4a22b01 re PR target/37184 (ice in ix86_match_ccmode)
PR target/37184
        * config/i386/i386.c (ix86_match_ccmode): Handle CCAmode,
        CCCmode, CCOmode and CCSmode destination modes.

        PR target/37191
        * config/i386/mmx.md (*vec_extractv2sf_0): Avoid combining registers
        from different units in a single alternative.
        (*vec_extractv2sf_1): Ditto.
        (*vec_extractv2si_0): Ditto.
        (*vec_extractv2si_1): Ditto.
        * config/i386/sse.md (sse2_storehpd): Ditto.
        (sse2_storelpd): Ditto.
        (sse2_loadhpd): Ditto.
        (sse2_loadlpd): Ditto.

        PR target/37197
        * config/i386/i386.md (clzsi2_abm): Fix operand 1 constraints.
        (popcountsi2): Ditto.
        (clzdi2_abm): Ditto.
        (popcountdi2): Ditto.
        (clzhi2_abm): Ditto.
        (popcounthi2): Ditto.

testsuite/ChangeLog:

        PR target/37184
        * gcc.target/i386/pr37184.c: New test.

        PR target/37191
        * gcc.target/i386/pr37191.c: New test.

        PR target/37197
        * gcc.target/i386/pr37197.c: New test.

From-SVN: r139471
2008-08-22 15:58:52 +02:00
Geert Bosch 6eca32ba8d trans.c: Define FP_ARITH_MAY_WIDEN
2008-08-22  Geert Bosch  <bosch@adacore.com>

	* gcc-interface/trans.c: Define FP_ARITH_MAY_WIDEN
	(convert_with_check): Only use longest_float_type if FP_ARITH_MAY_WIDEN is 0

From-SVN: r139468
2008-08-22 15:29:10 +02:00
Arnaud Charlet 1c7717c3a8 2008-08-22 Robert Dewar <dewar@adacore.com>
* checks.adb:
	(In_Subrange_Of): New calling sequence
	(Determine_Range): Prepare for new processing using base type

	* exp_ch4.adb:
	(Compile_Time_Compare): Use new calling sequence

	* exp_ch5.adb:
	(Compile_Time_Compare): Use new calling sequence

	* sem_eval.adb:
	(Compile_Time_Compare): New calling sequence allows dealing with
	invalid values.
	(In_Subrange_Of): Ditto

	* sem_eval.ads:
	(Compile_Time_Compare): New calling sequence allows dealing with
	invalid values.
	(In_Subrange_Of): Ditto

From-SVN: r139467
2008-08-22 15:27:35 +02:00
Pascal Obry 23922a2f6a adaint.c: Fix possible race condition on win32_wait().
2008-08-22  Pascal Obry  <obry@adacore.com>

	* adaint.c: Fix possible race condition on win32_wait().

From-SVN: r139466
2008-08-22 15:26:38 +02:00
Ed Schonberg fb34edfafa 2008-08-22 Ed Schonberg <schonberg@adacore.com>
* exp_tss.adb:
	(Base_Init_Proc): For a protected subtype, use the base type of the
	corresponding record to locate the propoer initialization procedure.

From-SVN: r139465
2008-08-22 15:26:28 +02:00
Robert Dewar c9626ed6db sem_ch5.adb (One_Bound): Fix latent bug involving secondary stack
2008-08-22  Robert Dewar  <dewar@adacore.com>

	* sem_ch5.adb (One_Bound): Fix latent bug involving secondary stack

From-SVN: r139464
2008-08-22 15:26:19 +02:00
Vincent Celier 4c7ad32065 prj.ads: Minor comment update
2008-08-22  Vincent Celier  <celier@adacore.com>

	* prj.ads: Minor comment update

From-SVN: r139463
2008-08-22 15:26:09 +02:00
Robert Dewar 1db3c07216 exp_dist.adb: Minor reformatting
2008-08-22  Robert Dewar  <dewar@adacore.com>

	* exp_dist.adb: Minor reformatting

From-SVN: r139462
2008-08-22 15:26:00 +02:00
Robert Dewar 77cde6106b exp_ch7.ads: Put routines in proper alpha order
2008-08-22  Robert Dewar  <dewar@adacore.com>

	* exp_ch7.ads: Put routines in proper alpha order

From-SVN: r139461
2008-08-22 15:25:50 +02:00
Robert Dewar c1fd002c16 exp_ch7.adb: Minor reformatting
2008-08-22  Robert Dewar  <dewar@adacore.com>

	* exp_ch7.adb: Minor reformatting

From-SVN: r139460
2008-08-22 15:25:41 +02:00
Robert Dewar 8fb68c5664 exp_ch6.adb: Minor reformatting
2008-08-22  Robert Dewar  <dewar@adacore.com>

	* exp_ch6.adb: Minor reformatting

From-SVN: r139459
2008-08-22 15:25:29 +02:00
Bob Duff b572daf1c8 exp_ch6.ads: Remove pragma Precondition, since it breaks some builds.
2008-08-22  Bob Duff  <duff@adacore.com>

	* exp_ch6.ads: Remove pragma Precondition, since it breaks some builds.

From-SVN: r139458
2008-08-22 15:25:19 +02:00
Ed Schonberg c56094bda7 sem_ch8.adb (Use_One_Type): Do not emit warning message about redundant use_type_clause in an instance.
2008-08-22  Ed Schonberg  <schonberg@adacore.com>

	* sem_ch8.adb (Use_One_Type): Do not emit warning message about redundant
	use_type_clause in an instance.

From-SVN: r139457
2008-08-22 15:25:08 +02:00
Doug Rupp 8b91af8d3c bindgen.adb [VMS] (Gen_Adainit_Ada, [...]): Import and call __gnat_set_features.
2008-08-22  Doug Rupp  <rupp@adacore.com>

	* bindgen.adb [VMS] (Gen_Adainit_Ada, Gen_Adainit_C): Import and call
	__gnat_set_features.

	* init.c
	(__gnat_set_features): New function.
	(__gnat_features_set): New tracking variable.
	(__gl_no_malloc_64): New feature global variable

From-SVN: r139456
2008-08-22 15:24:49 +02:00
Bob Duff 048e5cef65 exp_ch5.adb, [...]: Rename...
2008-08-22  Bob Duff  <duff@adacore.com>

	* exp_ch5.adb, exp_ch7.adb, exp_ch7.ads, exp_util.adb, freeze.adb,
	exp_ch4.adb, exp_ch6.ads, exp_ch6.adb, sem_ch6.adb, exp_aggr.adb,
	exp_intr.adb, exp_ch3.adb: Rename:
	Exp_Ch7.Controlled_Type => Needs_Finalization
	Exp_Ch7.CW_Or_Controlled_Type => CW_Or_Has_Controlled_Part
	Exp_Ch5.Expand_N_Extended_Return_Statement.Controlled_Type =>
	 Has_Controlled_Parts
	(Has_Some_Controlled_Component): Fix bug in array case.

From-SVN: r139452
2008-08-22 14:59:45 +02:00
Richard Guenther beeab17c6e re PR middle-end/36548 (remainder gives the wrong result for wrapping case with unsigned types)
2008-08-22  Richard Guenther  <rguenther@suse.de>

	PR middle-end/36548
	PR middle-end/37125
	* fold-const.c (extract_muldiv_1): Optimize (X * C1) % C2 only
	if the multiplication does not overflow.

	* gcc.c-torture/execute/pr37125.c: New testcase.

From-SVN: r139450
2008-08-22 12:43:49 +00:00
Arnaud Charlet da2f5d14df exp_ch6.ads: Minor comment fix
2008-08-22  Bob Duff  <duff@adacore.com>

	* exp_ch6.ads: Minor comment fix

From-SVN: r139449
2008-08-22 14:42:17 +02:00
Bob Duff 25bb6a4e07 exp_ch7.adb: Minor comment fix
2008-08-22  Bob Duff  <duff@adacore.com>

	* exp_ch7.adb: Minor comment fix

From-SVN: r139448
2008-08-22 14:41:42 +02:00
Ed Schonberg 87cd63ba59 exp_ch5.adb (Expand_Simple_Function_Return): If secondary stack is involved and the return type is class-wide...
2008-08-22  Ed Schonberg  <schonberg@adacore.com>

	* exp_ch5.adb (Expand_Simple_Function_Return): If secondary stack is
	involved and the return type is class-wide, use the type of the expression
	for the generated access type. Suppress useless discriminant checks on the
	allocator.

From-SVN: r139447
2008-08-22 14:41:30 +02:00
Eric Botcazou 116c24a05c init.c: adjust EH support code on Alpha/Tru64 as well.
2008-08-22  Eric Botcazou  <ebotcazou@adacore.com>

	* init.c: adjust EH support code on Alpha/Tru64 as well.

	* raise-gcc.c: Add back a couple of comments.

From-SVN: r139446
2008-08-22 14:41:18 +02:00
Kevin Pouget 0999b54748 s-shasto.ads, [...]: Move Shared_Var_ROpen...
2008-08-22  Kevin Pouget  <pouget@adacore.com>

	* s-shasto.ads, s-shasto.adb: Move Shared_Var_ROpen, Shared_Var_WOpen and
	Shared_Var_Close procedure specifications from package spec to package body.

	* rtsfind.ads: Remove RE_Shared_Var_Close, RE_Shared_Var_ROpen,
	RE_Shared_Var_WOpen entries.

	* exp_dist.adb: Update RE_Any_Content_Ptr to RE_Any_Container_Ptr in
	Build_To_Any_Call, Build_TypeCode_Call and Build_From_Any_Call procedures.

From-SVN: r139445
2008-08-22 14:41:03 +02:00
Robert Dewar 44b901601a sem_ch8.adb: Minor reformatting
2008-08-22  Robert Dewar  <dewar@adacore.com>

	* sem_ch8.adb: Minor reformatting

From-SVN: r139444
2008-08-22 14:40:43 +02:00
Arnaud Charlet 1dcdbfab31 2008-08-22 Robert Dewar <dewar@adacore.com>
* exp_attr.adb:
	(Expand_N_Attribute_Reference): No validity checking on OUT parameter of
	Read or Input attribute.

From-SVN: r139443
2008-08-22 14:13:14 +02:00
Gary Dismukes 597d7158c6 exp_aggr.adb (Static_Array_Aggregate): When a static array aggregate with a range is transformed into a positional...
2008-08-22  Gary Dismukes  <dismukes@adacore.com>

	* exp_aggr.adb (Static_Array_Aggregate): When a static array aggregate
	with a range is transformed into a positional aggregate, any copied
	component literals should be marked Is_Static_Expression.

	* sem_eval.adb (Compile_Time_Known_Value): Don't treat null literals as
	not being known at at compile time when Configurable_Run_Time_Mode is
	true.

From-SVN: r139442
2008-08-22 14:12:04 +02:00
Eric Botcazou 5f0085c780 init.c (__gnat_adjust_context_for_raise): Delete for AIX, HP-UX, Solaris, FreeBSD, VxWorks and PowerPC/Linux.
2008-08-22  Eric Botcazou  <ebotcazou@adacore.com>

	* init.c (__gnat_adjust_context_for_raise): Delete for AIX, HP-UX,
	Solaris, FreeBSD, VxWorks and PowerPC/Linux.  For x86{-64}/Linux,
	do not adjust the PC anymore.
	(__gnat_error_handler): Do not call __gnat_adjust_context_for_raise
	on AIX, HP-UX, Solaris, FreeBSD and VxWorks.

	* raise-gcc.c (get_call_site_action_for): Use _Unwind_GetIPInfo
	instead of _Unwind_GetIP.

From-SVN: r139441
2008-08-22 14:11:31 +02:00
Sergey Rybin f934798c1c gnat_ugn.texi: Change the description of gnatcheck default rule settings.
2008-08-22  Sergey Rybin  <rybin@adacore.com>

	* gnat_ugn.texi: Change the description of gnatcheck default rule
	settings.

From-SVN: r139440
2008-08-22 14:11:03 +02:00
Thomas Quinot 7ca139d388 sem_ch8.adb: Minor reformatting Minor code reorganization (introduce subprogram to factor...
2008-08-22  Thomas Quinot  <quinot@adacore.com>

	* sem_ch8.adb: Minor reformatting
	Minor code reorganization (introduce subprogram to factor duplicated
	code).

From-SVN: r139439
2008-08-22 14:10:38 +02:00
Daniel Kraft 3df684e2a9 gfortran.h (in_prefix): Removed from this header.
2008-08-22  Daniel Kraft  <d@domob.eu>

	* gfortran.h (in_prefix): Removed from this header.
	* match.h (gfc_matching_prefix): Moved and renamed from `in_prefix'.
	* decl.c (in_prefix): Removed from here.
	(gfc_match_prefix): Use new name of `gfc_matching_prefix'.
	* symbol.c (gfc_check_symbol_typed): Ditto.
	* expr.c (check_typed_ns): New helper variable.
	(expr_check_typed_help): New helper method.
	(gfc_expr_check_typed): Rewrote to use gfc_traverse_expr to do the
	work, fixing a minor problem.
	* match.c (gfc_matching_prefix): New variable.

From-SVN: r139435
2008-08-22 12:53:40 +02:00