* io/list_read.c (snprintf): Define if HAVE_SNPRINTF isn't defined.
(nml_read_obj): Add nml_err_msg_size argument. Pass it down to
recursive call. Use snprintf instead of sprintf when %s nl->var_name
is used.
(nml_get_obj_data): Add nml_err_msg_size argument. Pass it down to
nml_read_obj call. Use snprintf instead of sprintf when %s
nl->var_name is used. Pass nml_err_msg to nml_parse_qualifier instead
of parse_err_msg array. Append " for namelist variable " and
nl->var_name to it.
(namelist_read): Increase size of nml_err_msg array to 200. Pass
sizeof nml_err_msg as extra argument to nml_get_obj_data.
* gfortran.dg/namelist_47.f90: New test.
From-SVN: r134132
2008-04-09 Doug Rupp <rupp@adacore.com>
* decl.c (validate_size): Set minimum size for fat pointers same as
access types. Code clean ups.
* gmem.c (xstrdup32): New macro for 32bit dup on VMS, noop otherwise
(__gnat_gmem_a2l_initialize): Dup exename into 32 bit memory on VMS
* s-auxdec-vms_64.ads, s-auxdec.ads (Short_Address_Size): New constant
* s-crtl.ads (malloc32) New function, alias for malloc
(realloc32) New function, alias for realloc
* socket.c (__gnat_new_socket_set): Malloc fd_set in 32 bits on VMS
* utils2.c (build_call_alloc_dealloc): Return call to short malloc if
allocator size is 32 and default pointer size is 64.
(find_common_type): Document assumption on t1/t2 vs lhs/rhs. Force use of
lhs type if smaller, whatever the modes.
* gigi.h (malloc32_decl): New macro definition
* utils.c (init_gigi_decls): New malloc32_decl
Various code clean ups.
* s-asthan-vms-alpha.adb (Process_AST.To_Address): Unchecked convert to
Task_Address vice System.Address.
* s-taspri-vms.ads: Import System.Aux_DEC
(Task_Address): New subtype of System.Aux_DEC.Short_Address
(Task_Address_Size): New constant size of System.Aux_DEC.Short_Address
* s-asthan-vms-alpha.adb (Process_AST.To_Address): Unchecked convert to
Task_Address vice System.Address.
* s-inmaop-vms.adb: Import System.Task_Primitives
(To_Address): Unchecked convert to Task_Address vice System.Address
* s-taprop-vms.adb (Timed_Delay): Always set the timer even if delay
expires now.
(To_Task_ID) Unchecked convert from Task_Adddress vice System.Address
(To_Address) Unchecked convert to Task_Address vice System.Address
* s-tpopde-vms.adb: Remove unnecessary warning pragmas
* g-socthi-vms.ads: Add 32bit size clauses on socket access types.
From-SVN: r134131
2008-04-08 Richard Guenther <rguenther@suse.de>
* fold-const.c (fold_widened_comparison): Do not allow
sign-changes that change the result.
* gcc.c-torture/execute/20080408-1.c: New testcase.
From-SVN: r134108
* gigi.h (standard_datatypes): Add ADT_fdesc_type and ADT_null_fdesc.
(fdesc_type_node): Define.
(null_fdesc_node): Likewise.
* decl.c (gnat_to_gnu_entity) <E_Access_Subprogram_Type>: If the target
uses descriptors for vtables and the type comes from a dispatch table,
return the descriptor type.
* trans.c (Attribute_to_gnu) <Attr_Unrestricted_Access>: If the target
uses descriptors for vtables and the type comes from a dispatch table,
build a descriptor in the static case and copy the existing one in the
non-static case.
(gnat_to_gnu) <N_Null>: If the target uses descriptors for vtables and
the type is a pointer-to-subprogram coming from a dispatch table,
return the null descriptor.
<N_Unchecked_Type_Conversion>: If the target uses descriptors for
vtables, the source type is the descriptor type and the target type
is a pointer type, first build the pointer.
* utils.c (init_gigi_decls): If the target uses descriptors for vtables
build the descriptor type and the null descriptor.
From-SVN: r134101
2008-04-07 Peter Bergner <bergner@vnet.ibm.com>
PR middle-end/PR28690
* rtlanal.c: (commutative_operand_precedence): Give SYMBOL_REF's the
same precedence as REG_POINTER and MEM_POINTER operands.
From-SVN: r134095
* ada-tree.h (TYPE_PACKED_ARRAY_TYPE_P): Only set it when bit-packed.
* decl.c (gnat_to_gnu_entity): Adjust for above change.
<E_Record_Type>: Try to get a better form of the component for
packing, even if it has an integral mode.
<E_Record_Subtype>: Likewise.
* trans.c (gnat_to_gnu): Do not require BLKmode for the special
exception suppressing the final conversion between record types.
Co-Authored-By: Richard Kenner <kenner@adacore.com>
From-SVN: r134093
* decl.c (gnat_to_gnu_entity) <object>: If -gnatd.a and not optimizing
alignment for space, promote the alignment of non-scalar variables with
no size and alignment.
* gigi.h (gnat_types_compatible_p): Declare.
* misc.c (LANG_HOOKS_TYPES_COMPATIBLE_P): Set to above predicate.
* trans.c (gnat_to_gnu): Revert revision 129339 change. Minor cleanup.
* utils.c (gnat_types_compatible_p) : New predicate.
(convert): Use it throughout to test for cases where a mere view
conversion is sufficient.
* utils2.c (build_binary_op): Minor tweaks.
(build_unary_op): Likewise.
From-SVN: r134092
2008-04-08 Richard Guenther <rguenther@suse.de>
PR middle-end/35834
* tree-ssa-address.c (create_mem_ref): Use POINTER_PLUS_EXPR
for adding index to base.
From-SVN: r134090
* config/i386/mingw32.h (ENABLE_EXECUTE_STACK): New.
(MINGW_ENABLE_EXECUTE_STACK): New.
(IN_LIBGCC2): For libgcc include windows.h file for
function declarations.
From-SVN: r134089
* gnat.dg/parent_ltd_with-child_full_view.adb: New test.
* gnat.dg/rt1.adb: New test.
* gnat.dg/test_time_stamp.adb: New test.
* gnat.dg/specs/warn_star.ads: New test.
* gnat.dg/specs/aggr1.ads: New test.
From-SVN: r134086
* gnat.dg/parent_ltd_with-child_full_view.adb: New test.
* gnat.dg/rt1.adb: New test.
* gnat.dg/test_time_stamp.adb: New test.
* gnat.dg/specs/warn_star.ads: New test.
* gnat.dg/specs/aggr1.ads: New test.
From-SVN: r134085
(Task_Address): New subtype of System.Address
(Task_Address_Size): New constant size of System.Address
(Alternate_Stack_Size): New constant.
From-SVN: r134079
* config/avr/avr.h (TARGET_CPU_CPP_BUILTINS): Define
__AVR_HAVE_EIJMP_EICALL__ macro if device have EIJMP and EICALL
instructions.
* config/avr/avr.c (avr_mcu_types): Set AVR31 architecture for
atmega103 device.
From-SVN: r134069
2008-04-08 Jerome Lambourg <lambourg@adacore.com>
Arnaud Charlet <charlet@adacore.com>
* bindgen.adb (Gen_Adainit_Ada): If the main program is a CIL function,
then use __gnat_set_exit_status to report the returned status code.
* comperr.adb (Compiler_Abort): Convert most bug boxes into clean error
messages on .NET, since some constructs of the language are not
properly supported.
* gnatlink.adb (Gnatlink): In case the command line is too long for the
.NET linker, gnatlink now concatenate all .il files and pass this to
ilasm.
From-SVN: r134066
2008-04-08 Emmanuel Briot <briot@adacore.com>
* g-comlin.ads, g-comlin.adb (Expansion): Remove unreachable return
statement.
(Get_Configuration): New subprogram.
* prj-pp.ads, prj-pp.adb (Pretty_Print): new parameters Id and Id_Tree
These optional parameters help preserve the casing of the project's name
when pretty-printing.
From-SVN: r134065
2008-04-08 Ed Schonberg <schonberg@adacore.com>
* binde.adb (Gather_All_Links, Gather_Dependencies): units that are
mentioned in limited_with_clauses to do create semantic dependencies
even though they appear in the ali file.
From-SVN: r134064