aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite
AgeCommit message (Collapse)AuthorFilesLines
2000-10-31cp-tree.h (DECL_EXTERNAL_LINKAGE_P): New macro.Mark Mitchell1-0/+18
* cp-tree.h (DECL_EXTERNAL_LINKAGE_P): New macro. (linkage_kind): New enumeration. (decl_linkage): New function. * decl2.c (comdat_linkage): Extend comment. * error.c (dump_function_decl): Print the arguments used to instantiate a template, even when not printing the type of the function. * pt.c (convert_nontype_argument): Use DECL_EXTERNAL_LINKAGE_P, not TREE_PUBLIC, to test for external linkage. * tree.c (decl_linkage): New function. From-SVN: r37150
2000-10-29defined.c, [...]: New tests.Neil Booth8-2/+94
* gcc.dg/cpp/defined.c, include1.c, paste11.c, skipping.c: New tests. * gcc.dg/cpp/macsyntx.c: Move test to defined.c. * gcc.dg/cpp/mi3.c, mi3.h: New test for over-enthusiastic optimisation. From-SVN: r37126
2000-10-29macro4.c, macro5.c: New tests.Neil Booth7-6/+81
* gcc.dg/cpp/macro4.c, macro5.c: New tests. * mi1.c, mi1c.h: Add null directives to multiple-include test. * mi5.c: Test multiple includes work with -C. * trigraphs.c: Test ^= version. From-SVN: r37124
2000-10-29New testMark Mitchell1-0/+14
From-SVN: r37113
2000-10-28pt.c (instantiate_decl): Always instantiate static data members initialized ↵Mark Mitchell1-0/+24
in-class. * pt.c (instantiate_decl): Always instantiate static data members initialized in-class. From-SVN: r37107
2000-10-28*** empty log message ***Neil Booth1-0/+7
From-SVN: r37101
2000-10-28*** empty log message ***Neil Booth1-0/+12
From-SVN: r37100
2000-10-2819960224-2.c, [...]: Update tests for new diagnostic messages.Neil Booth21-53/+104
* gcc.dg/cpp/19960224-2.c, 20000625-2.c, cxxcom2.c, directiv.c, endif.c, if-4.c, if-5.c, if-mop.c, macsyntx.c, paste2.c, paste6.c, paste8.c, redef2.c, strify2.c, strp1.c, tr-warn1.c, tr-warn3.c, tr-warn6.c, undef1.c, undef2.c, widestr1.c: Update tests for new diagnostic messages. * gcc.dg/cpp/macro3.c: New tests. From-SVN: r37099
2000-10-28c-typeck.c (check_init_type_bitfields): Remove.Mark Mitchell2-1/+6
* c-typeck.c (check_init_type_bitfields): Remove. (constructor_incremental): Likewise. (struct constructor_stack): Remove incremental bit. (struct initializer_stack): Likewise. (start_init): Don't play with constructor_incremental. (finish_init): Likewise. (really_start_incremental_init): Likewise. (push_init_level): Likewise. (pop_init_level): Likewise. (output_init_level): Likewise. (output_pending_init_elements): Likewise. From-SVN: r37096
2000-10-28c-pragma.c (handle_pragma_pack): Initialize align to -1.Mike Coleman3-0/+181
2000-10-21 Mike Coleman <mcoleman2@kc.rr.com> * c-pragma.c (handle_pragma_pack): Initialize align to -1. Improve error messages. Correct parsing of #pragma pack(pop [,id]). Do not check the user-supplied alignment if we're popping. * gcc.dg/pack-test-1.c: New test case. * gcc.dg/pack-test-2.c: New test case. * gcc.dg/pack-test-1.h: New file. From-SVN: r37095
2000-10-27calls.c (expand_call): If sibcall_failure is set during pass 1, clear ↵Jakub Jelinek2-0/+22
tail_call_insns as well. * calls.c (expand_call): If sibcall_failure is set during pass 1, clear tail_call_insns as well. * g++.old-deja/g++.other/eh2.C: New test. From-SVN: r37087
2000-10-27New testcase.Bernd Schmidt2-0/+15
From-SVN: r37084
2000-10-26New test.Richard Henderson2-0/+48
From-SVN: r37078
2000-10-26label2.C: Tweak to work with V3.Mark Mitchell11-13/+29
* g++.old-deja/g++.brendan/label2.C: Tweak to work with V3. * g++.old-deja/g++.law/builtin1.C: Likewise. * g++.old-deja/g++.law/ctors10.C: Likewise. * g++.old-deja/g++.law/virtual3.C: Likewise. * g++.old-deja/g++.mike/p658.C: Likewise. * g++.old-deja/g++.other/sibcall1.C: Likewise. * g++.old-deja/g++.other/vaarg2.C: Likewise. * g++.old-deja/g++.robertl/eb124.C: Likewise. * g++.old-deja/g++.robertl/eb44.C: Likewise. * g++.old-deja/g++.robertl/eb77.C: Likewise. * include/backward/streambuf.h: New file. From-SVN: r37077
2000-10-26* gcc.c-torture/compile/20001024-1.c: New test.Nathan Sidwell2-0/+17
From-SVN: r37072
2000-10-26Makefile.in (site.exp): Define HAVE_LIBSTDCXX_V3.Mark Mitchell2-14/+18
* Makefile.in (site.exp): Define HAVE_LIBSTDCXX_V3. * configure.in (enable-libstdcxx-v3): Arrange to have HAVE_LIBSTDCXX_V3 substituted into the output files. * lib/g++.exp (g++_include_flags): Trust HAVE_LIBSTDCXX_V3 to tell us whether or not we are using V3. * Makefile.in (check): Don't make mkcheck executable. (check-install): Likewise. * configure.in (AC_OUTPUT): Make mkcheck executable. * mkcheck.in (top_srcdir): New variable. (INC_PATH): Set the path to the backward and ext directories correctly. From-SVN: r37068
2000-10-26error.c (dump_function_decl): Print no space between `ptr-operator' the ↵Gabriel Dos Reis2-1/+6
`type-specifier' of the return type. cp/ * error.c (dump_function_decl): Print no space between `ptr-operator' the `type-specifier' of the return type. (dump_type_prefix): Make sure we put space at the appropriate place. testuite/g++.old-deja/g++.pt/ * g++.old-deja/g++.pt/memtemp77.C (main): Adjust comparaison operands. From-SVN: r37067
2000-10-25c-decl.c (grokdeclarator): Move warning for qualified void return types with ↵Joseph Myers3-0/+42
-pedantic to when... * c-decl.c (grokdeclarator): Move warning for qualified void return types with -pedantic to when the function type is constructed. At -W, warn in general for qualified function return types, except for volatile void. * invoke.texi: Document this new warning at -W. testsuite: * gcc.dg/qual-return-1.c, gcc.dg/qual-return-2.c: New tests. From-SVN: r37056
2000-10-25stor-layout.c (layout_type): If TYPE_ALIAS_SET was already set on the ↵Jakub Jelinek2-0/+38
incomplete type force it into alias set 0. * stor-layout.c (layout_type): If TYPE_ALIAS_SET was already set on the incomplete type force it into alias set 0. * gcc.c-torture/execute/20001024-1.c: New test. From-SVN: r37052
2000-10-24sibcall.c (purge_mem_unchanging_flag): New function.Jakub Jelinek2-0/+17
* sibcall.c (purge_mem_unchanging_flag): New function. (optimize_sibling_and_tail_recursive_calls): Call it. * g++.old-deja/g++.other/sibcall1.C: New test. From-SVN: r37033
2000-10-23* call.c (equal_functions): Also call decls_match for extern "C" fns.Jason Merrill1-0/+15
From-SVN: r37024
2000-10-23call.c (standard_conversion): Use RVALUE_CONVs for all expressions that ↵Mark Mitchell1-0/+34
satisfy lvalue_p... * call.c (standard_conversion): Use RVALUE_CONVs for all expressions that satisfy lvalue_p, not just those that satisfy real_lvalue_p. From-SVN: r37013
2000-10-23expr.c (do_preexpand_calls): Remove.Mark Mitchell1-0/+40
* expr.c (do_preexpand_calls): Remove. (same_from_p): Don't use CALL_EXPR_RTL. (expand_expr): Don't call preexpand_calls, or use CALL_EXPR_RTL. (preexpand_calls): Remove. * tree.c (first_rtl_op): Remove CALL_EXPR case. (unsave_expr_1): Likewise. * tree.def (CALL_EXPR): Give it only two slots. * tree.h (CALL_EXPR_RTL): Remove. * optimize.c (copy_body_r): Don't treat CALL_EXPRs specially. From-SVN: r37012
2000-10-22call.c (build_conditional_expr): Use ocp_convert to force rvalue conversion.Jason Merrill1-0/+19
* call.c (build_conditional_expr): Use ocp_convert to force rvalue conversion. From-SVN: r37009
2000-10-21parse.y (operator): Set got_object from got_scope.Jason Merrill1-0/+54
* parse.y (operator): Set got_object from got_scope. Set looking_for_typename. * decl.c (lookup_name_real): Clear val after setting from_obj. Reorganize diagnostic. From-SVN: r37000
2000-10-21* gcc.dg/noncompile/init-3.c: New test.Jakub Jelinek2-0/+8
From-SVN: r36991
2000-10-20* tree.c (walk_tree): Don't walk into default args.Jason Merrill1-0/+31
From-SVN: r36985
2000-10-20c-common.c (check_format_info_recurse): Extract string constant initializers ↵Joseph Myers2-0/+43
from non-volatile constant arrays and... * c-common.c (check_format_info_recurse): Extract string constant initializers from non-volatile constant arrays and check them as formats. * c-typeck.c (decl_constant_value): Don't check pedantic or check for DECL_MODE (decl) != BLKmode. (decl_constant_value_for_broken_optimization): New function which includes these checks. (default_conversion, convert_for_assignment, digest_init): Use decl_constant_value_for_broken_optimization instead of decl_constant_value. testsuite: * gcc.dg/format-array-1.c: New test. From-SVN: r36965
2000-10-19cp-tree.h (DECL_ANTICIPATED): Don't require a FUNCTION_DECL.Mark Mitchell1-0/+13
* cp-tree.h (DECL_ANTICIPATED): Don't require a FUNCTION_DECL. * decl.c (select_decl): Don't return declarations that are DECL_ANTICIPATED. From-SVN: r36953
2000-10-18c-common.c (check_format_types): Check for writing through a NULL pointer ↵Joseph Myers3-1/+8
argument. * c-common.c (check_format_types): Check for writing through a NULL pointer argument. testsuite: * gcc.dg/c90-printf-1.c, gcc.dg/c90-scanf-1.c: Add tests for writing through null pointers; remove comment about testing unterminated strings. From-SVN: r36936
2000-10-17* gcc.c-torture/execute/20001017-2.c: New test.Matthew Hiller2-0/+21
From-SVN: r36924
2000-10-1820001018-1.c: New test.Joseph Myers3-0/+17
* gcc.c-torture/compile/20001018-1.c: New test. * gcc.c-torture/compile/20001018-1.x: Xfail. From-SVN: r36917
2000-10-1720001017-1.c: New test.Franz Sirl2-0/+21
2000-10-17 Franz Sirl <Franz.Sirl-kernel@lauterbach.com> * gcc.c-torture/execute/20001017-1.c: New test. From-SVN: r36913
2000-10-17c-common.c (FMT_FLAG_DOLLAR_MULTIPLE): Define.Joseph Myers2-8/+13
* c-common.c (FMT_FLAG_DOLLAR_MULTIPLE): Define. (format_types): Use it for printf. (maybe_read_dollar_number): Add parameter for the kind of format involved. Warn for multiple use for arguments if this is inappropriate for the kind of format involved. (check_format_info_main): Update calls to maybe_read_dollar_number. testsuite: * gcc.dg/format-xopen-1.c: Update comments; adjust for checking for multiple use of arguments with scanf formats; add tests for multiple use of arguments. From-SVN: r36905
2000-10-17Improved sequence point warningsBernd Schmidt2-3/+24
From-SVN: r36901
2000-10-17c-common.h (warn_missing_format_attribute): New variable.Joseph Myers2-0/+46
* c-common.h (warn_missing_format_attribute): New variable. * c-decl.c (warn_missing_format_attribute): New variable. (c_decode_option): Decode -Wmissing-format-attribute and -Wno-missing-format-attribute. * c-common.c (check_function_format): If -Wmissing-format-attribute, give a warning where a vprintf or vscanf function is called by a function without its own printf or scanf attribute. * toplev.c (documented_lang_options): Add -Wmissing-format-attribute. * invoke.texi: Document -Wmissing-format-attribute. cp: * decl2.c (warn_missing_format_attribute): New variable. (lang_decode_option): Decode -Wmissing-format-attribute. testsuite: * gcc.dg/format-miss-1.c: New test. From-SVN: r36897
2000-10-16* gcc.c-torture/execute/20001013-1.c: New test.Jakub Jelinek2-0/+21
From-SVN: r36891
2000-10-16typeck.c (qualify_type): Remove.Mark Mitchell1-0/+10
* typeck.c (qualify_type): Remove. (composite_pointer_type): Fix handling of conversions to `cv void*'. From-SVN: r36889
2000-10-16c-common.c (format_check_results): New structure.Joseph Myers2-0/+33
* c-common.c (format_check_results): New structure. (finish_dollar_format_checking): Adjust to take a format_check_results * parameter. (check_format_info, check_format_info_recurse, check_format_info_main): Split check_format_info into three functions, the main checking going in check_format_info_main. Recurse when any reduction of the format string argument towards a string literal is done; go down both branches of a conditional expression. Don't warn for extra format arguments or empty format strings if they only occur in some branches of a conditional expression. testsuite: * gcc.dg/format-branch-1.c: New test. From-SVN: r36883
2000-10-16* README, lib/file-format.exp: Remove EGCS references.Joseph Myers3-5/+9
From-SVN: r36879
2000-10-16rtlanal.c (may_trap_p): Check operand modes of COMPARE.Jakub Jelinek2-0/+43
* rtlanal.c (may_trap_p): Check operand modes of COMPARE. * gcc.dg/20001013-1.c: New test. From-SVN: r36878
2000-10-15c90-printf-2.c, [...]: Determine the type for intmax_t in the compiler using ↵Joseph Myers3-16/+40
__typeof__ and the type... * gcc.dg/c90-printf-2.c, gcc.dg/c90-scanf-2.c: Determine the type for intmax_t in the compiler using __typeof__ and the type rules for conditional expressions. From-SVN: r36873
2000-10-13sparc.md (nonlocal_goto_receiver): Remove.Jakub Jelinek3-0/+53
* config/sparc/sparc.md (nonlocal_goto_receiver): Remove. (prologue, exception_receiver, builtin_setjmp_receiver): New patterns. * config/sparc/sparc.h (FINALIZE_PIC): Remove. * config/sparc/sparc-protos.h (finalize_pic): Remove. (load_pic_register): New prototype. * config/sparc/sparc.c (pic_setup_code): Remove. (finalize_pic): Rename to... (load_pic_register): ...this function. Don't look for nonlocal_goto_receivers and emit pic setup code directly. Don't check current_function_uses_pic_offset_table. * gcc.dg/20001012-1.c: New test. * gcc.dg/20001012-2.c: New test. From-SVN: r36859
2000-10-12c-common.c (decl_attributes): Don't allow strftime formats with ↵Joseph Myers2-0/+11
first_arg_num nonzero. * c-common.c (decl_attributes): Don't allow strftime formats with first_arg_num nonzero. (check_format_info): Set wanted_type and wanted_type_name to zero before they are possibly assigned and used. testsuite: * gcc.dg/format-attr-1.c: New test. From-SVN: r36845
2000-10-12c90-printf-2.c, [...]: Use __LONG_LONG_MAX__ instead of LLONG_MAX.Joseph Myers3-4/+9
* gcc.dg/c90-printf-2.c, gcc.dg/c90-scanf-2.c: Use __LONG_LONG_MAX__ instead of LLONG_MAX. From-SVN: r36843
2000-10-12c-common.c (scanf_flag_specs): Add flags ' and I.Joseph Myers4-5/+53
* c-common.c (scanf_flag_specs): Add flags ' and I. (strftime_flag_pairs): Disallow any pair of the _, - and 0 flags, or the ^ and # flags together. (scan_char_table): Handle the ' and I flags. (format_types): Add ' and I flags for scanf. testsuite: * gcc.dg/c99-scanf-2.c, gcc.dg/format-ext-2.c: Test ' and I scanf flags. * gcc.dg/format-ext-3.c: Test mutually exclusive pairs of strftime flags. From-SVN: r36842
2000-10-11c-typeck.c (check_modify_expr): New function.Joseph Myers2-0/+46
* c-typeck.c (check_modify_expr): New function. (build_modify_expr): Call it if warn_sequence_point. * c-decl.c (warn_sequence_point): New variable. (c_decode_option): Handle -Wsequence-point and -Wno-sequence-point. Enable -Wsequence-point as part of -Wall. * c-tree.h (warn_sequence_point): Declare. * invoke.texi (-Wsequence-point): Document. * toplev.c (documented_lang_options): Add -Wsequence-point and -Wno-sequence-point. Original work by Michael Meeks, 16 Jun 1998. testsuite: * gcc.dg/sequence-pt-1.c: New test. From-SVN: r36840
2000-10-1120001011-1.c: New testcase.Geoff Keating2-0/+19
* gcc.c-torture/execute/20001011-1.c: New testcase. Testcase provided by Zack Weinberg <zackw@stanford.edu>. From-SVN: r36839
2000-10-10991209-1.c (stack_ptr): Use __asm, not asm, so that -ansi does not error on it.Jakub Jelinek2-1/+6
* gcc.dg/991209-1.c (stack_ptr): Use __asm, not asm, so that -ansi does not error on it. From-SVN: r36826
2000-10-10Oops, forgot to commit testcase.Hans-Peter Nilsson1-0/+14
From-SVN: r36825