PR c++/35316
* semantics.c (finish_decltype_type): Check DECL_BIT_FIELD_TYPE
to see if DECL_BIT_FIELD_TYPE should be used, not some other flag.
* typeck.c (is_bitfield_expr_with_lowered_type): Likewise.
From-SVN: r134571
PR c++/35747
* semantics.c (finish_stmt_expr): Call pop_stmt_list even if the stmt
expression is errorneous.
* g++.dg/ext/stmtexpr13.C: New test.
From-SVN: r134567
2008-04-22 Joel Sherrill <joel.sherrill@oarcorp.com>
* s-osinte-rtems.adb: Add sigalstack function.
* s-osinte-rtems.ads: Add SO_ONSTACK and sigalstack
function. Add Alternate_Stack and Alternate_Stack_Size.
Add missing process_shared field to pthread_condattr_t
and change ss_low_priority to int from timespec.
From-SVN: r134560
* coverage.c: Include tree-pass.h.
(coverage_counter_alloc): Print da_file_name to the dump file.
testsuite/
* gcc.dg/profile-dir-1.c, gcc.dg/profile-dir-2.c,
gcc.dg/profile-dir-3.c: Generate tree_profile dump. Check gcda
file name there instead of the assembly. Cleanup tree_profile
dump file.
From-SVN: r134541
2008-04-24 Richard Sandiford <rsandifo@nildram.co.uk>
Kenneth Zadeck <zadeck@naturalbridge.com>
* dbgcnt.def (ra_byte_scan): Added.
* dbgcnt.c (dbg_cnt): Added code to print message to dump_file
when the last hit happens for a counter.
* timevar.def (TV_DF_BYTE_LR): New variable.
* tree-pass.h (pass_fast_rtl_byte_dce): New pass.
* passes.c (pass_fast_rtl_byte_dce): New pass.
* fwprop.c (update_df): Added mode to call df_ref_create.
Renamed DF_REF_WIDTH and DF_REF_OFFSET to DF_REF_EXTRACT_WIDTH and
DF_REF_EXTRACT_OFFSET.
* df.h (DF_BYTE_LR, DF_BYTE_LR_BB_INFO, DF_BYTE_LR_IN,
DF_BYTE_LR_OUT, df_byte_lr): New macro.
(df_mm): New enum.
(df_ref_extract): Added mode field.
(DF_REF_WIDTH, DF_REF_OFFSET) Renamed to DF_REF_EXTRACT_WIDTH and
DF_REF_EXTRACT_OFFSET.
(DF_REF_EXTRACT_MODE): New macro.
(df_byte_lr_bb_info): New structure.
(df_print_byte_regset, df_compute_accessed_bytes,
df_byte_lr_add_problem, df_byte_lr_get_regno_start,
df_byte_lr_get_regno_len, df_byte_lr_simulate_defs,
df_byte_lr_simulate_uses,
df_byte_lr_simulate_artificial_refs_at_top,
df_byte_lr_simulate_artificial_refs_at_end,
df_compute_accessed_bytes): New function.
(df_ref_create): Add parameter.
(df_byte_lr_get_bb_info): New inline function.
* df-scan.c (df_ref_record, df_uses_record,
df_ref_create_structure): Added mode parameter.
(df_ref_create, df_notes_rescan, df_ref_record, df_def_record_1,
df_defs_record, df_uses_record, df_get_conditional_uses,
df_get_call_refs, df_insn_refs_collect, df_bb_refs_collect,
df_entry_block_defs_collect, df_exit_block_uses_collect):
Added mode parameter to calls to df_ref_record, df_uses_record,
df_ref_create_structure.
(df_ref_equal_p, df_ref_compare): Added test for modes.
(df_ref_create_structure): Added code to set mode. Renamed
DF_REF_WIDTH and DF_REF_OFFSET to DF_REF_EXTRACT_WIDTH and
DF_REF_EXTRACT_OFFSET.
* df-core.c (df_print_byte_regset): New function.
* df-byte-scan.c: New file.
* df-problems.c (df_rd_transfer_function): Removed unnecessary
calls to BITMAP_FREE.
(df_byte_lr_problem_data, df_problem problem_BYTE_LR): New structure.
(df_byte_lr_get_regno_start, df_byte_lr_get_regno_len,
df_byte_lr_set_bb_info, df_byte_lr_free_bb_info,
df_byte_lr_check_regs, df_byte_lr_expand_bitmap,
df_byte_lr_alloc, df_byte_lr_reset, df_byte_lr_bb_local_compute,
df_byte_lr_local_compute, df_byte_lr_init,
df_byte_lr_confluence_0, df_byte_lr_confluence_n,
df_byte_lr_transfer_function, df_byte_lr_free,
df_byte_lr_top_dump, df_byte_lr_bottom_dump,
df_byte_lr_add_problem, df_byte_lr_simulate_defs,
df_byte_lr_simulate_uses,
df_byte_lr_simulate_artificial_refs_at_top,
df_byte_lr_simulate_artificial_refs_at_end): New function.
* dce.c (byte_dce_process_block): New function.
(dce_process_block): au is now passed in rather than computed
locally. Changed loops that look at artificial defs to not look
for conditional or partial ones, because there never are any.
(fast_dce): Now is able to drive byte_dce_process_block or
dce_process_block depending on the kind of dce being done.
(rest_of_handle_fast_dce): Add parameter to fast_dce.
(rest_of_handle_fast_byte_dce): New function.
(rtl_opt_pass pass_fast_rtl_byte_dce): New pass.
* Makefile.in (df-byte-scan.o, debugcnt.o): Added dependencies.
Co-Authored-By: Kenneth Zadeck <zadeck@naturalbridge.com>
From-SVN: r134523
2008-04-21 Olivier Hainque <hainque@adacore.com>
ada/
Access to most C builtins from Ada
* utils.c: #include "langhooks.h" and define GCC_DIAG_STYLE.
(handle_pure_attribute, handle_novops_attribute,
handle_nonnull_attribute, handle_sentinel_attribute,
handle_noreturn_attribute, handle_malloc_attribute,
handle_type_generic_attribute): New attribute handlers, from C fe.
(gnat_internal_attribute_table): Map the new handlers.
(gnat_init_decl_processing): Move call to gnat_install_builtins to ...
(init_gigi_decls): ... here.
(handle_const_attribute, handle_nothrow_attribute, builtin_decl_for):
Move to a section dedicated to builtins processing.
(build_void_list_node, builtin_type_for_size): New functions.
(def_fn_type, get_nonnull_operand): Likewise.
(install_builtin_elementary_type, install_builtin_function_types,
install_builtin_attributes): Likewise.
(fake_attribute_handler): Fake handler for attributes we don't
support in Ada.
(def_builtin_1): New function, worker for DEF_BUILTIN.
(install_builtin_functions): New function.
(gnat_install_builtins): Move to the builtins processing section.
Now calling the newly introduced installers.
testsuite/
* gnat.dg/bltins.adb: New testcase.
From-SVN: r134504
* decl.c (gnat_to_gnu_entity) <object>: Also promote the alignment of
constant objects, but not exceptions.
* trans.c (add_decl_expr): Use gnat_types_compatible_p for type
compatibility test.
* utils.c (create_var_decl_1): Likewise.
* utils2.c (build_binary_op) <MODIFY_EXPR>: Also use the padded view of
the type when copying to padded object and the source is a constructor.
From-SVN: r134483
2008-04-19 Paul Thomas <pault@gcc.gnu.org>
PR fortran/35944
PR fortran/35946
PR fortran/35947
* trans_array.c (gfc_trans_array_constructor): Temporarily
realign loop, if loop->from is not zero, before creating
the temporary array and provide an offset.
PR fortran/35959
* trans-decl.c (gfc_init_default_dt): Add gfc_ prefix to name
and allow for NULL body. Change all references from
init_default_dt to gfc_init_default_dt.
* trans.h : Add prototype for gfc_init_default_dt.
* trans-array.c (gfc_trans_deferred_vars): After nullification
call gfc_init_default_dt for derived types with allocatable
components.
2008-04-19 Paul Thomas <pault@gcc.gnu.org>
PR fortran/35944
PR fortran/35946
PR fortran/35947
* gfortran.dg/array_constructor_23.f: New test.
PR fortran/35959
* gfortran.dg/alloc_comp_default_init_2.f90: New test.
* gfortran.dg/alloc_comp_basics_1.f90: Change occurrences of
"builtin_free" to 27.
* gfortran.dg/alloc_comp_constructor_1.f90: Change occurrences
of "builtin_free" to 21.
From-SVN: r134472