aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite
AgeCommit message (Collapse)AuthorFilesLines
2006-02-26common.opt (-floop-optimize, [...]): Remove.Steven Bosscher3-3/+8
gcc/ * common.opt (-floop-optimize, -frerun-loop-opt): Remove. * tree-pass.h (pass_loop_optimize): Remove. * passes.c (pass_loop_optimize): Never run it. * toplev.c (backend_init): Don't call init_loop. * opts.c (flag_loop_optimize_set): Remove. (decode_options): Never set flag_loop_optimize or flag_rerun_loop_opt. (common_handle_option) <OPT_floop_optimize>: Remove. Don't disable the old RTL loop optimizer when profiling enabled. * predict.c (tree_estimate_probability): Always strip builtin_expect. * cfgcleanup.c (try_forward_edges): Don't avoid killing loop pre-headers for the sake of the old RTL loop optimizer. * Makefile.in: Remove all references to loop.o. * doc/invoke.texi: Remove all references to -floop-optimize and -frerun-loop-opt. testsuite/ * gcc.dg/20031201-1.c: Don't use -frerun-loop-opt. * g++.old-deja/g++.robertl/eb132.C: Likewise. From-SVN: r111459
2006-02-26fold-const.c (fold_binary): Fold (X & 1) ^ 1 as (X & 1) == 0.Roger Sayle2-0/+37
* fold-const.c (fold_binary) <BIT_XOR_EXPR>: Fold (X & 1) ^ 1 as (X & 1) == 0. <BIT_AND_EXPR>: Fold (X ^ 1) & 1 and ~X & 1 as (X & 1) == 0. * gcc.dg/fold-even-1.c: New test case. From-SVN: r111454
2006-02-26re PR tree-optimization/21137 (Convert (a >> 2) & 1 != 0 into a & 4 != 0)Roger Sayle2-0/+51
2006-02-26 Roger Sayle <roger@eyesopen.com> James A. Morrison <phython@gcc.gnu.org> PR middle-end/21137 * fold-const.c (fold_binary) <EQ_EXPR>: Fold ((X>>C1)&C2) eq/ne 0, when C2 is a power of two, as either (X&(C2<<C1)) eq/ne 0 if the new constant C2<<C1, or as (X<0) or (X,false) depending upon the signedness of the shift operation. * gcc.dg/fold-eqandshift-1.c: New test case. Co-Authored-By: James A. Morrison <phython@gcc.gnu.org> From-SVN: r111453
2006-02-26re PR middle-end/25125 ((short) ((int)(unsigned short) + (int)) is done in ↵Dorit Nuzman4-0/+154
the wrong type) PR tree-optimization/25125 * gcc.dg/vect/wrapv-vect-7.c, gcc.dg/vect/wrapv-vect-reduc-2char.c, gcc.dg/vect/wrapv-vect-reduc-2short.c: New tests. From-SVN: r111452
2006-02-26re PR tree-optimization/26359 (Over optimization of loop when using ↵Dorit Nuzman3-0/+29
-ftree-vectorize) PR tree-optimization/26359 * tree-ssa-alias.c (new_type_alias): Set fields for new tag. From-SVN: r111451
2006-02-25re PR middle-end/23673 (fold does not fold (a^b) != 0 to a != b)Roger Sayle4-0/+91
PR middle-end/23673 * fold-const.c (fold_binary) <EQ_EXPR>: Fold (X^Y) == 0 as X == Y and (X^Y) != 0 as X != Y. Fold (X^Y) == Y as X == 0, and some symmetry related transformations. Fold (X^C1) == C2 as X == (C1^C2). * gcc.dg/fold-eqxor-1.c: New test case. * gcc.dg/fold-eqxor-2.c: Likewise. * gcc.dg/fold-eqxor-3.c: Likewise. From-SVN: r111442
2006-02-25re PR fortran/23092 ([4.1 only] scalar mask for minval/maxval/sum/product)Thomas Koenig2-0/+18
2006-02-25 Thomas Koenig <Thomas.Koenig@online.de> PR fortran/23092 * trans-intrinsic.c (gfc_conv_intrinsic_arith): If the mask expression exists and has rank 0, enclose the generated loop in an "if (mask)". * (gfc_conv_intrinsic_minmaxloc): Likewise. 2006-02-25 Thomas Koenig <Thomas.Koenig@online.de> PR fortran/23092 * scalar_mask_1.f90: New test. From-SVN: r111438
2006-02-24Index: gcc/ChangeLogGeoffrey Keating4-0/+175
2006-02-24 Geoffrey Keating <geoffk@apple.com> * doc/tm.texi (Run-time Target): Document C_COMMON_OVERRIDE_OPTIONS. * doc/invoke.texi (C++ Dialect Options): Document -fno-use-cxa-get-exception-ptr. * configure.ac: Define DEFAULT_USE_CXA_ATEXIT to 2 not 1. * configure: Regenerate. * c.opt (fuse-cxa-get-exception-ptr): New. * c-opts.c (c_common_handle_option): Handle OPT_fuse_cxa_get_exception_ptr. * c-common.c (flag_use_cxa_atexit): Update documentation. (flag_use_cxa_get_exception_ptr): New. * c-common.h (flag_use_cxa_get_exception_ptr): New. * config/rs6000/darwin.h (SUBTARGET_OVERRIDE_OPTIONS): Improve documentation. (C_COMMON_OVERRIDE_OPTIONS): New. Index: gcc/testsuite/ChangeLog 2006-02-24 Geoffrey Keating <geoffk@apple.com> * g++.dg/eh/uncaught1.C: Add dg-options for ppc-darwin. * g++.dg/eh/uncaught2.C: New. * g++.dg/eh/uncaught3.C: New. Index: gcc/cp/ChangeLog 2006-02-24 Geoffrey Keating <geoffk@apple.com> * except.c (expand_start_catch_block): Handle flag_use_cxa_get_exception_ptr. From-SVN: r111427
2006-02-24re PR libfortran/26423 (Error on binary I/O for large array)Jerry DeLisle2-0/+28
2006-02-24 Jerry DeLisle <jvdelisle@gcc.gnu.org> PR libgfortran/26423 * gfortran.dg/read_many_1.f: New test. From-SVN: r111421
2006-02-24re PR fortran/24519 (gfortran slow because of incomplete dependency checking)Paul Thomas4-2/+101
2006-02-24 Paul Thomas <pault@gcc.gnu.org> PR fortran/24519 * dependency.c (gfc_is_same_range): Correct typo. (gfc_check_section_vs_section): Call gfc_is_same_range. PR fortran/25395 * trans-common.c (add_equivalences): Add a new flag that is set when an equivalence is seen that prevents more from being reset until the start of a new traversal of the list, thus ensuring completion of all the equivalences. 2006-02-24 Paul Thomas <pault@gcc.gnu.org> PR fortran/24519 * gfortran.dg/dependency_3.f90: New test. * gfortran.fortran-torture/execute/vect-3.f90: Remove two of the XFAILs. PR fortran/25395 * gfortran.dg/equiv_6.f90: New test. From-SVN: r111416
2006-02-23re PR tree-optimization/26425 (ice on valid C code with flag -Os)Jeff Law2-0/+13
PR tree-optimization/26425 * tree-vrp.c (vrp_visit_assignment): If the LHS's type has a NULL min/max, then assume its varying. * gcc.c-torture/compile/pr26425.c: New test. From-SVN: r111399
2006-02-23re PR middle-end/26412 (ICE with external arrays using OpenMP)Jakub Jelinek2-0/+23
PR middle-end/26412 * gimplify.c (omp_add_variable): Guard variable size decl test with DECL_SIZE (decl) check. * gcc.dg/gomp/pr26412.c: New test. From-SVN: r111391
2006-02-22re PR c++/26291 (Invalid ellipsis in operator not diagnosed)Volker Reichelt3-1/+19
PR c++/26291 * decl.c (grok_op_properties): Check for ellipsis in arguments of operators. * g++.dg/other/ellipsis1.C: New test. * g++.dg/parse/operator4.C: Adjust error marker. From-SVN: r111367
2006-02-22re PR target/25603 (Miscompiled FORTRAN program)H.J. Lu2-0/+65
2006-02-22 H.J. Lu <hongjiu.lu@intel.com> PR target/25603 * gfortran.dg/pr25603.f: New testcase. From-SVN: r111365
2006-02-22bf-spl1.c: Don't specify -m68000.Nathan Sidwell3-3/+7
* gcc.dg/bf-spl1.c: Don't specify -m68000. * g++.old-deja/g++.pt/static11.C: Xfail for m68k-elf From-SVN: r111360
2006-02-21* config/i386/darwin.h (DWARF2_FRAME_REG_OUT): New.Geoffrey Keating2-0/+30
From-SVN: r111344
2006-02-21re PR middle-end/26379 (ICE on vector shift RTL simplification)Jakub Jelinek2-0/+23
PR middle-end/26379 * combine.c (simplify_shift_const_1): Disable nested shifts optimization for vector shifts. * gcc.target/i386/mmx-7.c: New test. From-SVN: r111328
2006-02-21re PR tree-optimization/26361 (bootstrap failure on Alpha: xgcc runs out of ↵Roger Sayle2-0/+38
memory compiling libiberty/md5.c) PR tree-optimization/26361 * tree-vrp.c (extract_range_from_unary_expr): Handle NEGATE_EXPR of unsigned integer types. * gcc.dg/tree-ssa/vrp27.c: New test case. From-SVN: r111327
2006-02-20complex-3.c: Split out first part into ...Andrew Pinski3-15/+19
2006-02-20 Andrew Pinski <pinskia@physics.uc.edu> * gcc.dg/tree-ssa/complex-3.c: Split out first part into ... * gcc.dg/tree-ssa/complex-4.c: Here. From-SVN: r111309
2006-02-20re PR middle-end/19543 ([4.1 only] fortran LOGICAL*8 not consistently ↵Roger Sayle2-0/+27
distinguished from 32 bit integers) PR middle-end/19543 * varasm.c (compare_constant) <INTEGER_CST>: Integer constants are only equivalent if the have both the same mode and precision. * gfortran.dg/logical_1.f90: New test case. From-SVN: r111294
2006-02-19re PR libfortran/21303 (L edit descriptor without a width)François-Xavier Coudert1-0/+69
PR libfortran/21303 * gfortran.h (notification): New enumeration. (gfc_notification_std): Prototype for the new function. * error.c (gfc_notification_std): New function. * io.c (check_format): Handle the case of a L format descriptor without a width. * runtime/error.c (notification_std): New function. * libgfortran.h (notification): New enumeration. * io/io.h (notification_std): Prototype for the new function. * io/format.c (parse_format_list): Handle the case of a L format descriptor without a width. * gcc/testsuite/gfortran.dg/fmt_l.f90: New test. From-SVN: r111281
2006-02-19re PR middle-end/26334 (ICE in lhd_set_decl_assembler_name)Jakub Jelinek2-0/+6
PR middle-end/26334 * gcc.dg/20060218-1.c: Moved to... * gcc.target/i386/20060218-1.c: ... here. New test. From-SVN: r111279
2006-02-19re PR fortran/26201 (__convert_i4_i8 written to a module.)Erik Edelmann2-0/+21
fortran/ 2006-02-19 Erik Edelmann <eedelman@gcc.gnu.org> PR fortran/26201 * intrinsic.c (gfc_convert_type_warn): Call gfc_intrinsic_symbol() on the newly created symbol. testsuite/ 2006-02-19 Erik Edelmann <eedelman@gcc.gnu.org> PR fortran/26201 * gfortran.dg/convert_1.f90: New. From-SVN: r111270
2006-02-19re PR fortran/25054 (nonconstant bounds array cannot appear in a namelist)Paul Thomas3-0/+60
2005-02-19 Paul Thomas <pault@gcc.gnu.org> PR fortran/25054 * resolve.c (is_non_constant_shape_array): New function. (resolve_fl_variable): Remove code for the new function and call it. (resolve_fl_namelist): New function. Add test for namelist array with non-constant shape, using is_non_constant_shape_array. (resolve_symbol): Remove code for resolve_fl_namelist and call it. PR fortran/25089 * match.c (match_namelist): Increment the refs field of an accepted namelist object symbol. * resolve.c (resolve_fl_namelist): Test namelist objects for a conflict with contained or module procedures. 2005-02-19 Paul Thomas <pault@gcc.gnu.org> PR fortran/25054 * gfortran.dg/namelist_5.f90: New test. PR fortran/25089 * gfortran.dg/namelist_4.f90: New test. From-SVN: r111268
2006-02-18re PR tree-optimization/25680 (Store CCP does not understand REALPART_EXPR < ↵Andrew Pinski2-0/+20
COMPLEX_CST >) 2006-02-18 Andrew Pinski <pinskia@physics.uc.edu> PR tree-opt/25680 * tree-ssa-ccp.c (ccp_fold): Handle store CCP of REALPART_EXPR and IMAGPART_EXPR. 2006-02-18 Andrew Pinski <pinskia@physics.uc.edu> PR tree-opt/25680 * testsuite/gcc.dg/tree-ssa/complex-3.c: New test. From-SVN: r111251
2006-02-1820031106-1.c: Fix the final scan of the variable to take into account the ↵Andrew Pinski3-4/+11
variable name in... 2006-02-18 Andrew Pinski <pinskia@physics.uc.edu> * gcc.dg/tree-ssa/20031106-1.c: Fix the final scan of the variable to take into account the variable name in the function header. * gcc.dg/tree-ssa/20031106-2.c: Likewise. From-SVN: r111250
2006-02-18re PR middle-end/26334 (ICE in lhd_set_decl_assembler_name)Jakub Jelinek3-0/+39
PR middle-end/26334 * stmt.c (decl_overlaps_hard_reg_set_p): Use DECL_HARD_REGISTER instead of DECL_REGISTER. * gcc.c-torture/compile/20060217-1.c: New test. * gcc.dg/20060218-1.c: New test. From-SVN: r111247
2006-02-18re PR target/24837 (move dynamic linker names out of LINK_SPEC and into new ↵Joseph Myers3-0/+16
DYNAMIC_LINKER) PR target/24837 * config.gcc: Define UCLIBC_DEFAULT to 0 or 1. * opth-gen.awk: Handle Var and InverseMask together. * config/linux.opt (muclibc, mglibc): Use Var(linux_uclibc). * config/linux.h: Use #if not #ifdef for testing UCLIBC_DEFAULT. (TARGET_C99_FUNCTIONS): Test OPTION_GLIBC not TARGET_GLIBC. (CHOOSE_DYNAMIC_LINKER): Give an error for -mglibc and -muclibc used together. (UCLIBC_DYNAMIC_LINKER32, UCLIBC_DYNAMIC_LINKER64, LINUX_DYNAMIC_LINKER32, LINUX_DYNAMIC_LINKER64): Define. * config/alpha/linux-elf.h (GLIBC_DYNAMIC_LINKER, UCLIBC_DYNAMIC_LINKER, CHOOSE_DYNAMIC_LINKER, LINUX_DYNAMIC_LINKER): Define. (ELF_DYNAMIC_LINKER): Define to LINUX_DYNAMIC_LINKER. * config/alpha/linux.h (TARGET_C99_FUNCTIONS): Define to TARGET_GLIBC. * config/cris/linux.h (GLIBC_DYNAMIC_LINKER): Define. (CRIS_LINK_SUBTARGET_SPEC): Pass a -dynamic-linker option. * config/frv/linux.h (GLIBC_DYNAMIC_LINKER): Define. (LINK_SPEC): Use LINUX_DYNAMIC_LINKER. (TARGET_C99_FUNCTIONS): Don't define. * config/i386/linux.h (DYNAMIC_LINKER): Rename to GLIBC_DYNAMIC_LINKER. (SUBTARGET_EXTRA_SPECS): Use LINUX_DYNAMIC_LINKER. * config/i386/linux64.h (GLIBC_DYNAMIC_LINKER32, GLIBC_DYNAMIC_LINKER64): Define. (LINK_SPEC): Use LINUX_DYNAMIC_LINKER32 and LINUX_DYNAMIC_LINKER64. * config/ia64/linux.h (GLIBC_DYNAMIC_LINKER): Define. (LINK_SPEC): Use LINUX_DYNAMIC_LINKER. * config/m32r/linux.h (GLIBC_DYNAMIC_LINKE): Define. (LINK_SPEC): Use LINUX_DYNAMIC_LINKER. * config/m68k/linux.h (GLIBC_DYNAMIC_LINKER): Define. (LINK_SPEC): Use LINUX_DYNAMIC_LINKER. * config/mips/linux64.h (GLIBC_DYNAMIC_LINKER32, GLIBC_DYNAMIC_LINKER64, GLIBC_DYNAMIC_LINKERN32, UCLIBC_DYNAMIC_LINKERN32, LINUX_DYNAMIC_LINKERN32): Define. (LINK_SPEC): Use LINUX_DYNAMIC_LINKERN32, LINUX_DYNAMIC_LINKER64 and LINUX_DYNAMIC_LINKER32. * config/mn10300/linux.h (GLIBC_DYNAMIC_LINKER): Define. (LINK_SPEC): Use LINUX_DYNAMIC_LINKER. * config/pa/pa-linux.h (GLIBC_DYNAMIC_LINKER): Define. (LINK_SPEC): Use LINUX_DYNAMIC_LINKER. * config/rs6000/linux.h (TARGET_C99_FUNCTIONS): Define to TARGET_GLIBC. * config/rs6000/linux64.h (TARGET_C99_FUNCTIONS): Likewise. (GLIBC_DYNAMIC_LINKER32, GLIBC_DYNAMIC_LINKER64, UCLIBC_DYNAMIC_LINKER32, UCLIBC_DYNAMIC_LINKER64, CHOOSE_DYNAMIC_LINKER, CHOOSE_DYNAMIC_LINKER, LINUX_DYNAMIC_LINKER32, LINUX_DYNAMIC_LINKER64): Define. (LINK_OS_LINUX_SPEC32): Use LINUX_DYNAMIC_LINKER32. (LINK_OS_LINUX_SPEC64): Use LINUX_DYNAMIC_LINKER64. * config/rs6000/sysv4.h (GLIBC_DYNAMIC_LINKER, UCLIBC_DYNAMIC_LINKER, CHOOSE_DYNAMIC_LINKER, LINUX_DYNAMIC_LINKER): Define. (LINK_OS_LINUX_SPEC): Use LINUX_DYNAMIC_LINKE. * config/s390/linux.h (GLIBC_DYNAMIC_LINKER32, GLIBC_DYNAMIC_LINKER64): Define. (LINK_SPEC): Use LINUX_DYNAMIC_LINKER32 and LINUX_DYNAMIC_LINKER64. * config/sh/linux.h (GLIBC_DYNAMIC_LINKER): Define. (SUBTARGET_LINK_SPEC): Use LINUX_DYNAMIC_LINKER. * config/sparc/linux.h (GLIBC_DYNAMIC_LINKER, UCLIBC_DYNAMIC_LINKER, CHOOSE_DYNAMIC_LINKER, LINUX_DYNAMIC_LINKER): Define. (LINK_SPEC): Use LINUX_DYNAMIC_LINKER. (TARGET_C99_FUNCTIONS): Define to TARGET_GLIBC. * config/sparc/linux64.h (GLIBC_DYNAMIC_LINKER32, GLIBC_DYNAMIC_LINKER64, UCLIBC_DYNAMIC_LINKER32, UCLIBC_DYNAMIC_LINKER64, CHOOSE_DYNAMIC_LINKER, LINUX_DYNAMIC_LINKER32, LINUX_DYNAMIC_LINKER64): Define. (LINK_ARCH32_SPEC): Use LINUX_DYNAMIC_LINKER32. (LINK_ARCH64_SPEC, LINK_SPEC): Use LINUX_DYNAMIC_LINKER64. (TARGET_C99_FUNCTIONS): Define to TARGET_GLIBC. * config/xtensa/linux.h (GLIBC_DYNAMIC_LINKER): Define. (LINK_SPEC): Use LINUX_DYNAMIC_LINKER. * doc/invoke.texi (-muclibc): Remove caveat about supported targets. testsuite: * gcc.dg/glibc-uclibc-1.c, gcc.dg/glibc-uclibc-2.c: New tests. From-SVN: r111235
2006-02-18cpp.texi (__TIMESTAMP__): Document.Grigory Zagorodnev1-0/+5
2006-02-17 Grigory Zagorodnev <grigory_zagorodnev@linux.intel.com> gcc/ChangeLog: * doc/cpp.texi (__TIMESTAMP__): Document. libcpp/ChangeLog: * macro.c (_cpp_builtin_macro_text): Handle BT_TIMESTAMP. * files.c (_cpp_get_file_stat): New function. * include/cpplib.h (builtin_type): Add BT_TIMESTAMP. * init.c (builtin_array): Add support for __TIMESTAMP__/BT_TIMESTAMP. * internal.h (_cpp_get_file_stat): Prototype. (struct cpp_buffer): Add timestamp. gcc/testsuite/ChangeLog: * gcc.dg/cpp/undef3.c: New test. * gcc.dg/cpp/trad/builtins2.c: New test. From-SVN: r111232
2006-02-18re PR c++/26266 (Trouble with static const data members in template classes)Mark Mitchell2-1/+2
PR c++/26266 * g++.dg/template/static22.C: New test. * g++.dg/template/static23.C: New test. * g++.dg/template/static24.C: New test. * g++.dg/template/non-dependent13.C: New test. * g++.dg/init/member1.C: Tweak error markers. From-SVN: r111230
2006-02-18re PR c++/26266 (Trouble with static const data members in template classes)Mark Mitchell5-0/+60
PR c++/26266 * cp-tree.h (cp_finish_decl): Adjust declaration. (grokbitfield): Likewise. (finish_static_data_member_decl): Likewise. * init.c (constant_value_1): Ensure processing_template_decl when folding non-dependent initializers for static data members of dependent types. Return error_mark_node for erroneous initailizers. * class.c (get_vtable_decl): Use finish_decl, not cp_finish_decl. * decl.c (cp_make_fname_decl): Adjust call to cp_finish_decl. (cp_finish_decl): Add init_const_expr_p parameter. Set DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P here. (finish_decl): Adjust call to cp_finish_decl. (compute_array_index_type): Robustify. (start_method): Use finish_decl, not cp_finish_decl. * rtti.c (emit_tinfo_decl): Likewise. * except.c (initialize_handler_parm): Adjust call to cp_finish_decl. (expand_start_catch_block): Likewise. * cvt.c (build_up_reference): Adjust call to cp_finish_decl. * pt.c (instantiate_class_template): Adjust call to finish_static_data_member_decl. (tsubst_expr): Use finish_decl, not cp_finish_decl. (instantiate_decl): Adjust call to cp_finish_decl. * name-lookup.c (pushdecl_top_level_1): Use finish_decl, not cp_finish_decl. * decl2.c (finish_static_data_member_decl): Add init_const_expr_p parameter. (grokfield): Likewise. * parser.c (cp_parser_condition): Check for constant initializers. (cp_parser_init_declarator): Adjust calls to grokfield and cp_finish_decl. Don't set DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P here. (cp_parser_member_declaration): Likewise. (cp_parser_objc_class_ivars): Likewise. PR c++/26266 * g++.dg/template/static22.C: New test. * g++.dg/template/static23.C: New test. * g++.dg/template/static24.C: New test. * g++.dg/template/non-dependent13.C: New test. From-SVN: r111229
2006-02-17re PR target/26255 (internal compiler error: in ↵John David Anglin2-0/+36
reload_cse_simplify_operands, at postreload.c:391) PR target/26255 * gcc.c-torture/compile/pr26255.c: New test case. From-SVN: r111213
2006-02-17where_10.f90: New test case.Roger Sayle8-0/+144
* gfortran.fortran-torture/execute/where_10.f90: New test case. * gfortran.fortran-torture/execute/where_11.f90: Likewise. * gfortran.fortran-torture/execute/where_12.f90: Likewise. * gfortran.fortran-torture/execute/where_13.f90: Likewise. * gfortran.fortran-torture/execute/where_14.f90: Likewise. * gfortran.fortran-torture/execute/where_15.f90: Likewise. * gfortran.fortran-torture/execute/where_16.f90: Likewise. From-SVN: r111204
2006-02-16tree-vrp.c (set_value_range_to_nonnegative): New function.Jeff Law3-6/+30
* tree-vrp.c (set_value_range_to_nonnegative): New function. (vrp_expr_computes_nonnegative, ssa_name_nonnegative_p): Likewise. (ssa_name_nonzero_p): Likewise. (get_value_range): Return NULL if VRP is not running. (extract_range_from_expr): Fallback to tree_expr_XXX_p if VRP routines do not discover a range. (vrp_finalize): Clear VR_VALUE to indicate VRP is not running. * tree.h (ssa_name_nonzero_p, ssa_name_nonnegative_p): Prototype. * fold-const.c (tree_expr_nonzero_p): For SSA_NAMEs, query VRP. (tree_expr_nonnegative_p): Similarly. * tree-ssa-dom.c (nonzero_vars, nonzero_vars_stack): Remove. (restore_nonzero_vars_to_original_value): Remove. (unsafe_associative_fp_binop): Remove. (tree_ssa_dominator_optimize): Remove initialization and finalization of nonzero_vars and nonzero_vars_stack. (dom_opt_initialize_block): No longer push marker on nonzero_vars_stack. (dom_opt_finalize_block): No longer call restore_nonzero_vars_to_original_value. (record_equivalences_from_phis): No longer look for nonzero PHI arguments. (cprop_into_successor_phis): No longer propagate nonzero property into PHI arguments. Lose unused argument. Caller updated. (record_equivalences_from_stmt): No longer record nonzero values for SSA_NAMEs. (lookup_avail_expr): No longer use nonzero_vars. * gcc.dg/tree-ssa/vrp24.c: Update expected output. * gcc.dg/tree-ssa/vrp26.c: New test. From-SVN: r111175
2006-02-16re PR target/20353 (uclibc does not provide C99 math functions)Joseph Myers2-3/+11
gcc: PR target/20353 PR target/24578 PR target/24837 * config/linux.opt: New file. * config/linux.h (CHOOSE_DYNAMIC_LINKER, UCLIBC_DYNAMIC_LINKER, LINUX_DYNAMIC_LINKER): Define. (TARGET_C99_FUNCTIONS): Define depending on TARGET_GLIBC. * config.gcc (*-*-linux*): Define extra_options. (*-*-*uclibc*): Define UCLIBC_DEFAULT. (arm*-*-linux-gnueabi): Change to arm*-*-linux-*eabi. * config/arm/linux-eabi.h (LINUX_TARGET_INTERPRETER): Change to GLIBC_DYNAMIC_LINKER. * config/arm/linux-elf.h (LINUX_TARGET_INTERPRETER): Likewise. (LINUX_TARGET_LINK_SPEC): Use LINUX_DYNAMIC_LINKER. * config/mips/linux.h (GLIBC_DYNAMIC_LINKER): Define. (LINK_SPEC): Use LINUX_DYNAMIC_LINKER. * doc/invoke.texi (GNU/Linux Options): New section. gcc/testsuite: * gcc.dg/builtins-config.h (HAVE_C99_RUNTIME): Don't define if __UCLIBC__ is defined. libstdc++-v3: PR libstdc++/14939 * config/os/uclibc/ctype_base.h, config/os/uclibc/ctype_inline.h, config/os/uclibc/ctype_noninline.h, config/os/uclibc/os_defines.h: New. * acinclude.m4 (GLIBCXX_CONFIGURE): Test whether using uClibc. * configure.host: Use os/uclibc for uClibc. * crossconfig.m4 (*-linux*): Use link tests. Don't hardcode presence of math functions. * configure: Regenerate. From-SVN: r111160
2006-02-16re PR fortran/26224 (ICE in C$OMP SINGLE / END SINGLE COPYPRIVATE( ) block)Jakub Jelinek2-0/+13
PR fortran/26224 * parse.c (parse_omp_do, parse_omp_structured_block): Call gfc_commit_symbols and gfc_warning_check. * gfortran.dg/gomp/pr26224.f: New test. From-SVN: r111153
2006-02-16re PR testsuite/25918 (gcc.dg/vect/vect-reduc-dot-s16.c scan-tree-dump-times ↵Victor Kaplansky14-222/+486
vectorized 1 loops 1 and gcc.dg/vect/vect-reduc-pattern-2.c scan-tree-dump-times vectorized 2 loops 1 fail) testsuite/ 2006-02-16 Victor Kaplansky <victork@il.ibm.com> PR tree-opt/25918 * lib/target-supports.exp (check_effective_target_vect_short_mult): New. (check_effective_target_vect_char_mult): New. (check_effective_target_vect_widen_sum_qi_to_si): New. (check_effective_target_vect_widen_sum_qi_to_hi): New. (check_effective_target_vect_widen_sum_hi_to_si): New. * gcc.dg/vect/vect-reduc-dot-s16.c: Remove, split into vect-reduc-dot-s16a.c and vect-reduc-dot-s16b.c * vect-reduc-dot-s16a.c: New, split from vect-reduc-dot-s16.c. * vect-reduc-dot-s16b.c: New, split from vect-reduc-dot-s16.c. * gcc.dg/vect/vect-reduc-pattern-2.c: Remove, split into vect-reduc-pattern-2a.c, vect-reduc-pattern-2b.c and vect-reduc-pattern-2c.c * gcc.dg/vect/vect-reduc-pattern-1.c: Remove, split into vect-reduc-pattern-1a.c, vect-reduc-pattern-1b.c and vect-reduc-pattern-1c.c From-SVN: r111135
2006-02-16Remove test which is invalid Ada 2005.Arnaud Charlet1-17/+0
From-SVN: r111132
2006-02-16re PR fortran/24557 (ICE: PRINTing function result of size depending on ↵Paul Thomas2-0/+20
assumed length CHARACTER dummy) 2005-02-16 Paul Thomas <pault@gcc.gnu.org> PR fortran/24557 * trans-expr.c (gfc_add_interface_mapping): Use the actual argument for character(*) arrays, rather than casting to the type and kind parameters of the formal argument. 2005-02-16 Paul Thomas <pault@gcc.gnu.org> PR fortran/24557 * gfortran.dg/assumed_charlen_needed_1.f90: New test. From-SVN: r111130
2006-02-15re PR fortran/26054 (Gratuitous warning about Fortran 2003 features w/o ↵Toon Moene14-24/+41
-std=...) 2006-02-15 Toon Moene <toon@moene.indiv.nluug.nl> PR fortran/26054 * fortran/options.c: Do not warn for Fortran 2003 features by default. * testsuite/gfortran.dg/enum_8.f90: Remove check for warning. * testsuite/gfortran.dg/iomsg_1.f90: Ditto. * testsuite/gfortran.dg/enum_1.f90: Ditto. * testsuite/gfortran.dg/enum_9.f90: Ditto. * testsuite/gfortran.dg/enum_2.f90: Ditto. * testsuite/gfortran.dg/enum_10.f90: Ditto. * testsuite/gfortran.dg/enum_3.f90: Ditto. * testsuite/gfortran.dg/flush_1.f90: Ditto. * testsuite/gfortran.dg/enum_4.f90: Ditto. * testsuite/gfortran.dg/array_constructor_1.f90: Ditto. * testsuite/gfortran.dg/enum_5.f90: Ditto. * testsuite/gfortran.dg/enum_6.f90: Ditto. * testsuite/gfortran.dg/enum_7.f90: Ditto. From-SVN: r111117
2006-02-15re PR middle-end/26300 (ICE in trunc_int_for_mode)Jakub Jelinek2-0/+47
PR middle-end/26300 * combine.c (make_extraction): Bail out if ORIG_POS is negative. * gcc.c-torture/compile/20060215-1.c: New test. From-SVN: r111116
2006-02-14re PR middle-end/23670 (Fold does not fold (a|b)&b to b likewise for (a&b) | ↵Roger Sayle2-0/+57
b to b) PR middle-end/23670 * fold-const.c (fold_binary) <BIT_IOR_EXPR>: Optimize (X&Y)|Y into (X,Y) and the corresponding symmetry related transformations. (fold_binary) <BIT_AND_EXPR>: Likewise, optimize (X|Y)&Y into (X,Y) and its symmetry related transformations. * gcc.dg/tree-ssa/andor-2.c: New test case. From-SVN: r110997
2006-02-14re PR fortran/25045 ([4.1 only] DIM argument of PRODUCT is not optional)Thomas Koenig2-0/+15
2006-02-14 Thomas Koenig <Thomas.Koenig@online.de> PR fortran/25045 * check.c (dim_check): Perform all checks if dim is optional. (gfc_check_minloc_maxloc): Use dim_check and dim_rank_check to check dim argument. (check_reduction): Likewise. 2006-02-14 Thomas Koenig <Thomas.Koenig@online.de> PR fortran/25045 * optional_dim.f90: New test. From-SVN: r110994
2006-02-14re PR fortran/26277 (false warning about unused label for a warning used in ↵Tobias Schlüter2-0/+13
err=) fortran/ PR fortran/26277 * io.c (match_ltag): Mark label as referenced. testsuite/ PR fortran/26277 * gfortran.dg/label_4.f90: New. From-SVN: r110993
2006-02-14re PR fortran/25162 (Issue with OpenMP COPYIN and gfortran)Jakub Jelinek75-0/+1607
gcc/fortran/ 2006-02-14 Jakub Jelinek <jakub@redhat.com> Richard Henderson <rth@redhat.com> Diego Novillo <dnovillo@redhat.com> * invoke.texi: Document -fopenmp. * gfortran.texi (Extensions): Document OpenMP. Backport from gomp-20050608-branch * trans-openmp.c: Call build_omp_clause instead of make_node when creating OMP_CLAUSE_* trees. (gfc_trans_omp_reduction_list): Remove argument 'code'. Adjust all callers. * trans.h (build4_v): Define. * trans-openmp.c: Call build4_v to create OMP_PARALLEL nodes. Call build3_v to create OMP_SECTIONS nodes. PR fortran/25162 * openmp.c (gfc_match_omp_variable_list): Call gfc_set_sym_referenced on all symbols added to the variable list. * openmp.c (gfc_match_omp_clauses): Fix check for non-INTRINSIC procedure symbol in REDUCTION. * trans-openmp.c (gfc_trans_omp_array_reduction): Use gfc_add for MINUS_EXPR OMP_CLAUSE_REDUCTION_CODE. * trans-openmp.c (gfc_trans_omp_do): Add PBLOCK argument. If PBLOCK is non-NULL, evaluate INIT/COND/INCR and chunk size expressions in that statement block. (gfc_trans_omp_parallel_do): Pass non-NULL PBLOCK to gfc_trans_omp_do for non-ordered non-static combined loops. (gfc_trans_omp_directive): Pass NULL PBLOCK to gfc_trans_omp_do. * openmp.c: Include target.h and toplev.h. (gfc_match_omp_threadprivate): Emit diagnostic if target does not support TLS. * Make-lang.in (fortran/openmp.o): Add dependencies on target.h and toplev.h. * trans-decl.c (gfc_get_fake_result_decl): Set GFC_DECL_RESULT. * trans-openmp.c (gfc_omp_privatize_by_reference): Make DECL_ARTIFICIAL vars predetermined shared except GFC_DECL_RESULT. (gfc_omp_disregard_value_expr): Handle GFC_DECL_RESULT. (gfc_trans_omp_variable): New function. (gfc_trans_omp_variable_list, gfc_trans_omp_reduction_list): Use it. * trans.h (GFC_DECL_RESULT): Define. * trans-openmp.c (gfc_omp_firstprivatize_type_sizes): New function. * f95-lang.c (LANG_HOOKS_OMP_FIRSTPRIVATIZE_TYPE_SIZES): Define. * trans.h (gfc_omp_firstprivatize_type_sizes): New prototype. * trans-openmp.c (gfc_omp_privatize_by_reference): Return true if a pointer has GFC_DECL_SAVED_DESCRIPTOR set. (gfc_trans_omp_array_reduction, gfc_trans_omp_reduction_list): New functions. (gfc_trans_omp_clauses): Add WHERE argument. Call gfc_trans_omp_reduction_list rather than gfc_trans_omp_variable_list for reductions. (gfc_trans_omp_do, gfc_trans_omp_parallel, gfc_trans_omp_parallel_do, gfc_trans_omp_parallel_sections, gfc_trans_omp_parallel_workshare, gfc_trans_omp_sections, gfc_trans_omp_single): Adjust gfc_trans_omp_clauses callers. * openmp.c (omp_current_do_code): New var. (gfc_resolve_omp_do_blocks): New function. (gfc_resolve_omp_parallel_blocks): Call it. (gfc_resolve_do_iterator): Add CODE argument. Don't propagate predetermination if argument is !$omp do or !$omp parallel do iteration variable. * resolve.c (resolve_code): Call gfc_resolve_omp_do_blocks for EXEC_OMP_DO. Adjust gfc_resolve_do_iterator caller. * fortran.h (gfc_resolve_omp_do_blocks): New prototype. (gfc_resolve_do_iterator): Add CODE argument. * trans.h (gfc_omp_predetermined_sharing, gfc_omp_disregard_value_expr, gfc_omp_private_debug_clause): New prototypes. (GFC_DECL_COMMON_OR_EQUIV, GFC_DECL_CRAY_POINTEE): Define. * trans-openmp.c (gfc_omp_predetermined_sharing, gfc_omp_disregard_value_expr, gfc_omp_private_debug_clause): New functions. * trans-common.c (build_equiv_decl, build_common_decl, create_common): Set GFC_DECL_COMMON_OR_EQUIV flag on the decls. * trans-decl.c (gfc_finish_cray_pointee): Set GFC_DECL_CRAY_POINTEE on the decl. * f95-lang.c (LANG_HOOKS_OMP_PREDETERMINED_SHARING, LANG_HOOKS_OMP_DISREGARD_VALUE_EXPR, LANG_HOOKS_OMP_PRIVATE_DEBUG_CLAUSE): Define. * openmp.c (resolve_omp_clauses): Remove extraneous comma. * symbol.c (check_conflict): Add conflict between cray_pointee and threadprivate. * openmp.c (gfc_match_omp_threadprivate): Fail if gfc_add_threadprivate returned FAILURE. (resolve_omp_clauses): Diagnose Cray pointees in SHARED, {,FIRST,LAST}PRIVATE and REDUCTION clauses and Cray pointers in {FIRST,LAST}PRIVATE and REDUCTION clauses. * resolve.c (omp_workshare_flag): New variable. (resolve_function): Diagnose use of non-ELEMENTAL user defined function in WORKSHARE construct. (resolve_code): Cleanup forall_save use. Make sure omp_workshare_flag is set to correct value in different contexts. * openmp.c (resolve_omp_clauses): Replace %s with '%s' when printing variable name. (resolve_omp_atomic): Likewise. PR fortran/24493 * scanner.c (skip_free_comments): Set at_bol at the beginning of the loop, not before it. (skip_fixed_comments): Handle ! comments in the middle of line here as well. (gfc_skip_comments): Use skip_fixed_comments for FIXED_FORM even if not at BOL. (gfc_next_char_literal): Fix expected canonicalized *$omp string. * trans-openmp.c (gfc_trans_omp_do): Use make_node and explicit initialization to build OMP_FOR instead of build. * trans-decl.c (gfc_gimplify_function): Invoke diagnose_omp_structured_block_errors. * trans-openmp.c (gfc_trans_omp_master): Use OMP_MASTER. (gfc_trans_omp_ordered): Use OMP_ORDERED. * gfortran.h (gfc_resolve_do_iterator, gfc_resolve_blocks, gfc_resolve_omp_parallel_blocks): New prototypes. * resolve.c (resolve_blocks): Renamed to... (gfc_resolve_blocks): ... this. Remove static. (gfc_resolve_forall): Adjust caller. (resolve_code): Only call gfc_resolve_blocks if code->block != 0 and not for EXEC_OMP_PARALLEL* directives. Call gfc_resolve_omp_parallel_blocks for EXEC_OMP_PARALLEL* directives. Call gfc_resolve_do_iterator if resolved successfully EXEC_DO iterator. * openmp.c: Include pointer-set.h. (omp_current_ctx): New variable. (gfc_resolve_omp_parallel_blocks, gfc_resolve_do_iterator): New functions. * Make-lang.in (fortran/openmp.o): Depend on pointer-set.h. * openmp.c (gfc_match_omp_clauses): For max/min/iand/ior/ieor, look up symbol if it exists, use its name instead and, if it is not INTRINSIC, issue diagnostics. * parse.c (parse_omp_do): Handle implied end do properly. (parse_executable): If parse_omp_do returned ST_IMPLIED_ENDDO, return it instead of continuing. * trans-openmp.c (gfc_trans_omp_critical): Update for changed operand numbering. (gfc_trans_omp_do, gfc_trans_omp_parallel, gfc_trans_omp_parallel_do, gfc_trans_omp_parallel_sections, gfc_trans_omp_parallel_workshare, gfc_trans_omp_sections, gfc_trans_omp_single): Likewise. * trans.h (gfc_omp_privatize_by_reference): New prototype. * f95-lang.c (LANG_HOOKS_OMP_PRIVATIZE_BY_REFERENCE): Redefine to gfc_omp_privatize_by_reference. * trans-openmp.c (gfc_omp_privatize_by_reference): New function. * trans-stmt.h (gfc_trans_omp_directive): Add comment. * openmp.c (gfc_match_omp_variable_list): Add ALLOW_COMMON argument. Disallow COMMON matching if it is set. (gfc_match_omp_clauses, gfc_match_omp_flush): Adjust all callers. (resolve_omp_clauses): Show locus in error messages. Check that variable types in reduction clauses are appropriate for reduction operators. * resolve.c (resolve_symbol): Don't error if a threadprivate module variable isn't SAVEd. * trans-openmp.c (gfc_trans_omp_do): Put count into BLOCK, not BODY. Fix typo in condition. Fix DOVAR initialization. * openmp.c (gfc_match_omp_clauses): Match min/iand/ior/ieor rather than .min. etc. * trans-openmpc.c (omp_not_yet): Remove. (gfc_trans_omp_parallel_do): Keep listprivate clause on parallel. Force creation of BIND_EXPR around the workshare construct. (gfc_trans_omp_parallel_sections): Likewise. (gfc_trans_omp_parallel_workshare): Likewise. * types.def (BT_I16, BT_FN_I16_VPTR_I16, BT_FN_BOOL_VPTR_I16_I16, BT_FN_I16_VPTR_I16_I16): Add. * trans-openmp.c (gfc_trans_omp_clauses): Create OMP_CLAUSE_DEFAULT. (gfc_trans_omp_code): New function. (gfc_trans_omp_do): Use it, remove omp_not_yet uses. (gfc_trans_omp_parallel, gfc_trans_omp_single): Likewise. (gfc_trans_omp_sections): Likewise. Only treat empty last section specially if lastprivate clause is present. * f95-lang.c (gfc_init_builtin_functions): Create BUILT_IN_TRAP builtin. * trans-openmp.c (gfc_trans_omp_variable_list): Update for OMP_CLAUSE_DECL name change. (gfc_trans_omp_do): Likewise. * trans-openmp.c (gfc_trans_omp_clauses): Create OMP_CLAUSE_REDUCTION clauses. (gfc_trans_omp_atomic): Build OMP_ATOMIC instead of expanding sync builtins directly. (gfc_trans_omp_single): Build OMP_SINGLE statement. * trans-openmp.c (gfc_trans_add_clause): New. (gfc_trans_omp_variable_list): Take a tree code and build the clause node here. Link it to the head of a list. (gfc_trans_omp_clauses): Update to match. (gfc_trans_omp_do): Use gfc_trans_add_clause. * trans-openmp.c (gfc_trans_omp_clauses): Change second argument to gfc_omp_clauses *. Use gfc_evaluate_now instead of creating temporaries by hand. (gfc_trans_omp_atomic, gfc_trans_omp_critical): Use buildN_v macros. (gfc_trans_omp_do): New function. (gfc_trans_omp_master): Dont' check for gfc_trans_code returning NULL. (gfc_trans_omp_parallel): Adjust gfc_trans_omp_clauses caller. Use buildN_v macros. (gfc_trans_omp_parallel_do, gfc_trans_omp_parallel_sections, gfc_trans_omp_parallel_workshare, gfc_trans_omp_sections, gfc_trans_omp_single, gfc_trans_omp_workshare): New functions. (gfc_trans_omp_directive): Use them. * parse.c (parse_omp_do): Allow new_st.op == EXEC_NOP. * openmp.c (resolve_omp_clauses): Check for list items present in multiple clauses. (resolve_omp_do): Check that iteration variable is not THREADPRIVATE and is not present in any clause variable lists other than PRIVATE or LASTPRIVATE. * gfortran.h (symbol_attribute): Add threadprivate bit. (gfc_common_head): Add threadprivate member, change use_assoc and saved into char to save space. (gfc_add_threadprivate): New prototype. * symbol.c (check_conflict): Handle threadprivate. (gfc_add_threadprivate): New function. (gfc_copy_attr): Copy threadprivate. * trans-openmp.c (gfc_trans_omp_clauses): Avoid creating a temporary if IF or NUM_THREADS is constant. Create OMP_CLAUSE_SCHEDULE and OMP_CLAUSE_ORDERED. * resolve.c (resolve_symbol): Complain if a THREADPRIVATE symbol outside a module and not in COMMON has is not SAVEd. (resolve_equivalence): Ensure THREADPRIVATE objects don't get EQUIVALENCEd. * trans-common.c: Include target.h and rtl.h. (build_common_decl): Set DECL_TLS_MODEL if THREADPRIVATE. * trans-decl.c: Include rtl.h. (gfc_finish_var_decl): Set DECL_TLS_MODEL if THREADPRIVATE. * dump-parse-tree.c (gfc_show_attr): Handle THREADPRIVATE. * Make-lang.in (fortran/trans-decl.o): Depend on $(RTL_H). (fortran/trans-common.o): Depend on $(RTL_H) and $(TARGET_H). * openmp.c (gfc_match_omp_variable_list): Ensure COMMON block is from current namespace. (gfc_match_omp_threadprivate): Rewrite. (resolve_omp_clauses): Check some clause restrictions. * module.c (ab_attribute): Add AB_THREADPRIVATE. (attr_bits): Add THREADPRIVATE. (mio_symbol_attribute, mio_symbol_attribute): Handle threadprivate. (load_commons, write_common, write_blank_common): Adjust for type change of saved, store/load threadprivate bit from the integer as well. * types.def (BT_FN_UINT_UINT): New. (BT_FN_VOID_UINT_UINT): Remove. * trans-openmp.c (gfc_trans_omp_clauses, gfc_trans_omp_barrier, gfc_trans_omp_critical, gfc_trans_omp_flush, gfc_trans_omp_master, gfc_trans_omp_ordered, gfc_trans_omp_parallel): New functions. (gfc_trans_omp_directive): Use them. * openmp.c (expr_references_sym): Add SE argument, don't look into SE tree. (is_conversion): New function. (resolve_omp_atomic): Adjust expr_references_sym callers. Handle promoted expressions. * trans-openmp.c (gfc_trans_omp_atomic): New function. (gfc_trans_omp_directive): Call it. * f95-lang.c (builtin_type_for_size): New function. (gfc_init_builtin_functions): Initialize synchronization and OpenMP builtins. * types.def: New file. * Make-lang.in (f95-lang.o): Depend on $(BUILTINS_DEF) and fortran/types.def. * trans-openmp.c: Rename GOMP_* tree codes into OMP_*. * dump-parse-tree.c (show_symtree): Don't crash if ns->proc_name is NULL. * dump-parse-tree.c (gfc_show_namelist, gfc_show_omp_node): New functions. (gfc_show_code_node): Call gfc_show_omp_node for EXEC_OMP_* nodes. * parse.c (parse_omp_do): Call pop_state before next_statement. * openmp.c (expr_references_sym, resolve_omp_atomic, resolve_omp_do): New functions. (gfc_resolve_omp_directive): Call them. * match.c (match_exit_cycle): Issue error if EXIT or CYCLE statement leaves an OpenMP structured block or if EXIT terminates !$omp do loop. * Make-lang.in (F95_PARSER_OBJS): Add fortran/openmp.o. (F95_OBJS): Add fortran/trans-openmp.o. (fortran/trans-openmp.o): Depend on $(GFORTRAN_TRANS_DEPS). * lang.opt: Add -fopenmp option. * options.c (gfc_init_options): Initialize it. (gfc_handle_option): Handle it. * gfortran.h (ST_OMP_ATOMIC, ST_OMP_BARRIER, ST_OMP_CRITICAL, ST_OMP_END_CRITICAL, ST_OMP_END_DO, ST_OMP_END_MASTER, ST_OMP_END_ORDERED, ST_OMP_END_PARALLEL, ST_OMP_END_PARALLEL_DO, ST_OMP_END_PARALLEL_SECTIONS, ST_OMP_END_PARALLEL_WORKSHARE, ST_OMP_END_SECTIONS, ST_OMP_END_SINGLE, ST_OMP_END_WORKSHARE, ST_OMP_DO, ST_OMP_FLUSH, ST_OMP_MASTER, ST_OMP_ORDERED, ST_OMP_PARALLEL, ST_OMP_PARALLEL_DO, ST_OMP_PARALLEL_SECTIONS, ST_OMP_PARALLEL_WORKSHARE, ST_OMP_SECTIONS, ST_OMP_SECTION, ST_OMP_SINGLE, ST_OMP_THREADPRIVATE, ST_OMP_WORKSHARE): New statement codes. (OMP_LIST_PRIVATE, OMP_LIST_FIRSTPRIVATE, OMP_LIST_LASTPRIVATE, OMP_LIST_COPYPRIVATE, OMP_LIST_SHARED, OMP_LIST_COPYIN, OMP_LIST_PLUS, OMP_LIST_REDUCTION_FIRST, OMP_LIST_MULT, OMP_LIST_SUB, OMP_LIST_AND, OMP_LIST_OR, OMP_LIST_EQV, OMP_LIST_NEQV, OMP_LIST_MAX, OMP_LIST_MIN, OMP_LIST_IAND, OMP_LIST_IOR, OMP_LIST_IEOR, OMP_LIST_REDUCTION_LAST, OMP_LIST_NUM): New OpenMP variable list types. (gfc_omp_clauses): New typedef. (gfc_get_omp_clauses): Define. (EXEC_OMP_CRITICAL, EXEC_OMP_DO, EXEC_OMP_FLUSH, EXEC_OMP_MASTER, EXEC_OMP_ORDERED, EXEC_OMP_PARALLEL, EXEC_OMP_PARALLEL_DO, EXEC_OMP_PARALLEL_SECTIONS, EXEC_OMP_PARALLEL_WORKSHARE, EXEC_OMP_SECTIONS, EXEC_OMP_SINGLE, EXEC_OMP_WORKSHARE, EXEC_OMP_ATOMIC, EXEC_OMP_BARRIER, EXEC_OMP_END_NOWAIT, EXEC_OMP_END_SINGLE): New OpenMP gfc_exec_op codes. (struct gfc_code): Add omp_clauses, omp_name, omp_namelist and omp_bool fields to ext union. (flag_openmp): Declare. (gfc_free_omp_clauses, gfc_resolve_omp_directive): New prototypes. * scanner.c (openmp_flag, openmp_locus): New variables. (skip_free_comments, skip_fixed_comments, gfc_next_char_literal): Handle OpenMP directive lines and conditional compilation magic comments. * parse.h (COMP_OMP_STRUCTURED_BLOCK): New compile state. * parse.c (decode_omp_directive, parse_omp_do, parse_omp_atomic, parse_omp_structured_block): New functions. (next_free, next_fixed): Parse OpenMP directives. (case_executable, case_exec_markers, case_decl): Add ST_OMP_* codes. (gfc_ascii_statement): Handle ST_OMP_* codes. (parse_executable): Rearrange the loop slightly, so that parse_omp_do can return next_statement. * match.h (gfc_match_omp_eos, gfc_match_omp_atomic, gfc_match_omp_barrier, gfc_match_omp_critical, gfc_match_omp_do, gfc_match_omp_flush, gfc_match_omp_master, gfc_match_omp_ordered, gfc_match_omp_parallel, gfc_match_omp_parallel_do, gfc_match_omp_parallel_sections, gfc_match_omp_parallel_workshare, gfc_match_omp_sections, gfc_match_omp_single, gfc_match_omp_threadprivate, gfc_match_omp_workshare, gfc_match_omp_end_nowait, gfc_match_omp_end_single): New prototypes. * resolve.c (resolve_blocks): Ignore EXEC_OMP_* block directives. (resolve_code): Call gfc_resolve_omp_directive on EXEC_OMP_* directives. * trans.c (gfc_trans_code): Call gfc_trans_omp_directive for EXEC_OMP_* directives. * st.c (gfc_free_statement): Handle EXEC_OMP_* statement freeing. * trans-stmt.h (gfc_trans_omp_directive): New prototype. * openmp.c: New file. * trans-openmp.c: New file. gcc/testsuite/ 2006-02-14 Jakub Jelinek <jakub@redhat.com> Diego Novillo <dnovillo@redhat.com> Uros Bizjak <uros@kss-loka.si> * gfortran.dg/gomp: New directory. libgomp/ 2006-02-14 Jakub Jelinek <jakub@redhat.com> * testsuite/libgomp.fortran/vla7.f90: Add -w to options. Remove tests for returning assumed character length arrays. Co-Authored-By: Diego Novillo <dnovillo@redhat.com> Co-Authored-By: Richard Henderson <rth@redhat.com> Co-Authored-By: Uros Bizjak <uros@kss-loka.si> From-SVN: r110984
2006-02-14re PR tree-optimization/26258 (Wrong alias information for struct addresses ↵Richard Guenther2-0/+33
in PHIs) 2006-02-14 Richard Guenther <rguenther@suse.de> PR tree-optimization/26258 * tree-ssa-structalias.c (find_func_aliases): Handle aggregates in PHI argument processing. * gcc.dg/torture/pr26258.c: New testcase. From-SVN: r110963
2006-02-13re PR fortran/26246 (return string length is being marked as TREE_STATIC and ↵Andrew Pinski3-0/+35
TREE_PUBLIC) 2006-02-13 Andrew Pinski <pinskia@physics.uc.edu> Jakub Jelinek <jakub@redhat.com> PR fortran/26246 * trans-decl.c (gfc_get_symbol_decl, gfc_get_fake_result_decl): Use gfc_add_decl_to_function rather than gfc_finish_var_decl on length. * gfortran.dg/pr26246_1.f90: New test. * gfortran.dg/pr26246_2.f90: New test. From-SVN: r110929
2006-02-13re PR middle-end/26092 (ICE on const function pointer assigned to a builtin ↵Jakub Jelinek2-0/+15
function) PR middle-end/26092 * gimplify.c (gimplify_call_expr): Don't call get_callee_fndecl twice if decl is a builtin. When trying again, call get_callee_fndecl first to verify it is still a builtin. * gcc.c-torture/compile/20060208-1.c: New test. From-SVN: r110927
2006-02-13re PR fortran/26074 (Module array cannot be automatic or assumed shape)Paul Thomas9-3/+123
2006-02-13 Paul Thomas <pault@gcc.gnu.org> PR fortran/26074 PR fortran/25103 * resolve.c (resolve_symbol): Extend the requirement that module arrays have constant bounds to those in the main program. At the same time simplify the array bounds, to avoiding trapping parameter array references, and exclude automatic character length from main and modules. Rearrange resolve_symbol and resolve_derived to put as each flavor together, as much as is possible and move all specific code for flavors FL_VARIABLE, FL_PROCEDURE and FL_PARAMETER into new functions. (resolve_fl_var_and_proc, resolve_fl_variable, resolve_fl_procedure): New functions to do work of resolve_symbol. (resolve_index_expr): New function that is called from resolved_symbol and is extracted from resolve_charlen. (resolve_charlen): Call this new function. (resolve_fl_derived): Renamed resolve_derived to be consistent with the naming of the new functions for the other flavours. Change the charlen checking so that the style is consistent with other similar checks. Add the generation of the gfc_dt_list, removed from resolve_ symbol. PR fortran/20861 * resolve.c (resolve_actual_arglist): Prevent internal procedures from being dummy arguments. PR fortran/20871 * resolve.c (resolve_actual_arglist): Prevent pure but non-intrinsic procedures from being dummy arguments. PR fortran/25083 * resolve.c (check_data_variable): Add test that data variable is in COMMON. PR fortran/25088 * resolve.c (resolve_call): Add test that the subroutine does not have a type. 2006-02-13 Paul Thomas <pault@gcc.gnu.org> PR fortran/26074 PR fortran/25103 * gfortran.dg/module_parameter_array_refs_1.f90: New test. * gfortran.dg/bad_automatic_objects_1.f90: New test. * gfortran.dg/automatic_module_variable.f90: Change error message. PR fortran/20861 * gfortran.dg/internal_dummy_1.f90: New test. PR fortran/20871 * gfortran.dg/elemental_non_intrinsic_dummy_1.f90: New test. PR fortran/25083 * gfortran.dg/uncommon_block_data_1.f90: New test. * gfortran.dg/equiv_constraint_7.f90: Correct non-compliance of test with standard. PR fortran/25088 * gfortran.dg/typed_subroutine_1.f90: New test. From-SVN: r110926
2006-02-13Index: gcc/ChangeLogGeoffrey Keating2-0/+9
2006-02-13 Geoffrey Keating <geoffk@apple.com> * dwarf2out.c (base_type_die): Don't add AT_name here. (subrange_type_die): Don't add AT_name here. (modified_type_die): Rearrange code flow. Do add AT_name here. Index: gcc/testsuite/ChangeLog 2006-02-13 Geoffrey Keating <geoffk@apple.com> * objc.dg/dwarf-1.m: New. From-SVN: r110925