2006-02-17 Ramon Fernandez <fernandez@adacore.com>
Thomas Quinot <quinot@adacore.com>
Robert Dewar <dewar@adacore.com>
Javier Miranda <miranda@adacore.com>
* expander.adb: Fix typo in comment
* exp_pakd.adb: Fix typo
Minor comment reformatting.
* g-dyntab.adb: Minor reformatting
* exp_ch6.adb (Register_Interface_DT_Entry): Traverse the list of
aliased subprograms to look for the abstract interface subprogram.
From-SVN: r111199
2006-02-17 Robert Dewar <dewar@adacore.com>
* s-wchcnv.adb: Document handling of [ on output (we do not change
this to ["5B"] and the new comments say why not.
* gnat_ugn.texi:
Add note for -gnatVo that this now includes the cases of type
conversions and qualified expressions.
Add comments on handling of brackets encoding for Text_IO
From-SVN: r111198
2006-02-17 Matthew Heaney <heaney@adacore.com>
* a-convec.ads, a-convec.adb:
(operator "&"): handle potential overflow for large index types
(Insert): removed Contraint_Error when using large index types
(Insert_Space): removed Constraint_Error for large index types
(Length): moved constraint check from Length to Insert
* a-coinve.ads, a-coinve.adb: Stream attribute procedures are declared
as not null access.
Explicit raise statements now include an exception message.
(operator "&"): handle potential overflow for large index types
(Insert): removed Contraint_Error when using large index types
(Insert_Space): removed Constraint_Error for large index types
(Length): moved constraint check from Length to Insert
From-SVN: r111197
2006-02-17 Javier Miranda <miranda@adacore.com>
* sem_res.adb (Resolve_Type_Conversion): In case of conversion to an
abstract interface type, the static analysis is not enough to know if
the interface is implemented or not by the source tagged type. Hence
we must pass the work to the expander to generate the required code to
evaluate the conversion at run-time.
(Resolve_Equality_Op): Do not apply previous
transformation if expansion is disasbled, to prevent anomalies when
locating global references in a generic unit.
From-SVN: r111195
2006-02-17 Ed Schonberg <schonberg@adacore.com>
* sem_ch6.adb (Build_Body_To_Inline): Enforce the rule that in order
to inline a function that returns an unconstrained type, the return
expression must be the first variable declared in the body of the
function.
From-SVN: r111194
2006-02-17 Javier Miranda <miranda@adacore.com>
Ed Schonberg <schonberg@adacore.com>
* sem_ch3.adb (Build_Discriminated_Subtype): In case of concurrent
type we cannot inherit the primitive operations; we inherit the
Corresponding_Record_Type (which has the list of primitive operations).
(Check_Anonymous_Access_Types): When creating anonymous access types for
access components, use Rewrite in order to preserve the tree structure,
for ASIS use.
(Analyze_Object_Declaration): For limited types with access
discriminants with defaults initialized by an aggregate, obtain
subtype from aggregate as for other mutable types.
(Derived_Type_Declaration): If the derived type is a limited interface,
set the corresponding flag (Is_Limited_Record is not sufficient).
From-SVN: r111193
2006-02-17 Ed Schonberg <schonberg@adacore.com>
* sem_ch12.adb (Analyze_Package_Instantiation): Inline_Now is false if
the current instance is nested within another instance in a child unit.
From-SVN: r111192
2006-02-17 Ed Schonberg <schonberg@adacore.com>
* sem_ch10.adb (Analyze_With_Clause): If the unit is a subprogram
instantiation, the corresponding entity is the related_instance of the
wrapper package created for the instance.
From-SVN: r111191
2006-02-17 Vasiliy Fofanov <fofanov@adacore.com>
* Makefile.in: Use VMS64 specialized versions of several units in
Interfaces.C hierarchy to be compatible with HP C default size choices.
Use the default version of Ada.Synchronous_Task_Control for VxWorks 653.
From-SVN: r111190
2006-02-17 Vasiliy Fofanov <fofanov@adacore.com>
* init.c (facility_resignal_table): new array
(__gnat_default_resignal_p): enhance default predicate to resignal if
VMS condition has one of the predefined facility codes.
From-SVN: r111189
2006-02-17 Robert Dewar <dewar@adacore.com>
* g-os_lib.adb (Copy_File): Make sure that if From has an Invalid_FD,
then we close To if it is valid.
From-SVN: r111188
2006-02-17 Ed Schonberg <schonberg@adacore.com>
* freeze.adb (Statically_Discriminated_Components): Return false if
the bounds of the type of the discriminant are not static expressions.
* sem_aggr.adb (Check_Static_Discriminated_Subtype): Return false if
the bounds of the discriminant type are not static.
From-SVN: r111187
2006-02-17 Ed Schonberg <schonberg@adacore.com>
* exp_dbug.adb (Debug_Renaming_Declaration): Indicate that the entity
must be materialized when the renamed expression is an explicit
dereference.
From-SVN: r111186
2006-02-17 Javier Miranda <miranda@adacore.com>
Robert Dewar <dewar@adacore.com>
* exp_ch4.adb (Expand_N_Allocator): If the allocated object is accessed
through an access to class-wide interface we force the displacement of
the pointer to the allocated object to reference the corresponding
secondary dispatch table.
(Expand_N_Op_Divide): Allow 64 bit divisions by small power of 2,
if Long_Shifts are supported on the target, even if 64 bit divides
are not supported (configurable run time mode).
(Expand_N_Type_Conversion): Do validity check if validity checks on
operands are enabled.
(Expand_N_Qualified_Expression): Do validity check if validity checks
on operands are enabled.
From-SVN: r111185
2006-02-17 Jose Ruiz <ruiz@adacore.com>
* s-taprop-irix.adb, s-taprop-hpux-dce.adb, s-taprop-linux.adb,
s-taprop-solaris.adb, s-taprop-vms.adb, s-taprop-mingw.adb,
s-taprop-posix.adb, s-taprop-vxworks.adb, s-taprop-lynxos.adb,
s-taprop-tru64.adb (Set_False, Set_True, Suspend_Until_True): Add
Abort_Defer/Undefer pairs to avoid the possibility of a task being
aborted while owning a lock.
From-SVN: r111184
2006-02-17 Eric Botcazou <botcazou@adacore.com>
PR ada/26315
* utils2.c (find_common_type): If both input types are BLKmode and
have the same constant size, keep using the first one.
* bindgen.adb: (Gen_Versions_Ada): Revert previous workaround.
* decl.c (gnat_to_gnu_entity): Only check TREE_OVERFLOW for a constant.
* misc.c (gnat_handle_option): New case for -Woverlength-strings.
From-SVN: r111183
2006-02-17 Ed Schonberg <schonberg@adacore.com>
* sem_ch4.adb (Find_Boolean_Types): If one of the operands is an
aggregate, check the interpretations of the other operand to find one
that may be a boolean array.
(Analyze_Selected_Component): Fix flow-of-control typo in case where
the prefix is a private extension.
From-SVN: r111182
2006-02-16 Andrew Haley <aph@redhat.com>
* stacktrace.cc (GetStackTraceElements): Call
gnu::gcj::runtime::NameFinder::removeUnknown() to determine if
non-Java frames should be removed from a printed stack trace.
Pass methodName to getLineNumberForFrame().
(getLineNumberForFrame): Set method_name from info.dli_sname.
* gnu/gcj/runtime/NameFinder.java (removeUnknown): New method.
(remove_unknown): New variable.
* include/java-stack.h (_Jv_StackTrace::getLineNumberForFrame):
Add methodName arg.
From-SVN: r111181
2006-02-17 Paolo Carlini <pcarlini@suse.de>
Howard Hinnant <hhinnant@apple.com>
PR libstdc++/26250
* include/bits/sstream.tcc (basic_stringbuf<>::overflow): Tweak
to leave epgtr() just past the new write position, as per the
relevant bits of 27.7.1.3/8 (not changed by DR 432).
* testsuite/27_io/basic_stringbuf/overflow/char/26250.cc: New.
* testsuite/27_io/basic_stringbuf/overflow/wchar_t/26250.cc: Same.
* docs/html/ext/howto.html: Add entries for DR 169 and DR 432.
* include/std/std_sstream.h (basic_stringbuf<>::_M_sync): Move out
of line...
* include/bits/sstream.tcc: ... here.
Co-Authored-By: Howard Hinnant <hhinnant@apple.com>
From-SVN: r111177
* tree-vrp.c (set_value_range_to_nonnegative): New function.
(vrp_expr_computes_nonnegative, ssa_name_nonnegative_p): Likewise.
(ssa_name_nonzero_p): Likewise.
(get_value_range): Return NULL if VRP is not running.
(extract_range_from_expr): Fallback to tree_expr_XXX_p if
VRP routines do not discover a range.
(vrp_finalize): Clear VR_VALUE to indicate VRP is not running.
* tree.h (ssa_name_nonzero_p, ssa_name_nonnegative_p): Prototype.
* fold-const.c (tree_expr_nonzero_p): For SSA_NAMEs, query VRP.
(tree_expr_nonnegative_p): Similarly.
* tree-ssa-dom.c (nonzero_vars, nonzero_vars_stack): Remove.
(restore_nonzero_vars_to_original_value): Remove.
(unsafe_associative_fp_binop): Remove.
(tree_ssa_dominator_optimize): Remove initialization and
finalization of nonzero_vars and nonzero_vars_stack.
(dom_opt_initialize_block): No longer push marker on
nonzero_vars_stack.
(dom_opt_finalize_block): No longer call
restore_nonzero_vars_to_original_value.
(record_equivalences_from_phis): No longer look for
nonzero PHI arguments.
(cprop_into_successor_phis): No longer propagate nonzero
property into PHI arguments. Lose unused argument. Caller
updated.
(record_equivalences_from_stmt): No longer record nonzero
values for SSA_NAMEs.
(lookup_avail_expr): No longer use nonzero_vars.
* gcc.dg/tree-ssa/vrp24.c: Update expected output.
* gcc.dg/tree-ssa/vrp26.c: New test.
From-SVN: r111175
2006-02-16 Denis Nagorny <denis_nagorny@linux.intel.com>
PR rtl-optimization/25603
* reload.c (reg_inc_found_and_valid_p): New. Check REG_INC note.
(regno_clobbered_p): Use it. Reusing SETS argument for REG_INC case.
* reload1.c (choose_reload_regs): Added call of regno_clobbered_p
with new meaning of SETS.
From-SVN: r111162
2006-02-16 Andreas Tobler <a.tobler@schweiz.ch>
* testsuite/libffi.call/nested_struct2.c: Remove ffi_type_mylong
definition.
* testsuite/libffi.call/ffitest.h: Add ffi_type_mylong definition
here to be used by other test cases too.
* testsuite/libffi.call/nested_struct10.c: New test case.
* testsuite/libffi.call/nested_struct9.c: Likewise.
* testsuite/libffi.call/nested_struct8.c: Likewise.
* testsuite/libffi.call/nested_struct7.c: Likewise.
* testsuite/libffi.call/nested_struct6.c: Likewise.
* testsuite/libffi.call/nested_struct5.c: Likewise.
* testsuite/libffi.call/nested_struct4.c: Likewise.
From-SVN: r111151
2005-02-16 Paul Thomas <pault@gcc.gnu.org>
PR fortran/24557
* trans-expr.c (gfc_add_interface_mapping): Use the actual argument
for character(*) arrays, rather than casting to the type and kind
parameters of the formal argument.
2005-02-16 Paul Thomas <pault@gcc.gnu.org>
PR fortran/24557
* gfortran.dg/assumed_charlen_needed_1.f90: New test.
From-SVN: r111130
PR rtl-optimization/25636
* local-alloc.c (update_equiv_regs): Lose a bogus rtx_equal_p test
when deciding whether an insn is an initializing insn.
From-SVN: r111129