Nathan Sidwell [Mon, 24 Dec 2001 20:52:36 +0000 (20:52 +0000)]
re PR c++/160 (Reference variables not initialized correctly in constructor initializer list using , operator)
cp:
PR c++/160
* typeck.c (build_modify_expr): Remove old unreachable code & tidy
up. Don't stabilize_references when initializing a reference.
testsuite:
* g++.dg/other/init2.C: New test.
re PR debug/5163 (Internal compiler error in add_abstract_origin_attribute, at dwarf2out.c:9296)
PR c/5163:
* c-decl.c (duplicate_decls): As needed, set DECL_INLINE when
we have a function body associated. Minor cleanups.
(grokdeclarator): Do not set DECL_INLINE without a function body.
stmt.c (parse_input_constraint): Break out from ...
* stmt.c (parse_input_constraint): Break out from ...
(expand_asm_operands): ... here. Loop over the operands twice,
the first time only calling mark_addressable. Correct and simplify
the conditions for spilling an output operand to memory.
Jeff Law [Mon, 24 Dec 2001 01:45:29 +0000 (18:45 -0700)]
os_defines.h: Do not include <_sys/inttypes.h>.
* config/os/hpux/bits/os_defines.h: Do not include <_sys/inttypes.h>.
Twiddle return types for strtoll and strtoull to avoid using
intmax_t and uintmax-t.
calls.c (expand_call): Don't turn off ECF_LIBCALL_BLOCK for an invalid result register...
* calls.c (expand_call): Don't turn off ECF_LIBCALL_BLOCK for
an invalid result register; do end the sequence properly.
(emit_library_call_value_1): Likewise.
* gnat-style.texi (header): Add @dircategory, @direntry.
(title page): Remove date.
(general) Add @./@: where approriate, and two spaces after the
full stop at the end of a sentence. Use @samp markup when
referring concrete lexical entities (keywords, attribute names
etc.), and @syntax for ARM grammar elements. Use @r for English
text in comments. Use @emph for emphasis. Change "if-statements"
etc. to "if statements" (without @samp). Break long lines. Make
casing of section names consistent.
(Identifiers): Use @samp markup for variable names.
(Comments): Use @samp markup for comment characters. Line-end
comments may follow any Ada code, not just statements. Fix
misspelling of "Integer" as "integer".
(Loop statements): Do not use variable name "I", use "J".
(Subprogram Declarations): Document alignment.
(Subprogram Bodies, Block statements): Document empty line before
"begin".
* config/rs6000/rs6000.c: Clean up some spacing and indentation.
(altivec_init_builtins): Add tree types for builtins with 4 bit
literals.
(bdesc_3arg): Add vsldoi variants.
Joseph Myers [Sat, 22 Dec 2001 21:07:33 +0000 (21:07 +0000)]
config.gcc (extra_headers): Move settings to math-68881.h and ppc-asm.h to common code for CPU types.
* config.gcc (extra_headers): Move settings to math-68881.h and
ppc-asm.h to common code for CPU types. Use math-68881.h on all
m68k targets.
(header_files): Remove unused setting.
Richard Kenner [Sat, 22 Dec 2001 15:06:55 +0000 (15:06 +0000)]
expr.c (expand_expr, [...]): Handling taking address of SAVE_EXPR.
* expr.c (expand_expr, case ADDR_EXPR): Handling taking address of
SAVE_EXPR.
* function.c (gen_mem_addressof): Add missing tests for SAVE_EXPR.
(put_addressof_into_stack): Clarify code in setting of used_p.
Florian Weimer [Sat, 22 Dec 2001 11:58:51 +0000 (12:58 +0100)]
make.adb (Add_Switch): Make Generic_Position a procedure.
* make.adb (Add_Switch): Make Generic_Position a procedure. The
function approach did not work well because of a side effect (the
function call could reallocate the table which was being indexed
using its result). Fixes ada/4851.
Jeff Law [Sat, 22 Dec 2001 00:42:46 +0000 (17:42 -0700)]
os_defines.h: Include <sys/_inttypes.h.
* config/os/hpux/bits/os_defines.h: Include <sys/_inttypes.h.
Define strtoll and strtoull. Provide prototypes for
__strtoll and __strtoull. Define _GLIBCPP_USE_LONG_LONG
unconditionally.
Tom Tromey [Fri, 21 Dec 2001 19:47:50 +0000 (19:47 +0000)]
re PR libgcj/2428 (Classloader is not set)
Fix for PR libgcj/2428:
* java/lang/natClass.cc: Include RuntimePermission.h.
(getClassLoader): Define.
* java/lang/Class.h (Class.getClassLoader): Only declare.
Tom Tromey [Fri, 21 Dec 2001 19:15:36 +0000 (19:15 +0000)]
For PR java/4509:
* parse.y (java_complete_lhs) [COMPOUND_EXPR]: Correctly compute
CAN_COMPLETE_NORMALLY for the node.
* jcf-write.c (generate_bytecode_insns) [COMPOUND_EXPR]: Don't
generate code for second branch if first branch can't complete
normally.
(generate_bytecode_insns) [LOOP_EXPR]: Don't generate `goto' to
the loop head if the loop body can't complete normally.
Turly O'Connor [Fri, 21 Dec 2001 10:44:50 +0000 (10:44 +0000)]
darwin.c (machopic_classify_ident): Handle "stale" section- encoded name problem to avoid generating illegal stubs.
* darwin.c (machopic_classify_ident): Handle "stale" section-
encoded name problem to avoid generating illegal stubs.
(func_name_maybe_scoped): Remove, not needed for gcc3.
(machopic_indirect_call_target): Don't use it.
(darwin_encode_section_info): Call only one of update_stubs()
or update_non_lazy_ptrs() as DECL cannot be both.
(machopic_output_possible_stub_label): New.
* darwin.h (ASM_DECLARE_FUNCTION_NAME): Use it.
* darwin-protos.h (machopic_output_possible_stub_label): Declare.
Tom Tromey [Fri, 21 Dec 2001 05:28:27 +0000 (05:28 +0000)]
For PR java/4509:
* parse.y (java_complete_lhs) [COMPOUND_EXPR]: Correctly compute
CAN_COMPLETE_NORMALLY for the node.
* jcf-write.c (generate_bytecode_insns) [COMPOUND_EXPR]: Don't
generate code for second branch if first branch can't complete
normally.
(generate_bytecode_insns) [LOOP_EXPR]: Don't generate `goto' to
the loop head if the loop body can't complete normally.
Tom Tromey [Fri, 21 Dec 2001 04:37:24 +0000 (04:37 +0000)]
re PR java/5057 (gcj -C erroneously omits <clinit>)
Fixes PR java/5057:
* parse.y (analyze_clinit_body): Added this_class parameter.
Check for more cases where we must keep <clinit>.
(maybe_yank_clinit): Cleaned up flow control.
Kaveh R. Ghazi [Fri, 21 Dec 2001 02:36:37 +0000 (02:36 +0000)]
builtin-attrs.def (__builtin_printf_unlocked, [...]): Mark with the __printf__ attribute.
* builtin-attrs.def (__builtin_printf_unlocked,
__builtin_fprintf_unlocked, printf_unlocked, fprintf_unlocked):
Mark with the __printf__ attribute.
* builtins.c (expand_builtin_fputs): Add an `unlocked' parameter
and set the replacement function depending on it.
(expand_builtin): Skip BUILT_IN_*_UNLOCKED when not optimizing.
Handle BUILT_IN_*_UNLOCKED when optimizing.
* builtins.def (DEF_EXT_FALLBACK_BUILTIN,
DEF_EXT_FRONT_END_LIB_BUILTIN): New macros.
Declare the "unlocked" stdio functions.
* c-common.c (c_expand_builtin_printf, c_expand_builtin_fprintf):
Add an `unlocked' parameter and set the replacement function
depending on it.
(c_expand_builtin): Handle BUILT_IN_PRINTF_UNLOCKED and
BUILT_IN_FPRINTF_UNLOCKED.
* g++.old-deja/g++.eh/badalloc1.C (arena_size): New.
(arena): Use it.
(malloc): Correct allocation logic. Abort if we fill up the
arena before initialization complete.
(realloc): Correct allocation logic.
Tom Tromey [Thu, 20 Dec 2001 17:45:41 +0000 (17:45 +0000)]
re PR java/3417 (Downcast on integral types.)
Fix for PR java/3417:
* parse.y (patch_assignment): Added special processing for
`return'.
(patch_return): Don't convert booleans to integers, and don't
special-case `null'.
Jan Hubicka [Thu, 20 Dec 2001 17:01:26 +0000 (18:01 +0100)]
cfgcleanup.c (flow_find_cross_jump): Avoid incrementing of ninsns if one of block does not contain jump.
* cfgcleanup.c (flow_find_cross_jump): Avoid incrementing of ninsns
if one of block does not contain jump.
(outgoing_edge_math): Revert last path; require edges to be noncomplex
nonfake to match single exit edge; require conditional jumps to not
have side effect.
Andrew Haley [Thu, 20 Dec 2001 14:09:03 +0000 (14:09 +0000)]
FileHandleGcTest.out: New file.
2001-12-20 Andrew Haley <aph@redhat.com>
* libjava.lang/FileHandleGcTest.out: New file.
* libjava.lang/FileHandleGcTest.java: New file.
* libjava.lang/Array_3.out: New file.
* libjava.lang/Array_3.java: New file.
Geert Bosch [Thu, 20 Dec 2001 06:22:43 +0000 (07:22 +0100)]
bindgen.adb: Minor reformatting
* bindgen.adb: Minor reformatting
* cstand.adb: Minor reformatting
* fmap.adb: Minor reformatting
Change name from Add for Add_To_File_Map (Add is much too generic)
Change Path_Name_Of to Mapped_Path_Name
Change File_Name_Of to Mapped_File_Name
Fix copyright dates in header
* fmap.ads:
Change name from Add for Add_To_File_Map (Add is much too generic)
Change Path_Name_Of to Mapped_Path_Name
Change File_Name_Of to Mapped_File_Name
Fix copyright dates in header
* fname-uf.adb: Minor reformatting. New names of stuff in Fmap.
Add use clause for Fmap.
* make.adb: Minor reformatting
* osint.adb: Minor reformatting. Change of names in Fmap.
Add use clause for Fmap.
* prj-env.adb: Minor reformatting
* prj-env.ads: Minor reformatting
* switch.adb: Minor reformatting. Do proper raise of Bad_Switch if
error found (there were odd exceptions to this general rule in
-gnatec/-gnatem processing)
* raise.c (__gnat_eh_personality): Exception handling personality
routine for Ada. Still in rough state, inspired from the C++ version
and still containing a bunch of debugging artifacts.
(parse_lsda_header, get_ttype_entry): Local (static) helpers, also
inspired from the C++ library.
* raise.c (eh_personality): Add comments. Part of work for the GCC 3
exception handling integration.
* Makefile.in: Remove use of 5smastop.adb which is obsolete.
(HIE_SOURCES): Add s-secsta.ad{s,b}.
(HIE_OBJS): Add s-fat*.o
(RAVEN_SOURCES): Remove files that are no longer required. Add
interrupt handling files.
(RAVEN_MOD): Removed, no longer needed.
* a-ngelfu.adb: Remove ??? comment for inappropriate Inline_Always
Add 2001 to copyright date
* g-regpat.adb: Change pragma Inline_Always to Inline. There is no
need to force universal inlining for these cases.
* s-taprob.adb: Minor clean ups so that this unit can be used in
Ravenscar HI.
* exp_ch7.adb: Allow use of secondary stack in HI mode.
Disallow it when pragma Restrictions (No_Secondary_Stack) is specified.
* prj-tree.ads (Project_Node_Record): Add comments for components
Pkg_Id and Case_Insensitive.
* g-socket.adb: Minor reformatting. Found while reading code.
* config/rs6000/rs6000.c (vrsave_operation): Change unspec to
unspec_volatile.
(generate_set_vrsave): Generate the unspec here instead of calling
an .md pattern.
(generate_set_vrsave): Use gen_rtvec.
(rs6000_emit_prologue): Replace call to gen_get_vrsave with
gen_rtx_SET.
* config/rs6000/rs6000.md ("*movsi_internal1"): Add constraints
for setting special registers.
("*set_vrsave_internal"): Use unspec_volatile.
("set_vrsave"): Remove.
("get_vrsave"): Remove.
* config/rs6000/rs6000.h (REG_CLASS_CONTENTS): Add vrsave to
SPECIAL_REGS.
Dan Nicolaescu [Wed, 19 Dec 2001 23:00:39 +0000 (15:00 -0800)]
sparc.md (ldd peephole2s): For load peepholes pass the destination register as a parameter to...
* config/sparc/sparc.md (ldd peephole2s): For load peepholes pass
the destination register as a parameter to mems_ok_for_ldd_peep.
For store peepholes pass NULL_RTX. Move all volatile checks ...
* config/sparc/sparc.c (mems_ok_for_ldd_peep): ... here. Add a
register parameter, check it's not the same as base for an address.
* config/sparc/sparc-protos.h (mems_ok_for_ldd_peep): Update.