PR fortran/16943
* symbol.c : Include flags.h.
(gfc_add_type): If a procedure and types are the same do not
throw an error unless standard is less than gnu or pedantic.
PR fortran/20838
* parse.c (parse_do_block): Error if named block do construct
does not have a named enddo.
PR fortran/27655
* check.c (gfc_check_associated): Pick up EXPR_NULL for pointer
as well as target and put error return at end of function.
2006-06-05 Paul Thomas <pault@gcc.gnu.org>
PR fortran/14067
* gfortran.dg/data_char_1.f90: Add messages for truncated
strings.
PR fortran/16943
* gfortran.dg/func_decl_2.f90: New test.
PR fortran/20838
* gfortran.dg/do_2.f90: New test.
PR fortran/27655
* gfortran.dg/associated_3.f90: New test.
Paolo Carlini [Mon, 5 Jun 2006 07:33:18 +0000 (07:33 +0000)]
[multiple changes]
2006-06-05 Paolo Carlini <pcarlini@suse.de>
* include/tr1/random.tcc (Max::value()): Cast 1 to Tp(1) and
adjust shift count to w; rename as Max_w.
(struct Mod_w): New.
(mersenne_twister<>::seed(Gen&, false_type): Use the latter.
(mersenne_twister<>::operator()()): Fix ~0ul to ~_UInt().
* testsuite/tr1/5_numerical_facilies/random/mersenne_twister/
cons/default.cc: Fix ~0ul to 2^32-1.
* testsuite/tr1/5_numerical_facilies/random/mersenne_twister/
cons/gen1.cc: Likewise.
2006-06-05 Stephen M. Webb <stephen.webb@bregmasoft.com>
Mark Mitchell [Mon, 5 Jun 2006 02:46:38 +0000 (02:46 +0000)]
re PR c++/27819 (ICE casting static const variables)
PR c++/27819
* decl.c (cp_finish_decl): Process initializers for static data
members with non-dependent initializers, even in templates.
PR c++/27722
* decl.c (maybe_deduce_size_from_array_init): If the declaration
is erroneous, give it an erroneous type.
(layout_var_decl): If the type is erroneous, give up.
(check_initializer): Likewise.
PR c++/27807
* cp-tree.h (TYPE_OBJ_P): New macro.
(TYPE_PTROB_P): Use it.
(TYPE_REF_OBJ_P): Likewise.
* semantics.c (finish_compound_literal): Do not permit compound
literals of non-object types.
PR c++/27806
* typeck.c (original_type): Robustify.
PR c++/27819
* g++.dg/template/static25.C: New test.
PR c++/27722
* g++.dg/init/array21.C: New test.
PR c++/27807
* g++.dg/ext/complit7.C: New test.
Mark Shinwell [Sun, 4 Jun 2006 16:28:55 +0000 (16:28 +0000)]
tree.h: Declare folding_initializer.
gcc:
* tree.h: Declare folding_initializer.
* builtins.c (fold_builtin_constant_p): Give definite answer
if folding inside an initializer.
* fold-const.c: Define folding_initializer.
(START_FOLD_INIT): Save and then set folding_initializer.
(END_FOLD_INIT): Restore folding_initializer.
gcc/testsuite:
* gcc.c-torture/compile/builtin_constant_p.c: New test.
re PR tree-optimization/27039 (Unable to determine # of iterations for a simple loop)
2006-06-04 Richard Guenther <rguenther@suse.de>
PR tree-optimization/27039
* fold-const.c (fold_comparison): Handle pointer comparison
again for all comparison codes. Compare offsets in signed
size type.
(fold_binary): Move code from here.
Roger Sayle [Sun, 4 Jun 2006 04:28:25 +0000 (04:28 +0000)]
re PR target/26223 (ICE on long double with -mno-80387)
PR target/26223
* config/i386/i386.c (construct_container): Split static issued_error
flag into issued_sse_arg_error, issued_sse_ret_error and
issued_x87_ret_error. Issue a daignostic if the x86-64 ABI
requires the use of x87 registers and the user explicitly
specified the -mno-80387 command line option.
trans.c (gfc_msg_bounds, [...]): Add strings for common runtime error messages.
* trans.c (gfc_msg_bounds, gfc_msg_fault, gfc_msg_wrong_return):
Add strings for common runtime error messages.
(gfc_trans_runtime_check): Add a locus argument, use a string
and not a string tree for the message.
* trans.h (gfc_trans_runtime_check): Change prototype accordingly.
(gfc_msg_bounds, gfc_msg_fault, gfc_msg_wrong_return): Add proto.
* trans-const.c (gfc_strconst_bounds, gfc_strconst_fault,
gfc_strconst_wrong_return, gfc_strconst_current_filename): Remove.
(gfc_init_constants): Likewise.
* trans-const.h: Likewise.
* trans-decl.c (gfc_build_builtin_function_decls): Call to
_gfortran_runtime_error has only one argument, the message string.
* trans-array.h (gfc_conv_array_ref): Add a symbol argument and a
locus.
* trans-array.c (gfc_trans_array_bound_check): Build precise
error messages.
(gfc_conv_array_ref): Use the new symbol argument and the locus
to build more precise error messages.
(gfc_conv_ss_startstride): More precise error messages.
* trans-expr.c (gfc_conv_variable): Give symbol reference and
locus to gfc_conv_array_ref.
(gfc_conv_function_call): Use the new prototype for
gfc_trans_runtime_check.
* trans-stmt.c (gfc_trans_goto): Build more precise error message.
* trans-io.c (set_string): Likewise.
* trans-intrinsic.c (gfc_conv_intrinsic_bound): Use new prototype
for gfc_trans_runtime_check.
* configure.ac: Define HAS_PPC_THREAD_STATE_R0,
HAS_PPC_THREAD_STATE___R0, HAS_PPC_THREAD_STATE64_R0,
HAS_PPC_THREAD_STATE64___R0, HAS_I386_THREAD_STATE_EAX,
HAS_I386_THREAD_STATE___EAX.
* configure: Regenerate.
* include/gc_config.h.in: Regenerate.
* darwin_stop_world.c (PPC_RED_ZONE_SIZE): Use standard Darwin
macro names to determine value.
(THREAD_STATE): New.
(THREAD_FLD): New.
(GC_push_all_stacks): Use THREAD_STATE and THREAD_FLD in both versions.
Steve Ellcey [Fri, 2 Jun 2006 17:39:28 +0000 (17:39 +0000)]
init5.C: XFAIL if cxa-atexit is false.
* g++.old-deja/g++.other/init5.C: XFAIL if cxa-atexit is false.
* g++.old-deja/g++.other/init19.C: Ditto.
* g++.old-deja/g++.other/init18.C: Ditto, plus change _Exit to _exit
and add other platforms as expected failures.
Paolo Bonzini [Thu, 1 Jun 2006 12:25:19 +0000 (12:25 +0000)]
install.texi: Document that InfoZIP can replace jar.
gcc:
2006-06-01 Paolo Bonzini <bonzini@gnu.org>
* doc/install.texi: Document that InfoZIP can replace jar.
libjava:
2006-06-01 Paolo Bonzini <bonzini@gnu.org>
* configure.ac (ZIP, UNZIP): New programs.
(JAR): Fall back to bash script. Generate it.
(BASH_JAR): New conditional.
* Makefile.am (bin_SCRIPTS): New.
* jar.in: New file.
* pex-common.c: New function pex_run_in_environment.
* pex-common.h: Add environment parameter to exec_child.
* pex-msdos.c: Add environment parameter to pex_msdos_exec_child.
* pex-djgpp.c: Add environment parameter to pex_djgpp_exec_child.
(pex_djgpp_exec_child): Pass environment to child process.
* pex-unix.c: Add environment parameter to pex_unix_exec_child.
(pex_unix_exec_child): Pass environment to child process.
* pex-win32.c: Add environment parameter to pex_win32_exec_child.
New function env_compare for comparing VAR=VALUE pairs.
(win32_spawn): Assemble environment block and pass to CreateProcess.
(spawn_script): Pass environment through to win32_spawn.
(pex_win32_exec_child): Pass environment through to spawn_script and
win32_spawn.
* functions.texi: Regenerate.
* pexecute.txh: Document pex_run_in_environment.
Bryce McKinlay [Thu, 1 Jun 2006 07:45:55 +0000 (07:45 +0000)]
prims.cc (_Jv_RunMain): Use JvNewStringUTF for command-line class name, not Latin1.
2006-05-31 Bryce McKinlay <mckinlay@redhat.com>
* prims.cc (_Jv_RunMain): Use JvNewStringUTF for command-line class
name, not Latin1.
* gnu/java/lang/MainThread.java (run): Allow file separator char to
be used in place of '.' as class-name separator. Don't chain
ClassNotFoundException.
Paul Thomas [Thu, 1 Jun 2006 04:35:38 +0000 (04:35 +0000)]
re PR fortran/25098 (Variable as actual argument for procedure dummy argument allowed)
2006-06-01 Paul Thomas <pault@gcc.gnu.org>
PR fortran/25098
PR fortran/25147
* interface.c (compare_parameter): Return 1 if the actual arg
is external and the formal is a procedure.
(compare_actual_formal): If the actual argument is a variable
and the formal a procedure, this an error. If a gsymbol exists
for a procedure of the same name, this is not yet resolved and
the error is cleared.
* trans-intrinsic.c (gfc_conv_associated): Make provision for
zero array length or zero string length contingent on presence
of target, for consistency with standard.
2006-06-01 Paul Thomas <pault@gcc.gnu.org>
PR fortran/25098
* gfortran.dg/dummy_procedure_1.f90: New test.
PR fortran/25147
* gfortran.dg/dummy_procedure_2.f90: New test.
* gfortran.dg/associated_2.f90: Correct to make consistent with
standard.
Roger Sayle [Thu, 1 Jun 2006 01:37:17 +0000 (01:37 +0000)]
i386.c (ix86_expand_fp_absneg_operator): When SSE isn't available...
* config/i386/i386.c (ix86_expand_fp_absneg_operator): When SSE
isn't available, directly generate the simpler x87 patterns without
the (use (const_int 0)).
* config/i386/i386.md (*negsf2_1): Enable pre-reload if the SSE
implementation isn't available.
(*negdf2_1): Likewise.
(*negxf2_1): XF mode negation is always done using the x87.
(*abssf2_1, *absdf2_1, *absxf2_1): Likewise^3 for fabs.
gcj.texi (Extensions): Document the new gcj-dbtool-based classname-to-library resolution mechanism.
2006-05-31 Thomas Fitzsimmons <fitzsim@redhat.com>
* gcj.texi (Extensions): Document the new gcj-dbtool-based
classname-to-library resolution mechanism.
Declare the old gnu.gcj.runtime.VMClassLoader.library_control
mechanism deprecated.
(libgcj Runtime Properties): Document
gnu.gcj.runtime.VMClassLoader.library_control's new default.
Richard Earnshaw [Wed, 31 May 2006 13:41:08 +0000 (13:41 +0000)]
re PR target/27829 (ICE/abort in shift_op, at config/arm/arm.c:7917 with asm from testsuite/gcc.dg/pr21255-2-mb.c)
PR target/27829
* arm.c (arm_print_operand case 'S'): Validate that the operand is
a shift operand before calling shift_op. Avoid redundant call of
shift_op.
Mark Mitchell [Wed, 31 May 2006 01:18:24 +0000 (01:18 +0000)]
re PR c++/27808 (ICE with invalid friend declaration)
PR c++/27808
* parser.c (cp_parser_decl_specifier_seq): Issue errors about
"friend" specifiers that do not appear in class scopes.
PR c++/27808
* g++.dg/parse/friend6.C: New test.
Asher Langton [Tue, 30 May 2006 23:27:38 +0000 (23:27 +0000)]
symbol.c (check_conflict): Allow external, function, and subroutine attributes with Cray pointees.
2006-05-30 Asher Langton <langton2@llnl.gov>
* symbol.c (check_conflict): Allow external, function, and
subroutine attributes with Cray pointees.
* trans-expr.c (gfc_conv_function_val): Translate Cray pointees
that point to procedures.
* gfortran.texi: Document new feature.
makemake.tcl (emit_bc_rule): Do not skip gnu-java-awt-peer-gtk.lo.
2006-05-30 Thomas Fitzsimmons <fitzsim@redhat.com>
* scripts/makemake.tcl (emit_bc_rule): Do not skip
gnu-java-awt-peer-gtk.lo.
Include gnu/java/awt/peer/gtk Java objects in libgcj.so. Use C++
ABI for gnu/java/awt/peer/gtk package.
* gnu/classpath/natSystemProperties.cc (PrependVersionedLibdir):
New function.
(insertSystemProperties): Only set java.ext.dirs if it is not
already defined. Prepend GCJ_VERSIONED_LIBDIR to module search
path where necessary.
* configure.ac (GTK_AWT): Remove automake conditional.
* include/jvm.h (_Jv_PrependVersionedLibdir): New function
declaration.
* gij.cc (main): Prepend LD_LIBRARY_PATH with GCJ_VERSIONED_LIBDIR
and re-exec self.
* Makefile.am (AM_CXXFLAGS): Define GCJ_VERSIONED_LIBDIR,
GIJ_EXECUTABLE and PATH_SEPARATOR macros.
Remove lib-gnu-java-awt-peer-gtk.la and libgcjawt.la build logic.
* prims.cc (_Jv_PrependVersionedLibdir): New function.
2006-05-30 Thomas Fitzsimmons <fitzsim@redhat.com>
Roger Sayle [Tue, 30 May 2006 21:34:04 +0000 (21:34 +0000)]
re PR tree-optimization/23452 (Optimizing CONJG_EXPR (a) * a)
PR tree-optimization/23452
* fold-const.c (fold_mult_zconjz): New subroutine of fold_binary,
to optimize z * conj(z) as realpart(z)^2 + imagpart(z)^2.
(fold_binary) <MULT_EXPR>: Call fold_mult_zconjz for integral
complex values and with -ffast-math for FP complex values.
Roger Sayle [Tue, 30 May 2006 15:32:52 +0000 (15:32 +0000)]
simplify-rtx.c (simplify_binary_operation): Unfactor the shift and rotate cases.
* simplify-rtx.c (simplify_binary_operation): Unfactor the shift
and rotate cases.
<LSHIFTRT>: Optimize (lshiftrt (clz X) C) as (eq X 0) where C is
log2(GET_MODE_BITSIZE(X)) on targets with the appropriate semantics.
* gcc.target/ppc-eq0-1.c: New test case.
* gcc.target/ppc-negeq0-1.c: New test case.
Steven Bosscher [Tue, 30 May 2006 11:09:18 +0000 (11:09 +0000)]
m32r.h (DBX_OUTPUT_SOURCE_LINE): Fix type of begin_label.
* config/m32r/m32r.h (DBX_OUTPUT_SOURCE_LINE): Fix type of begin_label.
* config/m32r/initfini.c (__do_global_dtors, __do_global_ctors):
Make prototypes ISO C90.