aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite
AgeCommit message (Collapse)AuthorFilesLines
2003-12-17re PR c++/12218 (runtime segfault when initializing global variable with ↵Mark Mitchell3-0/+25
pointer-to-member) PR c++/12218 * varasm.c (initializer_constant_valid_p): Allow a conversion from an integral constant to an OFFSET_TYPE. PR c++/12696 * decl.c (reshape_init): Recover quickly from errors. PR c++/12218 * g++.dg/init/pm3.C: New test. PR c++/12696 * g++.dg/init/error1.C: New test. From-SVN: r74731
2003-12-17re PR c/3347 (Too large bitfields should be errors)Joseph Myers2-0/+12
2003-12-17 Neil Booth <neil@daikokuya.co.uk> Joseph S. Myers <jsm@polyomino.org.uk> PR c/3347 * c-decl.c (enum_decl_context): Remove BITFIELD. (grokdeclarator): Take bit-field width as an input. Perform bit-field width validation with check_bitfield_type_and_width rather than waiting for finish_struct. (groktypename, groktypename_in_parm_context, start_decl, push_parm_decl, grokfield, start_function): Update calls to grokdeclarator. (check_bitfield_type_and_width): New function. (finish_struct): Move bit-field validation to grokdeclarator and check_bitfield_type_and_width. testsuite: * gcc.dg/bitfld-8.c: New test. From-SVN: r74725
2003-12-16xscale testcases from James LemkeJames Lemke4-0/+51
xscale testcases from James Lemke * gcc.dg/arm-scd42-[123].c: New tests. From-SVN: r74712
2003-12-16re PR c++/9043 ([ABI] incorrect name mangling for array dimension in ↵Nathan Sidwell3-0/+41
template function) cp: PR c++/9043 C++ ABI change: Mangling array indices in templates. * decl.c (compute_array_index_type): Reorganize for earlier template errors. Use value_dependent_expression_p for abi-2. * mangle.c (write_array_type): Check broken mangling for expression indices on abi-1 testsuite: PR c++/9043 * g++.dg/abi/mangle20-1.C: New test. * g++.dg/abi/mangle20-2.C: New test. From-SVN: r74707
2003-12-16re PR c++/13275 (Implementation of offsetof macro)Mark Mitchell4-3/+31
PR c++/13275 * c-common.h (enum rid): Add RID_OFFSETOF. * c-parser.in (rid_to_yy): Ignore RID_OFFSETOF. * ginclude/stddef.h (offsetof): Reimplement for C++, using __offsetof__. * doc/extend.texi: Document __offsetof__. PR c++/13275 * lex.c (reswords): Add "__offsetof" and "__offsetof__". * parser.c (cp_parser): Add in_offsetof_p. (cp_parser_new): Initialize it. (cp_parser_primary_expression): Handle __offsetof__ (...). (cp_parser_postfix_expression): Allow casts to pointer type and uses of "->" in a constant expression if implementing offsetof. (cp_parser_unary_expression): Allow the use of "&" in a constant expression if implementing offsetof. PR c++/13275 * g++.dg/other/offsetof2.C: Remove XFAIL. * g++.dg/parse/offsetof1.C: New test. * g++.gd/parse/offsetof2.C: Likewise. From-SVN: r74702
2003-12-16nontype3.C: New test.Giovanni Bajo3-1/+43
* g++.dg/template/nontype3.C: New test. * g++.dg/template/static2.C: Tweaked the dg-error clause. From-SVN: r74701
2003-12-16* g++.dg/warn/noreturn-3.C: Also test instantiation.Kriang Lerdsuwanakij2-0/+8
From-SVN: r74698
2003-12-16badalloc1.C: Tweak to pass with -pthread on FreeBSD systems.Loren J. Rittle1-1/+19
* testsuite/g++.old-deja/g++.eh/badalloc1.C: Tweak to pass with -pthread on FreeBSD systems. From-SVN: r74689
2003-12-16re PR c++/13387 (assignment to base class corrupts subclass)Nathan Sidwell2-0/+37
cp: PR c++/13387 * class.c (finish_struct_1): Compute mode and alias set for CLASSTYPE_AS_BASE. * call.c (build_over_call): Use CLASSTYPE_AS_BASE for trivial assignment of a class, as necessary. * cp-lang.c (cxx_get_alias_set): The alias set as a base is the same as for the complete type. testsuite: PR c++/13387 * g++.dg/expr/assign1.C: New test. From-SVN: r74683
2003-12-16re PR c++/13242 ([ABI] Incorrect mangling of template reference parameters)Nathan Sidwell3-0/+32
cp: PR c++/13242 C++ ABI change. Mangling template parameters of reference type * mangle.c (write_template_args): Remove unreachable code. (write_template_arg): Look through an argument of reference type. testsuite: PR c++/13242 * g++.dg/abi/mangle19-1.C: New test. * g++.dg/abi/mangle19-2.C: New test. From-SVN: r74682
2003-12-16* testsuite/gcc.dg/altivec-10.c: Test vec_cmple and vec_all_numeric.Hartmut Penner1-0/+4
From-SVN: r74677
2003-12-16re PR rtl-optimization/13313 (Wrong code generated)Eric Botcazou2-4/+31
PR optimization/13313 * combine.c (make_extraction) [REG]: Do not use gen_lowpart_for_combine when POS is non-zero. From-SVN: r74676
2003-12-16altivec.h (vec_cmple, [...]): Fix typo.Hartmut Penner1-0/+86
* altivec.h (vec_cmple, vec_all_numeric): Fix typo. * testsuite/gcc.dg/altivec-10.c: Test for above. From-SVN: r74675
2003-12-16ptrmem7.C: Simplified the test case to not hit an ICE regression.Giovanni Bajo2-14/+5
* g++.dg/template/ptrmem7.C: Simplified the test case to not hit an ICE regression. From-SVN: r74665
2003-12-16re PR c++/10926 (ICE in build_delete when trying to declare template destructor)Mark Mitchell3-0/+22
PR c++/10926 * decl2.c (grokfield): Robustify. PR c++/11116 * parser.c (cp_parser_throw_expression): Determine whether or not an assignment-expression is present by doing one-token lookahead. PR c++/10926 * g++.dg/template/error9.C: New test. PR c++/11116 * g++.dg/template/error8.C: New test. From-SVN: r74664
2003-12-16re PR rtl-optimization/13400 (Compiled code crashes storing to read-only ↵Roger Sayle2-0/+43
location) PR middle-end/13400 * ifcvt.c (noce_process_if_block): Disable unconditional write optimizations if we could introduce a store to trapping memory that wasn't present previously. * gcc.c-torture/execute/20031215-1.c: New test case. From-SVN: r74663
2003-12-16re PR c++/13269 (compiler hangs on invalid code)Mark Mitchell2-0/+7
PR c++/13269 * parser.c (cp_parser_function_definition_after_declarator): Stop scanning tokens when reaching EOF. PR c++/13269 * g++.dg/parse/error5.C: New test. From-SVN: r74661
2003-12-16re PR c++/12989 ([new parser] internal compiler error: tree check: expected ↵Mark Mitchell2-0/+10
field_decl) PR c++/12989 * typeck.c (cxx_sizeof_or_alignof_expr): Robustify. PR c++/12989 * g++.dg/expr/sizeof1.C: New test. From-SVN: r74660
2003-12-15re PR c++/13310 (Tree check error in dependent_template_p)Mark Mitchell2-0/+14
PR c++/13310 * pt.c (dependent_template_p): Handle OVERLOADs. PR c++/13310 * g++.dg/template/crash15.C: New test. From-SVN: r74649
2003-12-15vaarg3.C: Don't expect an error for passing a non-POD type as the last named ↵Geoffrey Keating2-1/+6
parameter of... * g++.old-deja/g++.pt/vaarg3.C: Don't expect an error for passing a non-POD type as the last named parameter of a varargs function. From-SVN: r74647
2003-12-15re PR c++/13243 (Segfault on illegal template construct)Mark Mitchell3-2/+12
PR c++/13243 PR c++/12573 * parser.c (cp_parser_postfix_expression): Tighten handling of integral constant expressions. (cp_parser_unary_expression): Likewise. * pt.c (value_dependent_expression_p): Remove handling for COMPONENT_REFs. PR c++/13243 PR c++/12573 * g++.dg/template/crash14.C: New test. * g++.dg/template/dependent-expr3.C: Add dg-error markers. From-SVN: r74637
2003-12-15class.c (add_method): Disallow destructor for java classes.Nathan Sidwell2-0/+24
cp: * class.c (add_method): Disallow destructor for java classes. * decl.c (xref_basetypes): Check java class inheritance. * decl2.c (check_java_method): Skip artificial params. testsuite: * g++.dg/other/java1.C: New test. From-SVN: r74629
2003-12-15re PR c++/13241 ([ABI] Incorrect mangling of template arguments)Nathan Sidwell3-0/+52
cp: PR c++/13241 C++ ABI change. Mangling of symbols in expressions. * mangle.c (write_mangled_name): Add top_level flag. Rework for nested and unnested mangling. Deal with abi version 1 and version 2 differences. (write_expression): Adjust write_mangled_name call. (mangle_decl_string): Use write_mangled_name for all non-type decls. testsuite: PR c++/13241 * g++.dg/abi/mangle18-1.C: New test. * g++.dg/abi/mangle18-2.C: New test. From-SVN: r74628
2003-12-15re PR rtl-optimization/10312 (optimizer creates wrong code for loop)Zdenek Dvorak2-0/+37
PR optimization/10312 * gcc.c-torture/execute/20031214-1.c: New. From-SVN: r74625
2003-12-15re PR c++/10779 (Error cascade for unknown type in function prototype)Mark Mitchell13-13/+43
* c-common.h (c_parse_error): Declare it. * c-common.c (c_parse_error): New function. * c-parse.y (yyerror): Use it. * parser.c (struct cp_parser): Add in_template_argument_list_p. (cp_parser_error): Use c_parse_error. (cp_parser_name_lookup_error): New function. (cp_parser_new): Initialize it. (cp_parser_declarator): Add parenthesized_p parameter. (cp_parser_nested_name_specifier_opt): Use cp_parser_name_lookup_error. (cp_parser_parenthesized_expression_list): Improve comments. (cp_parser_condition): Adjust call to cp_parser_declarator. (cp_parser_template_parameter): Adjust call to cp_parser_parameter_declaration. (cp_parser_template_argument_list): Set in_template_argument_list_p. (cp_parser_explicit_instantiation): Adjust call to cp_parser_declarator. (cp_parser_simple_type_specifier): Remove unncessary code. (cp_parser_using_declaration): Use cp_parser_name_lookup_error. (cp_parser_init_declarator): Handle member function definitions. (cp_parser_direct_declarator): Adjust call to cp_parser_declarator. (cp_parser_type_id): Adjust call to cp_parser_declarator. (cp_parser_parameter_declaration_list): Avoid backtracking where possible. (cp_parser_parameter_declaration): Add parenthesized_p parameter. (cp_parser_function_definition): Remove. (cp_parser_member_declaration): Do not backtrack to look for function definitions. (cp_parser_exception_declaration): Adjust call to cp_parser_declarator. (cp_parser_single_declaration): Handle function definitions via cp_parser_init_declarator. (cp_parser_save_member_function_body): New function. PR c++/10779 PR c++/12160 * g++.dg/parse/error3.C: New test. * g++.dg/parse/error4.C: Likewise. * g++.dg/abi/mangle4.C: Tweak error messages. * g++.dg/lookup/using5.C: Likewise. * g++.dg/other/error2.C: Likewise. * g++.dg/parse/typename5.C: Likewise. * g++.dg/parse/undefined1.C: Likewise. * g++.dg/template/arg2.C: Likewise. * g++.dg/template/ttp3.C: Likewise. * g++.dg/template/type1.C: Likewise. * g++.old-deja/g++.other/crash32.C: Likewise. * g++.old-djea/g++.pt/defarg8.C: Likewise. From-SVN: r74624
2003-12-14re PR c++/13106 (Wrong warning "no return statement ..." for void template ↵Kriang Lerdsuwanakij2-0/+14
function) PR c++/13106 * decl.c (finish_function): Check if return type is dependent before issuing no return statement warning. * g++.dg/warn/noreturn-3.C: New test. From-SVN: r74616
2003-12-12re PR c++/13118 ([ABI] Missed covariant return thunk)Nathan Sidwell2-0/+90
cp: PR c++/13118 * cp-tree.h (lang_decl_u): Add thunk_alias member. (THUNK_VIRTUAL_OFFSET): Must be a FUNCTION_DECL. (THUNK_ALIAS_P): Remove. (THUNK_ALIAS): Adjust. * class.c (update_vtable_entry_for_fn): Get the vbase within the overriding function's return type. (dump_thunk): Adjust THUNK_ALIAS printing. (build_vtbl_initializer): Adjust THUNK_ALIAS use. * method.c (make_thunk): Revert 12881 test change. Clear THUNK_ALIAS. (finish_thunk): Adjust THUNK_ALIAS setting. (use_thunk): Adjust THUNK_ALIAS use. * semantics.c (emit_associated_thunks): Likewise. testsuite: PR c++/13118 * g++.dg/abi/covariant3.C: New. From-SVN: r74576
2003-12-12linux.h (IA64_GATE_AREA_END): Increase by 64K.Jakub Jelinek2-0/+54
* config/ia64/linux.h (IA64_GATE_AREA_END): Increase by 64K. (MD_FALLBACK_FRAME_STATE_FOR): Set fpsr_loc, br_loc[6] and br_loc[7]. Update comment. (MD_HANDLE_UNWABI): Define. * config/ia64/unwind-ia64.c (struct unw_state_record): Add unwabi field. (struct _Unwind_Context): Increase br_loc array size to 8 entries. (desc_abi): Set unwabi. (uw_update_reg_address): Allow br up to 7. (uw_update_context): Invoke MD_HANDLE_UNWABI if defined. (uw_install_context): Load b1..b5 from correct locations. Fix insn loading ar.fpsr. * doc/tm.texi: Document MD_HANDLE_UNWABI. * g++.dg/eh/ia64-1.C: New test. From-SVN: r74575
2003-12-12PR c++/13114, c++/13115Nathan Sidwell1-1/+1
PR c++/13114, c++/13115 * class.c (layout_empty_base): Propagate the move of an empty base to offset zero. From-SVN: r74573
2003-12-12re PR rtl-optimization/13037 ([gcse-lm] g77 generates incorrect code)Roger Sayle2-0/+63
PR optimization/13037 * loop.c (update_giv_derive): Ignore redundant sets of a biv when calculating how to derive a giv from a biv. * g77.f-torture/execute/13037.f: New test case. From-SVN: r74572
2003-12-12re PR c++/12881 (ICE in make_thunk)Nathan Sidwell2-0/+37
PR c++/12881 * method.c (make_thunk): Deal with thunk aliases when searching for a thunk. Robustify assertion. From-SVN: r74571
2003-12-12PR preprocessor/12935 preprocessor/12952 preprocessor/13046Neil Booth2-0/+15
PR preprocessor/12935 preprocessor/12952 preprocessor/13046 * cpplib.c (prepare_directive_trad): Clear skipping only in #if and #elif directives. (do_undef): Call the handler even if the identifier is not a macro. * cpptrad.c (scan_parameters): Emit an error message. (_cpp_create_trad_definition): Remember the params list even on failure. * testsuite/gcc.dg/cpp/trad/macro.c: New tests. From-SVN: r74562
2003-12-12* gcc.c-torture/execute/wchar_t-1.x: Delete.Zack Weinberg2-6/+7
From-SVN: r74559
2003-12-10Fix changelog entry again.Andrew Pinski1-2/+1
From-SVN: r74514
2003-12-10move changelog entry that should have been in testsuite's.Andrew Pinski1-1/+11
Also fix date on it. From-SVN: r74513
2003-12-10re PR testsuite/10819 (testsuite creates CR+LF on compiler version lines in ↵Robert Schiele4-4/+4
test summary files) 2003-12-09 Robert Schiele <rschiele@uni-mannheim.de> PR other/10819 * lib/gcc.exp (default_gcc_version): Do not match NL/CR characters to fix Bug 10819. * lib/g++.exp (g++_version): Likewise. * lib/g77.exp (g77_version): Likewise. * lib/objc.exp (default_objc_version): Likewise. From-SVN: r74507
2003-12-10* gcc.c-torture/execute/wchar_t-1.c: Convert to utf-8.Richard Henderson2-4/+6
From-SVN: r74491
2003-12-10* gcc.dg/intermod-1.c: Adjust assembler scan pattern for alpha.Richard Henderson2-1/+5
From-SVN: r74490
2003-12-10re PR c/13134 (Visibility attribute is ignored)Matt Austern17-0/+193
PR c/13134 * c--decl.c (duplicate_decls): Copy visibility flag when appropriate. * cp/decl.c (duplicate_decls): Copy visibility flag when appropriate. * testsuite/lib/gcc-dg.exp (dg-require-visibility): Define. * testsuite/lib/target-supports (check_visibility_available): Define. * testsuite/gcc.dg/visibility-1.c: New test. * testsuite/gcc.dg/visibility-2.c: Likewise. * testsuite/gcc.dg/visibility-3.c: Likewise. * testsuite/gcc.dg/visibility-4.c: Likewise. * testsuite/gcc.dg/visibility-5.c: Likewise. * testsuite/gcc.dg/visibility-6.c: Likewise. * testsuite/g++.dg/ext/visibility-1.C: Likewise. * testsuite/g++.dg/ext/visibility-2.C: Likewise. * testsuite/g++.dg/ext/visibility-3.C: Likewise. * testsuite/g++.dg/ext/visibility-4.C: Likewise. * testsuite/g++.dg/ext/visibility-5.C: Likewise. * testsuite/g++.dg/ext/visibility-6.C: Likewise. From-SVN: r74487
2003-12-08re PR c++/11929 (Cannot obtain variable arguments list in function with last ↵Jason Merrill1-0/+12
named argument being of non-POD type) PR c++/11929 * call.c (magic_varargs_p): New fn. (build_over_call): Do no ellipsis conversions for arguments to functions with magic varargs. From-SVN: r74461
2003-12-09re PR target/11848 ([darwin] [no support for 128 doubles] internal compiler ↵Geoffrey Keating1-0/+6
error for -mlong-double-128) PR target/11848 * rs6000.h (CANNOT_CHANGE_MODE_CLASS): Allow change of mode in floating-point registers between TFmode and DImode. * rs6000.c (rs6000_emit_move): Split moves early. (secondary_reload_class): Random Whitespace Change. (rs6000_split_multireg_move): Support moves involving FP registers. Emit instructions directly. * rs6000-protos.h (rs6000_split_multireg_move): Update prototype. * altivec.md: Update for changes to rs6000_split_multireg_move. * rs6000.md: Update for changes to rs6000_split_multireg_move. (movtf_internal): Support moves to/from GPRs. From-SVN: r74454
2003-12-07java1.C: New test.Giovanni Bajo3-0/+120
* g++.dg/lookup/java1.C: New test. * g++.dg/lookup/java2.C: New test. From-SVN: r74395
2003-12-07re PR rtl-optimization/12965 (SEGV+ICE in cc1plus on alpha-linux with -O2)Eric Botcazou2-0/+91
PR optimization/12965 * caller-save.c (save_call_clobbered_regs): Do not save/restore registers around no-return calls. From-SVN: r74389
2003-12-07re PR rtl-optimization/13318 (ICE: floating point exception in the loop ↵Eric Botcazou2-0/+29
optimizer) PR optimization/13318 * loop.c (express_from): Protect integer division from overflow. From-SVN: r74387
2003-12-07re PR rtl-optimization/13060 ([g77] ICE in fixup_var_refs_1, at ↵Eric Botcazou2-0/+17
function.c:1947 on correct code with "-O2 -fno-force-mem") PR optimization/13060 * function.c (fixup_var_refs_1) [SUBREG]: Recognize even if a replacement already exists. Fix again the whole insn if that fails. From-SVN: r74386
2003-12-06re PR c++/13323 (Template code does not compile in presence of typedef)Mark Mitchell2-0/+27
PR c++/13323 * class.c (same_signature_p): Handle conversion operators correctly. (check_for_override): Likewise. PR c++/13323 * g++.dg/inherit/operator2.C: New test. From-SVN: r74370
2003-12-06re PR c++/13305 (Parser error with 'class __attribute__((dllimport)) Foo;' ↵Mark Mitchell2-0/+10
type specifier) PR c++/13305 * parser.c (cp_parser_elaborated_type_specifier): Accept attributes. PR c++/13305 * g++.dg/ext/attrib9.C: New test. From-SVN: r74361
2003-12-06re PR c++/13314 (ICE when omitting template parameter of a sub-class)Mark Mitchell2-0/+11
PR c++/13314 * emit-rtl.c (set_mem_attributes_minus_bitpos): Robustify. PR c++/13314 * parser.c (cp_parser_class_specifier): Match push_scope/pop_scope calls. (cp_parser_class_head): Likewise. PR c++/13314 * g++.dg/template/error7.C: New test. From-SVN: r74359
2003-12-05re PR target/13302 (Putting a va_list in a struct causes seg fault)Stuart Menefy2-0/+14
2003-12-05 Stuart Menefy <stuart.menefy@st.com> J"orn Rennecke <joern.rennecke@superh.com> PR target/13302 gcc: * sh.c (sh_build_builtin_va_list): Use (*lang_hooks.types.make_type). testsuite: * g++.dg/other/struct-va_list.C: New test. Co-Authored-By: J"orn Rennecke <joern.rennecke@superh.com> From-SVN: r74334
2003-12-05re PR c++/13166 ([DR136] not implemented)Kriang Lerdsuwanakij2-0/+16
PR c++/13166 * parser.c (cp_parser_late_parsing_default_args): Make sure the context is a class before calling push_nested_class and pop_nested_class. * g++.dg/parse/defarg6.C: New test. From-SVN: r74333