89261 Commits

Author SHA1 Message Date
Jose Ruiz
2bb767155a errno.c (__get_errno, [...]): Transform then into weak symbols so we use the version provided by MaRTE when...
2008-08-20  Jose Ruiz  <ruiz@adacore.com>

	* errno.c (__get_errno, __set_errno for MaRTE): Transform then into
	weak symbols so we use the version provided by MaRTE when available.

From-SVN: r139332
2008-08-20 18:12:17 +02:00
Vincent Celier
2dd8670af1 2008-08-20 Vincent Celier <celier@adacore.com>
* ali.adb:
	(Scan_ALI): Use Name_Find, not Name_Enter to get the name of a subunit,
	as the name may already have been entered in the table by the Project
	Manager.

From-SVN: r139331
2008-08-20 18:11:55 +02:00
Vincent Celier
bda3bc77ba make.adb (Gnatmake): Remove extra space in version line
2008-08-20  Vincent Celier  <celier@adacore.com>

	* make.adb (Gnatmake): Remove extra space in version line

From-SVN: r139330
2008-08-20 18:11:44 +02:00
Manuel López-Ibáñez
9c591bd084 re PR c/35701 (Quieten -Wconversion warnings)
2008-08-20  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>

	PR 35701
	* c-common.c (conversion_warning): Do not warn if applying bit-and
	operator to unsigned constant that fits in the target type.
	
testsuite/
	* gcc.dg/pr35701.c: New.
	* gcc.dg/Wconversion-real-integer.c: Add more tests.
	* gcc.dg/Wconversion-pr34389.c: Update.
	* g++.dg/warn/Wconversion-pr34389.C: Update.

From-SVN: r139329
2008-08-20 16:09:45 +00:00
Manuel López-Ibáñez
0011dedbd9 re PR c++/35602 (Bogus warning with -Wsign-conversion)
2008-08-20  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>

	PR c++/35602
	* c-common.c (conversion_warning): Do not warn for artificial
	expressions.
testsuite/
	* g++.dg/warn/pr35602.C: New.

From-SVN: r139328
2008-08-20 16:05:58 +00:00
Richard Guenther
73019a428f tree-vrp.c (op_with_constant_singleton_value_range): New function.
2008-08-20  Richard Guenther  <rguenther@suse.de>

	* tree-vrp.c (op_with_constant_singleton_value_range): New function.
	(extract_range_from_binary_expr): Fall back to constant propagation.
	(extract_range_from_unary_expr): Likewise.

	* gcc.dg/tree-ssa/pr21829.c: Scan optimized and cddce2 dumps
	instead of phicprop2.  Make sure all is fine after cddce2,
	add an XFAILed scan for merging the two remaining ifs.

From-SVN: r139326
2008-08-20 16:01:59 +00:00
Richard Guenther
e2104f59c4 tree-ssa-ccp.c (maybe_fold_stmt_indirect): Do not mess with TREE_THIS_VOLATILE on shared nodes.
2008-08-20  Richard Guenther  <rguenther@suse.de>

	* tree-ssa-ccp.c (maybe_fold_stmt_indirect): Do not mess
	with TREE_THIS_VOLATILE on shared nodes.
	(fold_stmt_r): Likewise.

	* gcc.c-torture/compile/20080820-1.c: New testcase.

From-SVN: r139325
2008-08-20 15:58:47 +00:00
Robert Dewar
5e5dc75a3e 2008-08-20 Robert Dewar <dewar@adacore.com>
* sem_ch13.adb:
	(Adjust_Record_For_Reverse_Bit_Order): Do not access First_Bit for
	non-existing component clause.

From-SVN: r139323
2008-08-20 17:51:37 +02:00
Robert Dewar
db58b50218 stylesw.ads: Minor reformatting
2008-08-20  Robert Dewar  <dewar@adacore.com>

	* stylesw.ads: Minor reformatting

From-SVN: r139322
2008-08-20 17:51:15 +02:00
Robert Dewar
52470e97d5 make.adb: Minor reformatting
2008-08-20  Robert Dewar  <dewar@adacore.com>

	* make.adb: Minor reformatting

From-SVN: r139321
2008-08-20 17:51:02 +02:00
Robert Dewar
d9f3a59383 g-comlin.adb: Minor reformatting
2008-08-20  Robert Dewar  <dewar@adacore.com>

	* g-comlin.adb: Minor reformatting

From-SVN: r139320
2008-08-20 17:50:52 +02:00
Robert Dewar
76871f97eb g-comlin.adb: Minor reformatting
2008-08-20  Robert Dewar  <dewar@adacore.com>

	* g-comlin.adb: Minor reformatting

From-SVN: r139319
2008-08-20 17:50:40 +02:00
Robert Dewar
dfe8dac3de exp_ch5.adb: Minor reformatting
2008-08-20  Robert Dewar  <dewar@adacore.com>

	* exp_ch5.adb: Minor reformatting

From-SVN: r139318
2008-08-20 17:50:31 +02:00
Jakub Jelinek
5dc4a7f44c re PR c/37171 (Canonical spelling optimization dependency)
PR c/37171
	* c-parser.c (c_parser_attributes): For keywords use canonical
	spelling for attr_name.

	* gcc.dg/pr37171.c: New test.
	* g++.dg/ext/attrib34.C: New test.

From-SVN: r139317
2008-08-20 17:50:23 +02:00
Arnaud Charlet
235f4375ba styleg-c.ads, [...] (Missing_Overriding): new procedure to implement style check that overriding operations are...
2008-08-20  Ed Schonberg  <schonberg@adacore.com>

	* styleg-c.ads, styleg-c.adb (Missing_Overriding): new procedure to
	implement style check that overriding operations are explicitly marked
	at such.

	* style.ads (Missing_Overriding): new procedure that provides interface
	to previous one.

	* stylesw.ads, stylesw.adb: New style switch -gnatyO, to enable check
	that the declaration or body of overriding operations carries an
	explicit overriding indicator.

	* sem_ch8.adb
	(Analyze_Subprogram_Renaming): if operation is overriding, check whether
	explicit indicator should be present.

	* sem_ch6.adb (Verify_Overriding_Indicator,
	Check_Overriding_Indicator): If operation is overriding, check whether
	declaration and/or body of subprogram should be present

From-SVN: r139316
2008-08-20 17:43:11 +02:00
Vincent Celier
54e0346134 make.adb (Gnatmake_Switch_Found): New Boolean global variable
2008-08-20  Vincent Celier  <celier@adacore.com>

	* make.adb (Gnatmake_Switch_Found): New Boolean global variable
	(Switch_May_Be_Passed_To_The_Compiler): New Boolean global variable
	(Add_Switches): New Boolean parameter Unknown_Switches_To_The_Compiler
	 defaulted to True. Fail when Unknown_Switches_To_The_Compiler is False
	and a switch is not recognized by gnatmake.
	(Gnatmake): Implement new scheme for gnatmake switches and global
	compilation switches.
	(Switches_Of): Try successively Switches (<file name>),
	Switches ("Ada"), Switches (others) and Default_Switches ("Ada").

From-SVN: r139315
2008-08-20 17:42:52 +02:00
Arnaud Charlet
7486d8e0c8 g-comlin.adb (For_Each_Simple_Switch): Take care of switches not part of any alias or prefix but having attached...
2008-08-20  Jerome Lambourg  <lambourg@adacore.com>

	* g-comlin.adb (For_Each_Simple_Switch): Take care of switches not part
	of any alias or prefix but having attached parameters (as \"-O2\").

From-SVN: r139314
2008-08-20 17:30:04 +02:00
Gary Dismukes
26a29f015c exp_ch3.adb (Build_Array_Init_Proc): Clarify comment related to creating dummy init proc.
2008-08-20  Gary Dismukes  <dismukes@adacore.com>

	* exp_ch3.adb (Build_Array_Init_Proc): Clarify comment related to
	creating dummy init proc.
	(Requires_Init_Proc): Return False in the case No_Default_Initialization
	is in force and the type does not have associated default
	initialization. Move test of Is_Public (with tests of restrictions
	No_Initialize_Scalars and No_Default_Initialization) to end, past tests
	for default initialization.

From-SVN: r139313
2008-08-20 17:29:44 +02:00
Vincent Celier
aa2fca8f34 prj-nmsc.adb (Check_Naming_Schemes): Accept source file names for gprbuild when casing is MixedCase...
2008-08-20  Vincent Celier  <celier@adacore.com>

	* prj-nmsc.adb (Check_Naming_Schemes): Accept source file names for
	gprbuild when casing is MixedCase, whatever the casing of the letters
	in the file name.

From-SVN: r139312
2008-08-20 17:29:33 +02:00
Arnaud Charlet
c92d77212d * gnat.dg/div_no_warning.adb: New test.
From-SVN: r139311
2008-08-20 17:02:41 +02:00
Arnaud Charlet
fe5dbc2c76 s-os_lib.ads: Minor reformatting.
2008-08-20  Pascal Obry  <obry@adacore.com>

	* s-os_lib.ads: Minor reformatting.

From-SVN: r139310
2008-08-20 16:29:06 +02:00
Vincent Celier
1af8deae35 prj-nmsc.adb (Check_File): An excluded Ada source file may be a source of another project.
2008-08-20  Vincent Celier  <celier@adacore.com>

	* prj-nmsc.adb (Check_File): An excluded Ada source file may be a
	source of another project.

From-SVN: r139309
2008-08-20 16:28:36 +02:00
Thomas Quinot
3f92549e47 freeze.adb: Minor reformatting
2008-08-20  Thomas Quinot  <quinot@adacore.com>

	* freeze.adb: Minor reformatting

From-SVN: r139308
2008-08-20 16:28:26 +02:00
Thomas Quinot
5b3a33c3ed g-comlin.adb: Minor reformatting Minor code reorganization.
2008-08-20  Thomas Quinot  <quinot@adacore.com>

	* g-comlin.adb: Minor reformatting
	Minor code reorganization.

From-SVN: r139307
2008-08-20 16:28:17 +02:00
Ed Schonberg
c3db4df1cb sem_util.adb (Set_Debug_Info_Needed): If the entity is a private type and the full view is visible...
2008-08-20  Ed Schonberg  <schonberg@adacore.com>

	* sem_util.adb (Set_Debug_Info_Needed): If the entity is a private type
	and the full view is visible, set flag on full view as well.

From-SVN: r139306
2008-08-20 16:28:08 +02:00
Hristian Kirtchev
3ad80e57f8 exp_ch5.adb (Controlled_Type): New routine.
2008-08-20  Hristian Kirtchev  <kirtchev@adacore.com>

	* exp_ch5.adb (Controlled_Type): New routine.
	(Expand_N_Extended_Return_Statement): When generating a move of the
	final list in extended return statements, check the type of the
	function and in the case of double expanded return statements, the type
	of the returned object.
	(Expand_Simple_Function_Return): Perform an interface conversion when
	the type of the returned object is an interface and the context is an
	extended return statement.

From-SVN: r139305
2008-08-20 16:27:59 +02:00
Bob Duff
deff3e5e46 exp_ch4.adb (Expand_N_And_Then, [...]): Improve constant folding.
2008-08-20  Bob Duff  <duff@adacore.com>

	* exp_ch4.adb (Expand_N_And_Then, Expand_N_Or_Else): Improve constant
	folding. We were folding things like "False and then ...", but not
	"X and then ..." where X is a constant whose value is known at compile
	time.

From-SVN: r139304
2008-08-20 16:27:50 +02:00
Bob Duff
ffafb51e7f sem_eval.ads: Minor comment fix.
2008-08-20  Bob Duff  <duff@adacore.com>

	* sem_eval.ads: Minor comment fix.

From-SVN: r139303
2008-08-20 16:27:39 +02:00
Ed Schonberg
87b1e52f8c einfo.ads: Add comment.
2008-08-20  Ed Schonberg  <schonberg@adacore.com>

	* einfo.ads: Add comment.

From-SVN: r139302
2008-08-20 16:27:30 +02:00
Ed Schonberg
bb83ec2f5c sem_prag.adb: (Analyze_Pragma...
2008-08-20  Ed Schonberg  <schonberg@adacore.com>

	* sem_prag.adb:
	(Analyze_Pragma, case Obsolescent): Add entity information on the pragma
	argument for ASIS and navigation use.

From-SVN: r139301
2008-08-20 16:27:21 +02:00
Vincent Celier
d42ec90cbc prj-proc.adb (Process_Declarative_Items): Add Location for Array_Data
2008-08-20  Vincent Celier  <celier@adacore.com>

	* prj-proc.adb (Process_Declarative_Items): Add Location for Array_Data

	* prj.ads (Array_Data): Add a component Location

From-SVN: r139300
2008-08-20 16:27:11 +02:00
Thomas Quinot
c0193e6ff2 exp_strm.adb (Build_Elementary_Input_Call, [...]): Fix incorrect condition in circuitry that selects the stream attribute routines...
2008-08-20  Thomas Quinot  <quinot@adacore.com>

	* exp_strm.adb (Build_Elementary_Input_Call,
	Build_Elementary_Write_Call): Fix incorrect condition in circuitry that
	selects the stream attribute routines for long float types.

From-SVN: r139299
2008-08-20 16:27:01 +02:00
Robert Dewar
b9ccd71083 s-fileio.adb: Minor reformatting
2008-08-20  Robert Dewar  <dewar@adacore.com>

	* s-fileio.adb: Minor reformatting

From-SVN: r139298
2008-08-20 16:26:52 +02:00
Arnaud Charlet
c4075a1512 Minor reforamatting.
From-SVN: r139297
2008-08-20 15:58:12 +02:00
Arnaud Charlet
0dd8a0b1bc Fix copyright notice.
From-SVN: r139296
2008-08-20 15:55:20 +02:00
Manuel López-Ibáñez
d3d28d264b value-prof.c (check_counter): Revert wrong call to error.
2008-08-20  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>

	* value-prof.c (check_counter): Revert wrong call to error.

From-SVN: r139295
2008-08-20 13:55:12 +00:00
Manuel López-Ibáñez
5b6148c5b5 profile.c: Update calls to inform.
2008-08-20  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>

	* profile.c: Update calls to inform.
	* value-prof.c: Update calls to inform.

From-SVN: r139294
2008-08-20 13:50:26 +00:00
Manuel López-Ibáñez
1f5b386928 diagnostic.c (inform): Add an explicit location_t parameter.
2008-08-18  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>

	* diagnostic.c (inform): Add an explicit location_t parameter.
	* toplev.h (inform): Update declaration.
	* builtins.c: Update all calls to inform.
	* c-common.c: Likewise.
	* c-decl.c: Likewise.
	* c-opts.c: Likewise.
	* c-pch.c: Likewise.
	* c-pragma.c: Likewise.
	* c-typeck.c: Likewise.
	* coverage.c: Likewise.
	* opts.c: Likewise.
	* toplev.c: Likewise.
	* tree-cfg.c: Likewise.
	* tree-ssa.c: Likewise.
cp/	
	* parser.c: Update all calls to inform.
	* typeck.c: Likewise.
	* init.c: Likewise.
	* class.c: Likewise.
	* call.c: Likewise.
	* method.c: Likewise.
	* friend.c: Likewise.
	* typeck2.c: Likewise.
	* pt.c: Likewise.
	* name-lookup.c: Likewise.
	* lex.c: Likewise.

From-SVN: r139293
2008-08-20 13:35:00 +00:00
Arnaud Charlet
f4857d6e2a * g-comlin.ads: Update comments. Add new paramter Add_Before.
From-SVN: r139292
2008-08-20 15:28:58 +02:00
Arnaud Charlet
8b4261b382 2008-08-20 Gary Dismukes <dismukes@adacore.com>
* exp_ch11.adb:
	(Expand_Exception_Handlers): Call Make_Exception_Handler instead of
	Make_Implicit_Exception_Handler when rewriting an exception handler with
	a choice parameter, and pass the handler's Sloc instead of that of the
	handled sequence of statements. Make_Implicit_Exception_Handler sets the
	Sloc to No_Location (unless debugging generated code), which we don't
	want for the case of a user handler.

From-SVN: r139291
2008-08-20 15:24:40 +02:00
Ed Schonberg
b2c4d56de2 sem_ch8.adb (Analyze_Subprogram_Renaming): Inherit Is_Imported flag.
2008-08-20  Ed Schonberg  <schonberg@adacore.com>

	* sem_ch8.adb (Analyze_Subprogram_Renaming): Inherit Is_Imported flag.

From-SVN: r139290
2008-08-20 15:24:25 +02:00
H.J. Lu
89da39ee52 re PR target/37169 (Inefficent code for _mm_cvtsi64_si128)
gcc/

2008-08-20  H.J. Lu  <hongjiu.lu@intel.com>

	PR target/37169
	* config/i386/i386.c (ix86_expand_vector_init_one_nonzero): In
	V2DI mode, for SSE4.1, use movq instead of vector set if the
	second element is zero and inter-unit moves are OK.

gcc/testsuite/

2008-08-20  H.J. Lu  <hongjiu.lu@intel.com>

	PR target/37169
	* i386/sse2-init-v2di-2.c: New.

From-SVN: r139289
2008-08-20 06:22:30 -07:00
Richard Guenther
4fedf870f5 tree-ssa-forwprop.c (forward_propagate_addr_expr_1): More properly handle conversion/copy chains after tuplification.
2008-08-20  Richard Guenther  <rguenther@suse.de>

	* tree-ssa-forwprop.c (forward_propagate_addr_expr_1): More
	properly handle conversion/copy chains after tuplification.

	* gcc.dg/tree-ssa/forwprop-9.c: Scan FRE dump as well.
	* gcc.dg/tree-ssa/forwprop-10.c: New testcase.

From-SVN: r139288
2008-08-20 13:21:41 +00:00
Arnaud Charlet
c6084ae031 freeze.adb (Freeze_Record_Type): Improve msg for non-contiguous field
2008-08-20  Robert Dewar  <dewar@adacore.com>

	* freeze.adb (Freeze_Record_Type): Improve msg for non-contiguous field
	
	* sem_ch13.adb:
	(Adjust_Record_For_Reverse_Bit_Order): Messages about layout are
	now labeled as info msgs, not warnings.

From-SVN: r139287
2008-08-20 15:15:11 +02:00
Richard Guenther
e2081a1d5d passes.c (init_optimization_passes): Move the second forwprop pass before alias computation.
2008-08-20  Richard Guenther  <rguenther@suse.de>

	* passes.c (init_optimization_passes): Move the second
	forwprop pass before alias computation.  Remove the second
	DCE pass.  Remove the first dominator and phi copy/const
	prop passes.

	* gcc.dg/tree-ssa/20030530-2.c: Scan dom2 dump.
	* gcc.dg/tree-ssa/20030611-1.c: Likewise.
	* gcc.dg/tree-ssa/20030703-1.c: Likewise.
	* gcc.dg/tree-ssa/20030703-2.c: Likewise.
	* gcc.dg/tree-ssa/20030708-1.c: Likewise.
	* gcc.dg/tree-ssa/20030709-3.c: Likewise.
	* gcc.dg/tree-ssa/20030710-1.c: Likewise.
	* gcc.dg/tree-ssa/20030711-1.c: Likewise.
	* gcc.dg/tree-ssa/20030711-2.c: Likewise.
	* gcc.dg/tree-ssa/20030711-3.c: Likewise.
	* gcc.dg/tree-ssa/20030714-1.c: Likewise.
	* gcc.dg/tree-ssa/20030714-2.c: Likewise.
	* gcc.dg/tree-ssa/20030729-1.c: Likewise.
	* gcc.dg/tree-ssa/20030730-1.c: Likewise.
	* gcc.dg/tree-ssa/20030730-2.c: Likewise.
	* gcc.dg/tree-ssa/20030731-1.c: Likewise.
	* gcc.dg/tree-ssa/20030807-1.c: Likewise.
	* gcc.dg/tree-ssa/20030807-11.c: Likewise.
	* gcc.dg/tree-ssa/20030807-2.c: Likewise.
	* gcc.dg/tree-ssa/20030807-3.c: Likewise.
	* gcc.dg/tree-ssa/20030807-5.c: Likewise.
	* gcc.dg/tree-ssa/20030807-8.c: Likewise.
	* gcc.dg/tree-ssa/20030807-9.c: Likewise.
	* gcc.dg/tree-ssa/20030814-1.c: Likewise.
	* gcc.dg/tree-ssa/20030814-2.c: Likewise.
	* gcc.dg/tree-ssa/20030814-3.c: Likewise.
	* gcc.dg/tree-ssa/20030814-4.c: Likewise.
	* gcc.dg/tree-ssa/20030814-5.c: Likewise.
	* gcc.dg/tree-ssa/20030814-6.c: Likewise.
	* gcc.dg/tree-ssa/20030814-7.c: Likewise.
	* gcc.dg/tree-ssa/20030922-1.c: Likewise.
	* gcc.dg/tree-ssa/20040729-1.c: Likewise.
	* gcc.dg/tree-ssa/20041122-1.c: Likewise.
	* gcc.dg/tree-ssa/pr21417.c: Likewise.
	* gcc.dg/tree-ssa/pr21829.c: Scan phicprop2 dump.
	* gcc.dg/tree-ssa/ssa-dce-1.c: Scan dce2 dump.
	* gcc.dg/tree-ssa/ssa-dce-2.c: Likewise.
	* g++.dg/tree-ssa/pr31146.C: Remove XFAIL, adjust pattern.
	* gfortran.dg/ldist-1.f90: Adjust.

From-SVN: r139286
2008-08-20 12:59:10 +00:00
Tristan Gingold
34afead0f1 gnat_ugn.texi: Gcov is not supported on static library on AIX.
2008-08-20  Tristan Gingold  <gingold@adacore.com>

	* gnat_ugn.texi: Gcov is not supported on static library on AIX.

From-SVN: r139285
2008-08-20 14:39:11 +02:00
Jose Ruiz
a0005b2e7b errno.c (__get_errno for MaRTE): Use the MaRTE function pthread_errno to get access to the per-task errno variable.
2008-08-20  Jose Ruiz  <ruiz@adacore.com>

	* errno.c (__get_errno for MaRTE): Use the MaRTE function pthread_errno
	to get access to the per-task errno variable.
	(__set_errno for MaRTE): Do not redefine this function here since it is
	already defined in MaRTE.

From-SVN: r139284
2008-08-20 14:36:24 +02:00
Thomas Quinot
d3b1401d07 2008-08-20 Thomas Quinot <quinot@adacore.com>
* s-fileio.adb (Open) Use C helper function to determine whether a
	given errno value corresponds to a "file not found" error.

	* sysdep.c (__gnat_is_file_not_found_error): New C helper function.

From-SVN: r139283
2008-08-20 14:35:11 +02:00
Robert Dewar
d045b07645 a-ztexio.adb: Minor code reorganization Remove redundant test found working on another issue
2008-08-20  Robert Dewar  <dewar@adacore.com>

	* a-ztexio.adb: Minor code reorganization
	Remove redundant test found working on another issue

From-SVN: r139282
2008-08-20 14:34:46 +02:00
Robert Dewar
830f9af82a a-witeio.adb: Minor code reorganization Remove redundant test found working on another issue
2008-08-20  Robert Dewar  <dewar@adacore.com>

	* a-witeio.adb: Minor code reorganization
	Remove redundant test found working on another issue

From-SVN: r139281
2008-08-20 14:34:09 +02:00