89482 Commits

Author SHA1 Message Date
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
Arnaud Charlet
0d4aed994f exp_attr.adb (Expand_N_Attribute_Reference): In case of access attributes add missing support to handle designated types...
2008-08-22  Javier Miranda  <miranda@adacore.com>

	* exp_attr.adb (Expand_N_Attribute_Reference): In case of access
	attributes add missing support to handle designated types that come
	from the limited view.

	* exp_disp.adb (Expand_Interface_Conversion): Remove wrong assertion.

From-SVN: r139432
2008-08-22 11:03:53 +02:00
Sergey Rybin
b66cb57268 vms_data.ads: Add entry for new gnatcheck -mNNN option
2008-08-22  Sergey Rybin  <rybin@adacore.com>

	* vms_data.ads: Add entry for new gnatcheck -mNNN option

	* gnat_ugn.texi: Add description for gnatcheck option '-m'

From-SVN: r139431
2008-08-22 11:03:30 +02:00
Ed Schonberg
3ea52b2e24 sem_ch8.adb (Use_One_Type): when checking which of two use_type clauses in related units is redundant...
2008-08-22  Ed Schonberg  <schonberg@adacore.com>

	* sem_ch8.adb (Use_One_Type): when checking which of two use_type
	clauses in related units is redundant, if one of the units is a package
	instantiation, use its instance_spec to determine which unit is the
	ancestor of the other.

From-SVN: r139430
2008-08-22 11:03:16 +02:00
Arnaud Charlet
5d41bf558b make.adb (Check.File_Not_A_Source_Of): New Boolean function
2008-08-22  Vincent Celier  <celier@adacore.com>

	* make.adb (Check.File_Not_A_Source_Of): New Boolean function
	(Check): Check if the file names registered in the ALI file for the
	spec, the body and each of the subunits are the ones expected.

From-SVN: r139429
2008-08-22 10:54:46 +02:00
Robert Dewar
2147ba0cd9 g-catiio.adb: Code cleanup.
2008-08-22  Robert Dewar  <dewar@adacore.com>

	* g-catiio.adb: Code cleanup.

From-SVN: r139428
2008-08-22 10:54:14 +02:00
Sergey Rybin
846f6f7a24 gnat_ugn.texi: Update the gnatcheck subsection for metric rules acoording to the latest...
2008-08-22  Sergey Rybin  <rybin@adacore.com>

	* gnat_ugn.texi: Update the gnatcheck subsection for metric rules
	acoording to the latest changes in the metric rule interface

From-SVN: r139427
2008-08-22 10:54:05 +02:00
Nathan Sidwell
1a456b49be * c-ppoutput.c (init_pp_output): Initialize src_line to 1.
From-SVN: r139426
2008-08-22 08:51:32 +00:00
Daniel Kraft
f37e928ca4 re PR fortran/32095 (Accepts invalid character(len(a)),dimension(1) :: a)
2008-08-22  Daniel Kraft  <d@domob.eu>

	PR fortran/32095
	PR fortran/34228
	* gfortran.h (in_prefix): New global.
	(gfc_check_symbol_typed), (gfc_check_expr_typed): New methods.
	* array.c (match_array_element_spec): Check that bounds-expressions
	don't have symbols not-yet-typed in them.
	* decl.c (var_element): Check that variable used is already typed.
	(char_len_param_value): Check that expression does not contain
	not-yet-typed symbols.
	(in_prefix): New global.
	(gfc_match_prefix): Record using `in_prefix' if we're at the moment
	parsing a prefix or not.
	* expr.c (gfc_expr_check_typed): New method.
	* parse.c (verify_st_order): New argument to disable error output.
	(check_function_result_typed): New helper method.
	(parse_spec): Check that the function-result declaration, if given in
	a prefix, contains no not-yet-typed symbols when the IMPLICIT rules are
	parsed.
	* symbol.c (gfc_check_symbol_typed): Check that a symbol already has
	a type associated to it, otherwise use the IMPLICIT rules or signal
	an error.

2008-08-22  Daniel Kraft  <d@domob.eu>

	PR fortran/32095
	PR fortran/34228
	* gfortran.dg/used_before_typed_1.f90: New test.
	* gfortran.dg/used_before_typed_2.f90: New test.
	* gfortran.dg/used_before_typed_3.f90: New test.
	* gfortran.dg/array_constructor_26.f03: Add -std=gnu to not enable
	legacy-behaviour for the new check.
	* gfortran.dg/array_constructor_27.f03: Ditto.
	* gfortran.dg/blockdata_4.f90: Ditto.
	* gfortran.dg/bound_2.f90: Reordered declarations to satisfy the check.
	* gfortran.dg/result_in_spec_1.f90: Ditto.
	* gfortran.dg/argument_checking_7.f90: Adapted expected error messages.

From-SVN: r139425
2008-08-22 09:13:25 +02:00
GCC Administrator
6b7387327a Daily bump.
From-SVN: r139421
2008-08-22 00:16:37 +00:00
Richard Henderson
042628f9bc configure.ac (HAVE_GAS_CFI_PERSONALITY_DIRECTIVE): Remove spurrious comma from test.
* configure.ac (HAVE_GAS_CFI_PERSONALITY_DIRECTIVE): Remove
        spurrious comma from test.
        * configure: Rebuild.

From-SVN: r139408
2008-08-21 12:31:02 -07:00
Manuel López-Ibáñez
2985f531b7 re PR c/30457 (Please warn about va_start(ap, invalid))
2008-08-21  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>

	PR 30457
	* builtins.c (fold_builtin_next_arg): Add warning about undefined
	behaviour.
testsuite/
	* gcc.dg/pr30457.c: New.

From-SVN: r139406
2008-08-21 19:05:46 +00:00
Aldy Hernandez
3d10ed6cbc c-tree.h (grokfield): New argument.
* c-tree.h (grokfield): New argument.
        * c-decl.c (grokfield): Handle new location argument.
        * c-parser.c (c_parser_struct_declaration): Pass location to
        grokfield.
testsuite/
        * gcc.dg/20011008-1.c: Test column.
        * gcc.dg/20080820.c: New.
        * gcc.dg/fltconst-1.c: Test column.
        * gcc.dg/cpp/cpp.exp: Add -fno-show-column.
        * gcc.dg/cpp/trad/trad.exp: Same.
        * lib/gcc.exp (gcc_target_compile): Remove -fno-show-column.
        * lib/gcc-dg.exp (process-message): Handle columns.

From-SVN: r139403
2008-08-21 17:50:01 +00:00
Sebastian Redl
eb5712c966 eh_ptr.cc (__gxx_dependent_exception_cleanup): Call __cxa_free_dependent_exception.
2008-08-21  Sebastian Redl <sebastian.redl@getdesigned.at>

	* libsupc++/eh_ptr.cc (__gxx_dependent_exception_cleanup): Call
	__cxa_free_dependent_exception.

From-SVN: r139402
2008-08-21 17:37:23 +00:00
Joseph Myers
406f353887 anchor1.C (foo): Return the return value of ycf->ascent.
* g++.dg/opt/anchor1.C (foo): Return the return value of
	ycf->ascent.

From-SVN: r139399
2008-08-21 17:32:38 +01:00
Richard Guenther
c76a1f1838 tree-ssa-ccp.c (ccp_fold): Fold VIEW_CONVERT_EXPRs of constants.
2008-08-21  Richard Guenther  <rguenther@suse.de>

	* tree-ssa-ccp.c (ccp_fold): Fold VIEW_CONVERT_EXPRs of constants.

	* gcc.dg/vect/vect-fold-1.c: Scan ccp1 dump instead of dom1.

From-SVN: r139398
2008-08-21 16:15:08 +00:00
David Daney
c7c6340790 class.c (make_class_data): Don't add field_index when flag_reduced_reflection set.
2008-08-21  David Daney  <ddaney@avtrex.com>

	* class.c (make_class_data): Don't add field_index when
	flag_reduced_reflection set.

From-SVN: r139397
2008-08-21 16:08:26 +00:00
Nathan Froyd
d9b14b120c Fix ChangeLog typo
From-SVN: r139394
2008-08-21 15:45:37 +00:00