Roger Sayle [Mon, 29 Dec 2003 16:16:39 +0000 (16:16 +0000)]
re PR fortran/12632 ([g77 only] -fbounds-check ICE)
PR fortran/12632
* fold-const.c (fold) <COND_EXPR>: Don't fold a constant condition,
if the type of the selected branch doesn't match its' parent.
* com.c (ffecom_subscript_check_): Take as an extra argument the
(possibly NULL) decl of the array. Don't create unnecessary tree
nodes if the array index is known to be safe at compile-time.
If the array index is unsafe, force the array decl into memory to
avoid RTL expansion problems.
(ffecom_array_ref_): Update calls to ffecom_subscript_check_.
(ffecom_char_args_x_): Likewise.
* coverage.c (read_counts_file): Better error messages; cause corrupted
profiles to produce hard errors, not just warnings
(get_coverage_counts): Similarly.
Michael Koch [Sun, 28 Dec 2003 21:30:45 +0000 (21:30 +0000)]
2003-12-28 Michael Koch <konqueror@gmx.de>
* gnu/java/net/protocol/http/Connection.java
(inputStream): Made it a DataInputStream.
(requestProperties): Removed.
(hdrHash): Removed.
(hdrVec): Removed.
(headers): New field to store headers.
(connect): Initialize inputStream.
(receiveReply): Merged from classpath. The new algorithm is line based
instead of character based.
(getHeaderField): Use headers.
(getHeaderFields): Use headers.
(getKey): Removed.
(getField): Removed.
* gnu/java/net/HeaderFieldHelper.java: New file.
* Makefile.am (ordinary_java_source_files):
Added gnu/java/net/HeaderFieldHelper.java.
* Makefile.in: Regenerated.
* sbitmap.c (sbitmap_union_of_diff_cg, sbitmap_a_and_b_cg,
sbitmap_a_xor_b_cg): Accumulate "changed" properly.
(sbitmap_not): Zero all bits past n_bit.
Guilhem Lavaux [Sun, 28 Dec 2003 11:54:17 +0000 (11:54 +0000)]
2003-12-28 Guilhem Lavaux <guilhem@kaffe.org>
* java/io/LineNumberReader.java
(mark): Improved error checking.
(read): Likewise.
(skip): Likewise. Skip is now really eating the specified number of
characters.
* java/io/CharArrayReader.java (read): It should throw
IndexOutOfBoundsException and not ArrayIndexOutOfBoundsException (see
mauve).
* java/io/BufferedReader.java (readLine): Make readLine() really block
until either EOF is reached or a true error happens.
Michael Koch [Sat, 27 Dec 2003 17:24:51 +0000 (17:24 +0000)]
2003-12-27 Michael Koch <konqueror@gmx.de>
* gnu/java/net/protocol/http/Connection.java
(connect): Call receiveReply().
(receiveReply): Renamed from getHttpHeaders().
(getOutputStream): Moved check on doOutput before check for connection
state.
Guilhem Lavaux [Fri, 26 Dec 2003 23:23:55 +0000 (23:23 +0000)]
Naming.java (lookup): Check if the first character of the filename returned by URL.getFile() is a '/'...
2003-12-27 Guilhem Lavaux <guilhem@kaffe.org>
* java/rmi/Naming.java (lookup): Check if the first character of the
filename returned by URL.getFile() is a '/', only if it is the case
we cut this first character and call the registry with the good name.
(bind): Likewise.
(rebind): Likewise.
Guilhem Lavaux [Fri, 26 Dec 2003 22:10:19 +0000 (22:10 +0000)]
BufferedReader.java (BufferedReader): Throw IllegalArgumentException when size <= 0.
2003-12-26 Guilhem Lavaux <guilhem@kaffe.org>
Mark Wielaard <mark@klomp.org>
* java/io/BufferedReader.java (BufferedReader):
Throw IllegalArgumentException when size <= 0.
(mark): Document and better exception message for negative
readLimit IllegalArgumentException.
(read(char[],int,int)): Throw IndexOutOfBoundsException
if offset and count are not valid regarding buf.
(skip): Throw IllegalArgumentException when count is negative.
Co-Authored-By: Mark Wielaard <mark@klomp.org>
From-SVN: r75041
rs6000.c (legitimate_offset_address_p): Do not restrict DFmode and TFmode to word alignment.
2003-12-26 Fariborz Jahanian <fjahanian@apple.com>
Geoffrey Keating <geoffk@apple.com>
David Edelsohn <edelsohn@gnu.org>
* config/rs6000/rs6000.c (legitimate_offset_address_p): Do not
restrict DFmode and TFmode to word alignment.
* config/rs6000/rs6000.md (movdf_hardfloat64): Use 'o' constraint
for ld/std and order before mr.
Co-Authored-By: David Edelsohn <edelsohn@gnu.org> Co-Authored-By: Geoffrey Keating <geoffk@apple.com>
From-SVN: r75040
Guilhem Lavaux [Fri, 26 Dec 2003 21:11:03 +0000 (21:11 +0000)]
2003-12-26 Guilhem Lavaux <guilhem@kaffe.org>
* java/io/FileInputStream.java
(FileInputStream(String)): Call FileInputStream(File).
(FileInputStream(File)): Check whether the argument is a directory.
Guilhem Lavaux [Fri, 26 Dec 2003 16:13:01 +0000 (16:13 +0000)]
2003-12-26 Guilhem Lavaux <guilhem@kaffe.org>
Mark Wielaard <mark@klomp.org>
* gnu/java/rmi/server/UnicastConnectionManager.java
(startScavenger): Set the client connection manager to daemon
state because it may block clients until TIMEOUT is reached
when they are exiting.
* gnu/java/rmi/RMIVoidValue.java: New file for a class representing
a void return.
* gnu/java/rmi/server/UnicastRemoteCall.java
(DummyOutputStream): Add a boolean before each written field to
know whether it is a primitive.
(releaseOutputStream): Flush parameters at write time.
* gnu/java/rmi/server/UnicastServerRef.java
(incomingMessageCall): Return a RMIVoidValue if no value is to be
returned.
* gnu/java/rmi/server/UnicastServer.java
(incomingMessageCall): Do not write a returned object if it is
a RMIVoidValue.
Co-Authored-By: Mark Wielaard <mark@klomp.org>
From-SVN: r75033
Andrew Pinski [Thu, 25 Dec 2003 16:28:50 +0000 (16:28 +0000)]
PR c++/13268, c++/13339
PR c++/13268, c++/13339
* class.c (add_method): Return early when method is error_mark_node.
* pt.c (tsubst_friend_function): Return early when new_friend is
error_mark_node.
Mark Mitchell [Wed, 24 Dec 2003 06:52:27 +0000 (06:52 +0000)]
calls.c (expand_call): Recognize calls to "sqrt" and create corresponding notes.
* calls.c (expand_call): Recognize calls to "sqrt" and create
corresponding notes.
* g++.dg/bprob/bprob.exp: Load target-supports.exp
* g77.dg/bprob/bprob.exp: Likewise.
* gcc.misc-tests/bprob.exp: Likewise.
* gcc.dg/builtins-18.c: Use builtins-config.h. Do not test float
variants on systems where the library does not provide that
functionality.
* gcc.dg/builtins-20.c: Use builtins-config.h.
* gcc.dg/builtins-config.h: New file.
Guilhem Lavaux [Tue, 23 Dec 2003 22:06:01 +0000 (22:06 +0000)]
2003-12-23 Guilhem Lavaux <guilhem@kaffe.org>
* java/io/ObjectInputStream.java
(getField): Handle transient and non persistent fields.
(readClassDescriptor): Better error handling, use the right
class loader.
(readFields): Fields marked as not present in the stream
or not to be set are not read and set.
* java/io/ObjectInputStream.java
(readFields): Changed implementation of GetField.
(readClassDescriptor): Documented.
* java/io/ObjectOutputStream.java
(writeClassDescriptor): Added condition when to write class super
class information.
* gcc.c-torture/compile/20020604-1.c: XFAIL on H8 if -mn is
given.
* gcc.c-torture/compile/961203-1.c: Likewise.
* gcc.c-torture/compile/980506-1.c: Likewise.
Zack Weinberg [Tue, 23 Dec 2003 20:25:49 +0000 (20:25 +0000)]
ia64.c (ia64_va_arg): Pass pointer for variable-sized type through convert_memory_address.
gcc:
* config/ia64/ia64.c (ia64_va_arg): Pass pointer for
variable-sized type through convert_memory_address.
(ia64_in_small_data_p): Always return false for FUNCTION_DECLs.
gcc/testsuite:
* lib/gcc-dg.exp (dg-prune-output): New annotation.
(additional_prunes): New global.
(gcc-dg-prune): Handle additional per-test pruning.
(dg-test): Clear additional_prunes between tests.
* gcc.c-torture/compile/920625-1.c: Remove xfail. Use
dg-prune-output to avoid spurious failures from assembler
complaining about nonexistent WAW violations.
* gcc.c-torture/compile/981223-1.c: Remove dg-options line.
Use dg-prune-output to avoid spurious failures from assembler
warning about Itanium B-step errata.
Fernando Nasser [Tue, 23 Dec 2003 19:24:00 +0000 (19:24 +0000)]
GtkChoicePeer.java (postItemEvent): Rename to...
2003-12-22 Fernando Nasser <fnasser@redhat.com>
* gnu/java/awt/peer/gtk/GtkChoicePeer.java (postItemEvent): Rename to... (choicePostItemEvent): Change signature to more specific String object.
* java/awt/Choice.java (add): Generate ItemEvent for the first item
added.
(insert): Generate ItemEvent if insertion caused
selection to change.
(remove): Generate ItemEvent if removal cause selection to change.
(removeAll): Change algorithm to prevent generation of ItemEvents.
* jni/gtk-peer/gnu_java_awt_peer_gtk_GtkChoicePeer.c
(connect_choice_item_selectable_hook): Change argument type.
Fix argument value.
Make sure resources are feed by registering callback.
(Java_gnu_java_awt_peer_gtk_GtkChoicePeer_append): Adjust call to the
above function.
(Java_gnu_java_awt_peer_gtk_GtkChoicePeer_add): Ditto.
(item_activate): Ditto.
(Java_gnu_java_awt_peer_gtk_GtkChoicePeer_remove): Destroy removed
menuitem.
(item_removed): New function. Free resources.
* jni/gtk-peer/gtkpeer.h (item_event_hook_info): Change member type and
name.
* jni/gtk-peer/gnu_java_awt_peer_gtk_GtkMainThread.c
(Java_gnu_java_awt_peer_gtk_GtkMainThread_gtkInit): Obtain MethodID for
choicePostItemEvent.
Geoffrey Keating [Tue, 23 Dec 2003 08:12:41 +0000 (08:12 +0000)]
rs6000.md: Change many instances of '!
* config/rs6000/rs6000.md: Change many instances of '!
TARGET_POWERPC64' to 'TARGET_32BIT' when the pattern being guarded
was guarded only because it changed CR0 or the carry bit in XER.
* include/ext/new_allocator.h (new_allocator): Proper allocator class.
(__new_alloc): Delete.
* include/ext/malloc_allocator.h (malloc_allocator): Same.
(__malloc_alloc): Delete.
* include/ext/mt_allocator.h: Same, but weakly.
* include/ext/debug_allocator.h: Convert to the new style.
* include/ext/pool_allocator.h: Use global new and delete directly.
* include/backward/alloc.h: Don't inject malloc_allocator, or
debug_allocator.
* testsuite/ext/allocators.cc: Minimal fixups for usage of new
classes. Comment out tests with __pool_alloc for now.
* testsuite/performance/allocator.cc: Same.
Andrew Pinski [Mon, 22 Dec 2003 20:42:58 +0000 (20:42 +0000)]
re PR c++/5050 (template instantiation depth exceeds/maybe recursion problem)
2003-12-22 Andrew Pinski <pinskia@physics.uc.edu>
PR c++/5050
* tree.c (cp_start_inlining): Remove.
(cp_end_inlining): Remove.
* cp-lang.c (LANG_HOOKS_TREE_INLINING_START_INLINING): Do not define.
(LANG_HOOKS_TREE_INLINING_END_INLINING): Do not define.
* cp-tree.h (cp_start_inlining): Do not declare.
(cp_end_inlining): Do not declare.
PR c++/5050
* g++.dg/template/recurse1.C: New test.
Andrew Pinski [Mon, 22 Dec 2003 19:52:30 +0000 (19:52 +0000)]
emit-rtl.c (copy_rtx_if_shared): Add comment about its use of copy_rtx_if_shared_1.
* emit-rtl.c (copy_rtx_if_shared): Add comment about its use of
copy_rtx_if_shared_1.
(copy_rtx_if_shared_1): Add comment about what the function does.
Andrew Pinski [Mon, 22 Dec 2003 18:16:56 +0000 (18:16 +0000)]
re PR c/9163 (ICE in genrtl_compound_stmt at c-semantics.c:776 with c99 mode and checking enabled)
2003-12-22 Andrew Pinski <pinskia@physics.uc.edu>
PR c/9163
* c-decl.c (poplevel): Only set DECL_INITIAL of a current function
if it is non-null.
(finish_function): Check for error_mark_node or null on DECL_RESULT and
DECL_RESULT of fndecl.
(c_expand_body): Only expand when DECL_INITIAL of fndecl is not
error_mark_node and not null.
Ian Lance Taylor [Mon, 22 Dec 2003 15:45:12 +0000 (15:45 +0000)]
cp-demangle.c (CP_DYNAMIC_ARRAYS): Define if compiler supports dynamic arrays.
* cp-demangle.c (CP_DYNAMIC_ARRAYS): Define if compiler supports
dynamic arrays.
(struct d_operator_info): Add len field.
(struct d_builtin_type_info): Add len and java_len fields.
(struct d_standard_sub_info): Add simple_len, full_len, and
set_last_name_len fields.
(struct d_comp): Add len field to s_string.
(struct d_info): Add send, did_subs, and expansion fields.
(d_append_string_constant): Define.
(d_append_string): Remove. Change all users to use
d_append_string_constant or d_append_buffer instead.
(d_make_sub): Add len parameter. Change all callers.
(d_name): Increase expansion when substituting std::.
(d_unqualified_name): Increase expansion for an operator.
(d_number): Don't use multiplication for negative numbers.
(d_identifier): Make sure there are enough characters in the
string for the specified length. Adjust expansion for an
anonymous namespace.
(d_operators): Initialize len field.
(d_special_name, d_ctor_dtor_name): Increase expansion.
(d_builtin_types): Initialize len and java_len fields.
(d_type): Increase expansion for a builtin type.
(d_cv_qualifiers): Increase expansion for each qualifier.
(d_bare_function_type): Decrease expansion when removing single
void parameter.
(d_template_param): Increment did_subs.
(d_expression): Increase expansion for an operator.
(d_expr_primary): Decrease expansion for a type we will print
specially.
(standard_subs): Initialize new fields.
(d_substitution): Increment did_subs when doing a normal
substitution. Increase expansion for a special substitution.
(d_print): Add estimate parameter. Change all callers.
(d_print_comp) [D_COMP_NAME]: Handle C++ case inline.
(d_print_comp) [D_COMP_BINARY]: Use length to avoid strcmp call.
(d_print_java_identifier): Rename from d_print_identifier. Handle
only Java case. Change caller.
(d_init_info): Change return type to void. Change all callers.
Initialize send, did_subs, and expansion fields. Do not
initialize comps and subs fields.
(d_demangle): Ifdef CP_DYNAMIC_ARRAYS, allocate comps and subs
arrays on stack. Make an estimate of the length of the demangled
name. Ifdef CP_DEMANGLE_DEBUG, print estimation failures.
(is_ctor_or_dtor): Ifdef CP_DYNAMIC_ARRAYS, allocate comps and
subs arrays on stack.
Paolo Carlini [Mon, 22 Dec 2003 11:00:43 +0000 (11:00 +0000)]
locale_facets.tcc (num_get::_M_extract_int, [...]): According to 22.2.2.1.2...
2003-12-22 Paolo Carlini <pcarlini@suse.de>
* include/bits/locale_facets.tcc (num_get::_M_extract_int,
num_get::_M_extract_float): According to 22.2.2.1.2, p8-9,
first look for decimal_point and thousands_sep, when parsing
sign, leading zeros (and 0, Ox, 0X for integer types) too.
* testsuite/22_locale/num_get/get/char/12.cc: New.
* testsuite/22_locale/num_get/get/wchar_t/12.cc: Likewise.
* testsuite/22_locale/num_get/get/char/11.cc: Add a comment.
* testsuite/22_locale/num_get/get/wchar_t/11.cc: Likewise.
Mark Mitchell [Mon, 22 Dec 2003 08:03:15 +0000 (08:03 +0000)]
re PR c++/13438 (internal compiler error: tree check: expected identifier_node, have integer_cst in c_parse_error at c-common.c:5921)
PR c++/13438
* cp-tree.h (cp_tree_index): Remove CPTI_RECORD_TYPE,
CPTI_UNION_TYPE, CPTI_ENUM_TYPE.
(record_type_node): Remove.
(union_type_node): Likewise.
(enum_type_node): Likewise.
* decl.c: Remove mention of above tree nodes in comment.
* lex.c (cxx_init): Do not assign to record_type_node,
union_type_node, or enum_type_node. Simplify handling of
class_type_node.