aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite
AgeCommit message (Collapse)AuthorFilesLines
2004-01-04re PR c++/12226 (g++ fails to enforce accessibility requirement for copy ↵Mark Mitchell3-0/+36
constructor) PR c++/12226 * call.c (CHECK_COPY_CONSTRUCTOR_P): New macro. (reference_binding): Set it when appropriate. (build_temp): New function, split out from ... (convert_like_real): ... here. Honor CHECK_COPY_CONSTRUCTOR_P. (initialize_reference): Likewise. PR c++/12226 * g++.dg/init/copy7.c: New test. PR c++/12226 * testsuite/27_io/basic_filebuf/4.cc: Remove use of invalid copy constructor. * testsuite/27_io/basic_fstream/4.cc: Likewise. * testsuite/27_io/basic_ifstream/4.cc: Likewise. * testsuite/27_io/basic_ios/4.cc: Likewise. * testsuite/27_io/basic_iostream/4.cc: Likewise. * testsuite/27_io/basic_istream/4.cc: Likewise. * testsuite/27_io/basic_istingstream/4.cc: Likewise. * testsuite/27_io/basic_ofstream/4.cc: Likewise. * testsuite/27_io/basic_ostream/4.cc: Likewise. * testsuite/27_io/basic_ostringstream/4.cc: Likewise. * testsuite/27_io/basic_stringbuf/5.cc: Likewise. * testsuite/27_io/basic_stringstream/4.cc: Likewise. PR c++/13536 * parser.c (cp_parser): Add in_type_id_in_expr_p. (cp_parser_new): Initialize it. (cp_parser_postfix_expression): Set it. (cp_parser_sizeof_operand): Likewise. (cp_parser_parameteR_declaration): Do not commit early to tenative parsers when in_type_id_in_expr_p is set. PR c++/13536 * g++.dg/parse/cast1.C: New test. From-SVN: r75397
2004-01-04Makefile.in (cgraph.o, [...]): Add intl.h dependency.Jan Hubicka8-0/+119
* Makefile.in (cgraph.o, cgraphunit.o): Add intl.h dependency. * cgraph.c (create_edge, dump_cgraph): Update to use inline_failed * cgraph.h (cgraph_edge): Replace inline_call by inline_failed (cgraph_inline_p): Add extra argument reason. * cgraphunit.c: Minor formating fixes. cgraph_first_inlined_callee): New functions. (record_call_1): Record builtins too. (cgraph_analyze_function): Update inline_failed messages. (cgraph_mark_functions_to_output, cgraph_expand_function, cgraph_inlined_into, cgraph_inlined_callees, cgraph_estimate_growth): Update to use inline_failed. (cgraph_check_inline_limits): Likewise; Add argument reason. (cgraph_set_inline_failed): New static function. (cgraph_decide_inlining_of_small_function, cgraph_decide_inlining): Set reasons. (cgraph_inline_p): Add new argument reason. * tree-inline.c (expand_call_inline): Update warning. From-SVN: r75391
2004-01-02re PR c++/13520 (gcc crashes with inheritance + default template parameter ↵Kriang Lerdsuwanakij2-0/+33
of nested template type) PR c++/13520 * cp-tree.h (DECL_UNBOUND_CLASS_TEMPLATE_P): New macro. (DECL_FUNCTION_TEMPLATE_P): Use it. (DECL_CLASS_TEMPLATE_P): Likewise. * parser.c (cp_parser_lookup_name): Add is_template parameter. (cp_parser_type_parameter): Adjust call to cp_parser_lookup_name. (cp_parser_template_name): Likewise. (cp_parser_elaborated_type_specifier): Likewise. (cp_parser_namespace_name): Likewise. (cp_parser_class_name): Likewise. (cp_parser_lookup_name_simple): Likewise. * g++.dg/template/qualttp22.C: New test. From-SVN: r75321
2004-01-01re PR rtl-optimization/13473 (cc1 segfault w/-march=pentium4)Jan Hubicka9-0/+120
PR opt/13473 * recog.c (validate_replace_rtx_1): Take care for RTL sharing inside ASM input operands PR opt/12617 * toplev.c (dump_file_index): Reorder ce3 and bbro. (dump_file): Likewise. (rest_of_compilation): Likewise. PR debug/13367 * cgraph.c (cgraph_function_possibly_inlined): Even with flag_really_no_inline we inline always_inline functions. * cgraphunit.c (cgraph_analyze_function): Clear inlinable flag for non-always_inline functions when there is flag_really_no_inline. (cgraph_decide_inlining): Limit work done when not inlining. (cgraph_decide_inlining_incrementally): Likewise. (cgraph_optimize_function): Check whether something got inlined. * c-objc-common.c (c_disregard_inline_limits): Do not always inline extern inline functions when not inlining. * opts.c (decode_options): Disable crossjumping at -O1 * invoke.texi (-O1): Document change. * gcc.dg/debug/20031231-1.c: New. * gcc.c-torture/compile/20040101-1.c: New. * gcc.dg/dwarf-die-[1-7].c: New. From-SVN: r75303
2004-01-01re PR rtl-optimization/13521 ([3.3 only] Endless loop in ↵Jakub Jelinek2-0/+56
calculate_global_regs_live) PR optimization/13521 * gcc.c-torture/compile/20031231-1.c: New test. From-SVN: r75301
2003-12-30* gcc.dg/sibcall-4.c: Replace mn10?00 with mn10300.Kazu Hirata2-1/+5
From-SVN: r75248
2003-12-30re PR c++/10079 (ICE (segfault) while substitute return type containing ↵Volker Reichelt2-0/+26
unresolved qualified id) PR c++/10079 * g++.dg/template/crash16.C: New test. From-SVN: r75246
2003-12-30* g++.dg/abi/vbase10.C: XFAIL on arm*-*-*.Mark Mitchell2-1/+11
From-SVN: r75241
2003-12-30thunk2.C: Remove traces of dead ports.Kazu Hirata10-42/+17
* g++.old-deja/g++.jason/thunk2.C: Remove traces of dead ports. * g++.old-deja/g++.jason/thunk3.C: Likewise. * g++.old-deja/g++.law/profile1.C: Likewise. * gcc.c-torture/compile/981006-1.c: Likewise. * gcc.c-torture/execute/loop-2e.x: Likewise. * gcc.c-torture/execute/loop-2f.x: Remove. * gcc.c-torture/execute/loop-2g.x: Likewise. * gcc.c-torture/execute/strct-varg-1.x: Likewise. * gcc.dg/20020312-2.c: Remove traces of dead ports. From-SVN: r75240
2003-12-30re PR c++/13507 (spurious printf format warning)Nathan Sidwell2-0/+20
cp: PR c++/13507 * decl.c (duplicate_decls): Use build_type_attribute_variant to merge attributes. testsuite: PR c++/13507 * g++.dg/ext/attrib11.C: New test. From-SVN: r75229
2003-12-30re PR c++/13494 (ICE on bidimensional array subscription in template function.)Nathan Sidwell3-0/+34
cp: PR c++/13494 * tree.c (build_cplus_array_type_1): Only build a minimal array type for dependent types or domains. testsuite: PR c++/13494 * g++.dg/template/array2-1.C: New test. * g++.dg/template/array2-2.C: New test. From-SVN: r75225
2003-12-30* g++.old-deja/g++.pt/static11.C: Correct XFAIL syntax.Mark Mitchell2-5/+8
From-SVN: r75219
2003-12-29re PR c++/12774 (Type checking problems in templates)Nathan Sidwell3-0/+70
cp: PR c++/12774 * typeck.c (comp_array_types): Fold non-dependent domains for ABI-1. testsuite: PR c++/12774 * g++.dg/template/array1-1.C: New test. * g++.dg/template/array1-2.C: New test. From-SVN: r75204
2003-12-29re PR fortran/12632 ([g77 only] -fbounds-check ICE)Roger Sayle2-0/+11
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. * g77.dg/12632.f: New test case. From-SVN: r75203
2003-12-29re PR c++/13289 (ICE in regenerate_decl_from_template on recursive template)Kriang Lerdsuwanakij2-0/+14
PR c++/13289 * semantics.c (finish_id_expression): Only check if the type of a template argument is integral or enumeration when it is not dependent. * g++.dg/parse/nontype1.C: New test. From-SVN: r75200
2003-12-29re PR c++/12403 (ICE in push_template_decl_real on member function template ↵Kriang Lerdsuwanakij3-1/+18
specialization) PR c++/12403 * parser.c (cp_parser_template_declaration_after_export): Set up template specialization scope in case of explicit specialization. * g++.dg/parse/explicit1.C: New test. * g++.old-deja/g++.pt/explicit71.C: Adjust expected error. From-SVN: r75199
2003-12-29re PR c++/13081 (forward template declarations in <complex> let inlining fail)Mark Mitchell3-0/+25
PR c++/13081 * decl.c (duplicate_decls): Preserve inline-ness when redeclaring a function template. PR c++/12613 * decl.c (reshape_init): Reject GNU colon-style designated initializers in arrays. PR c++/13081 * g++.dg/opt/inline6.C: New test. PR c++/12613 * g++.dg/parse/error9.C: New test. From-SVN: r75192
2003-12-29* gcc.dg/const-elim-1.c: XFAIL on arm-*-*.Mark Mitchell2-1/+8
From-SVN: r75191
2003-12-29re PR c++/13009 (Implicitly-defined assignment operator writes to wrong memory)Mark Mitchell2-0/+35
PR c++/13009 * call.c (build_special_member_call): Do not assume that we have a pointer to the complete object in an assignment operator. PR c++/13009 * g++.dg/init/assign1.C: New test. From-SVN: r75189
2003-12-28re PR c++/13070 (-Wformat option ignored in g++)Roger Sayle2-0/+17
PR c++/13070 * decl.c (duplicate_decls): When setting the type of an anticipated declaration, merge the existing type attributes. * g++.dg/warn/format3.C: New test case. From-SVN: r75185
2003-12-27re PR rtl-optimization/13159 (FAIL: gcc.c-torture/compile/930621-1.c)Zdenek Dvorak2-0/+21
PR opt/13159 * cfgloopanal.c (mark_irreducible_loops): Fix the strongly connected components detection. * loop-unswitch.c (unswitch_loop): Preserve simple preheaders. * gcc.c-torture/compile/20031227-1.c: New test. From-SVN: r75174
2003-12-24calls.c (expand_call): Recognize calls to "sqrt" and create corresponding notes.Mark Mitchell7-10/+50
* 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. From-SVN: r75003
2003-12-23gcc-dg.exp (dg-require-profiling): New function.Mark Mitchell9-18/+53
* lib/gcc-dg.exp (dg-require-profiling): New function. * lib/target-supports.exp (check_profiling_available): Likewise. * g++.dg/bprob/bprob.exp: Use check_profiling_available. * g77.dg/bprob/bprob.exp: Likewise. * gcc.misc-tests/bprob.exp: Likewise. * g++.old-deja/g++.law/profile1.C: Use dg-require-profiling. * gcc.dg/20021014-1.c: Likewise. * gcc.dg/nest.c: Likewise. From-SVN: r74995
2003-12-23java1.C: Use -fdollars-in-identifiers when compiling.Mark Mitchell4-3/+10
* g++.dg/lookup/java1.C: Use -fdollars-in-identifiers when compiling. * g++.dg/lookup/java2.C: Likewise. * gcc.dg/cpp/lexident.c: Likewise. From-SVN: r74992
2003-12-2320020604-1.c: XFAIL on H8 if -mn is given.Kazu Hirata4-3/+10
* 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. From-SVN: r74981
2003-12-23ia64.c (ia64_va_arg): Pass pointer for variable-sized type through ↵Zack Weinberg4-11/+53
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. From-SVN: r74980
2003-12-23c-common.c (flag_abi_version): Default to 2.Mark Mitchell14-10/+42
* c-common.c (flag_abi_version): Default to 2. * c-cppbuiltin.c (c_cpp_builtins): Define __GXX_ABI_VERSION uniformly for versions above 2. * doc/invoke.texi: Update documentation for -fabi-version. * cp-lang.c (cp_expr_size): Return zero for empty classes. * cp-tree.h (warn_if_uknown_interface): Remove unused function. * decl2.c (warn_if_unknown_interface): Likewise. * g++.dg/abi/macro0.C: New test. * g++.dg/abi/macro1.C: Likewise. * g++.dg/abi/macro2.C: Likewise. * g++.dg/abi/bitfield5.C: Add explicit -fabi-version=1 option. * g++.dg/abi/bitfield7.C: Likewise. * g++.dg/abi/dtor2.C: Likewise. * g++.dg/abi/mangle11.C: Likewise. * g++.dg/abi/mangle12.C: Likewise. * g++.dg/abi/mangle14.C: Likewise. * g++.dg/abi/mangle17.C: Likewise. * g++.dg/abi/vbase10.C: Likewise. * g++.dg/abi/vbase14.C: Likewise. * g++.dg/template/qualttp17.C: Likewise. From-SVN: r74973
2003-12-23re PR c/11995 (Error recovery problem after invalid labelled declaration in ↵Andrew Pinski2-0/+16
c99 mode) 2003-12-21 Andrew Pinski <pinskia@physics.uc.edu> PR c/11995 * gcc.dg/20031223-1.c: New test. From-SVN: r74970
2003-12-23re PR rtl-optimization/13394 (noreturn attribute ignored on recursive ↵Eric Botcazou2-0/+46
invokation) PR optimization/13394 * toplev.c (rest_of_compilation): Move call to check_function_return_warnings right after the sibcall optimization pass. From-SVN: r74961
2003-12-23re PR c/13382 (Type information for const pointer disappears during ↵Eric Botcazou2-0/+24
optimisation.) PR c/13382 * c-typeck.c (convert_for_assignment): When converting from integral type to pointer type, always call convert. From-SVN: r74960
2003-12-22re PR c++/12862 (Conflicts Between typedefs/enums and Namespace Member ↵Mark Mitchell4-58/+28
Declarations) * c-common.c (flag_external_templates): Remove. (flag_alt_external_templates): Likewise. * c-common.h (flag_external_templates): Remove. (flag_alt_external_templates): Likewise. * c-opts.c (c_common_handle_option): Unsupport -falt-external-templates and -ftemplates. * doc/invoke.texi: Remove mention of -fexternal-templates and -falt-external-templates. * decl.c (start_function): Do not check flag_alt_external_templates or flag_external_templates. * decl2.c (warn_if_unknown_interface): Likewise. * lex.c (extract_interface_info): Likewise. * pt.c (lookup_template_class): Likewise. PR c++/12862 * name-lookup.c (pushdecl): Look up all namespace-scope entities in their corresponding namespace. * g++.old-deja/g++.jason/template18.C: Remove. * g++.old-deja/g++.jason/template37.C: Likewise. PR c++/12862 * g++.dg/lookup/ns1.C: New test. From-SVN: r74954
2003-12-22re PR c++/12397 (two-stage name lookup argument shadowed by global type)Mark Mitchell2-0/+21
PR c++/12397 * typeck.c (finish_class_member_access_expr): Don't tree IDENTIFIER_NODEs as non-dependent expressions. PR c++/12397 * g++.dg/template/lookup3.C: New test. From-SVN: r74949
2003-12-22re PR c++/5050 (template instantiation depth exceeds/maybe recursion problem)Andrew Pinski2-0/+20
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. From-SVN: r74947
2003-12-22darwin-misaligned.c: New test.Fariborz Jahanian1-0/+4
2003-12-22 Fariborz Jahanian <fjahanian@apple.com> * gcc.dg/darwin-misaligned.c: New test. From-SVN: r74942
2003-12-22re PR c++/12479 ([3.4 only] System header should not cause -pedantic to ↵Mark Mitchell3-0/+12
error about "extra `;'") PR c++/12479 * parser.c (cp_parser_declaration_seq_opt): Only issue "extra ;" pedwarn when not in a system header. PR c++/12479 * g++.dg/parse/semicolon1.C: New test. * g++.dg/parse/semicolon1.h: Likewise. From-SVN: r74940
2003-12-22Test to check for a valid memory reference of a misaligned DImode memoryFariborz Jahanian1-0/+32
with -O3 -mpowerpc64. From-SVN: r74939
2003-12-22re PR c/9163 (ICE in genrtl_compound_stmt at c-semantics.c:776 with c99 mode ↵Andrew Pinski2-0/+23
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. 2003-12-22 Andrew Pinski <pinskia@physics.uc.edu> PR c/9163 * gcc.dg/20031222-1.c: New test. From-SVN: r74934
2003-12-22re PR c++/13438 (internal compiler error: tree check: expected ↵Mark Mitchell2-0/+7
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. PR c++/13438 * g++.dg/parse/error8.C: New test. From-SVN: r74931
2003-12-22re PR c++/11554 (Warning about reordering of initializers doesn't mention ↵Mark Mitchell2-0/+14
location of constructor) PR c++/11554 * init.c (sort_mem_initializers): Add warning. PR c++/11554 * testsuite/g++.dg/warn/ctor-init-1.C: New test. From-SVN: r74926
2003-12-2220020910-1.c: Disable if __INT_MAX is too small.Kazu Hirata14-7/+126
* gcc.c-torture/compile/20020910-1.c: Disable if __INT_MAX is too small. * gcc.c-torture/compile/930217-1.c: Likewise. * gcc.c-torture/compile/930513-1.c: Likewise. * gcc.c-torture/execute/920908-2.c: Likewise. * gcc.c-torture/execute/921204-1.c: Likewise. * gcc.c-torture/execute/930621-1.c: Likewise. * gcc.c-torture/execute/930630-1.c: Likewise. * gcc.c-torture/execute/931031-1.c: Likewise. * gcc.c-torture/execute/980602-2.c: Likewise. * gcc.c-torture/execute/comp-goto-1.c: Likewise. * gcc.c-torture/execute/compndlit-1.c: Likewise. * gcc.c-torture/execute/extzvsi.c: Likewise. * gcc.c-torture/unsorted/ext.c: Likewise. From-SVN: r74923
2003-12-20re PR target/12749 (i386 LP64 bug.)Andrew Pinski2-0/+49
2003-12-20 Andrew Pinski <pinskia@gcc.gnu.org> Matt Thomas <matt@3am-software.com> PR target/12749 * config/i386/i386.c (print_operand): Print only the first 8 characters of the float in hex. 2003-12-20 Andrew Pinski <pinskia@gcc.gnu.org> PR target/12749 * gcc.c-torture/compile/20031220-2.c: New test case. Co-Authored-By: Matt Thomas <matt@3am-software.com> From-SVN: r74893
2003-12-20re PR rtl-optimization/13031 (ICE (unrecognizable insn) when building ↵Roger Sayle2-0/+26
gnome-libs-1.4.2) 2003-12-20 Roger Sayle <roger@eyesopen.com> PR optimization/13031 * gcc.c-torture/compile/20031220-1.c: New test case. From-SVN: r74892
2003-12-20re PR c/12085 (Internal compiler error in convert_move, at expr.c:504 with ↵Eric Botcazou2-0/+53
-O3 flag) PR c/12085 * c-typeck.c (build_function_call): Issue a warning if a function is called through an incompatible prototype and replace the call by a trap in this case. From-SVN: r74874
2003-12-20c-format.c (print_char_table): Allow 'I' flag on floating point decimal formats.Joseph Myers2-7/+12
* c-format.c (print_char_table): Allow 'I' flag on floating point decimal formats. testsuite: * gcc.dg/format/ext-1.c: Allow 'I' flag on floating point decimal formats. From-SVN: r74860
2003-12-19Test to test -mdynamic-no-pic -O2 -mpowerpc64 on Darwin.Fariborz Jahanian1-0/+29
From-SVN: r74858
2003-12-19re PR c++/12795 (ICE with attribute __alias__)Mark Mitchell2-0/+12
PR c++/12795 * name-lookup.c (pushdecl): Do not treated any functions as being "nested" in C++. PR c++/12795 * g++.dg/ext/attrib10.C: New test. From-SVN: r74849
2003-12-19re PR c++/13371 (infinite loop with packed struct and inlining)Jason Merrill1-0/+33
PR c++/13371 * typeck.c (build_modify_expr): Stabilize lhs if we're narrowing. From-SVN: r74846
2003-12-19unwind-ia64.c (ia64_copy_rbs): New function.Jakub Jelinek3-0/+233
* config/ia64/unwind-ia64.c (ia64_copy_rbs): New function. (unw_access_gr): Only call ia64_rse_rnat_addr if addr is above regstk_top. (uw_frame_state_for): Handle locations inside bundles. (uw_init_context_1): Initialize context->rnat. Set context->regstk_top to lowest rbs address which has nat collection in context->rnat. (uw_install_context): Fix rnat restoring. Restore ar.rsc to previous state. * config/ia64/linux.h (MD_FALLBACK_FRAME_STATE_FOR, MD_HANDLE_UNWABI): Handle unwinding through SA_ONSTACK frames. * gcc.dg/cleanup-10.c: New test. * gcc.dg/cleanup-11.c: New test. From-SVN: r74835
2003-12-19re PR c++/13239 (Assertion does not seem to work correctly anymore)Jakub Jelinek2-0/+22
PR c++/13239 * builtins.c (expand_builtin_expect_jump): Update TREE_VALUE (arglist) if unsave_expr_now langhook created a new tree. * g++.dg/opt/expect1.C: New test. From-SVN: r74832
2003-12-19* gcc.dg/altivec-varargs-1.c: Enable testcase on ppc linux.Hartmut Penner2-5/+25
From-SVN: r74823