- 24 Jun, 2019 10 commits
-
-
For the test to succeed there needs to be some header that is to be found in the 'expected' place i.e. <sysroot>/usr/include/. It's important that it is not the name of a header for which fixincludes have been applied, since such headers will be found in the gcc include-fixed dir and, in general, reference additional headers. The dummy sysroot will prevent the additional headers from being found, resulting in a failed test. The fix is to use a header name that isn't expected to be present in a real sysroot. 2019-06-24 Iain Sandoe <iain@sandoe.co.uk> * gcc.dg/cpp/isysroot-1.c (main): Use <example.h> as the test header. * gcc.dg/cpp/usr/include/stdio.h: Rename... * gcc.dg/cpp/usr/include/example.h: ... to this. From-SVN: r272625
Iain Sandoe committed -
Open code string equality with builtin memcmp. This allows further optimizations in the backend. Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/183538 From-SVN: r272624
Ian Lance Taylor committed -
2019-06-24 Richard Biener <rguenther@suse.de> PR tree-optimization/90972 * tree-vect-stmts.c (vect_init_vector): Handle CONSTANT_CLASS_P in common code, dealing with STRING_CST properly. * gcc.dg/torture/pr90972.c: New testcase. From-SVN: r272623
Richard Biener committed -
2019-06-24 Richard Biener <rguenther@suse.de> PR tree-optimization/90930 PR tree-optimization/90316 * tree-ssa-alias.c (walk_non_aliased_vuses): Add missing decrement of limit. From-SVN: r272621
Richard Biener committed -
Instead of going through a C function __go_memcmp, we can just use __builtin_memcmp directly. This allows more optimizations in the compiler backend. Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/183537 From-SVN: r272620
Ian Lance Taylor committed -
gcc/ada/ChangeLog: * gcc-interface/utils.c (handle_nonnull_attribute): Quote attribute name. gcc/c/ChangeLog: * c-typeck.c (build_binary_op): Hyphenate floating-point. gcc/testsuite/ChangeLog: * gcc.dg/Wfloat-equal-1.c: Adjust text of expected diagnostic. * gcc.dg/misc-column.c: Ditto. gcc/ChangeLog: * tree-pretty-print.h: Remove unnecessary punctuation characters from a diagnostic. * tree-ssa.c (release_defs_bitset): Correct preprocessor conditional. From-SVN: r272619
Martin Sebor committed -
* class.c (layout_class_type): Don't use a separate CLASSTYPE_AS_BASE if it's the same size. From-SVN: r272618
Jason Merrill committed -
* include/std/numeric (midpoint(T, T)): Change implementation for floating-point types to avoid incorrect rounding of denormals. * testsuite/26_numerics/midpoint/floating.cc: Add check for correct rounding with denormals. * testsuite/26_numerics/gcd/gcd_neg.cc: Adjust dg-error line numbers. * testsuite/26_numerics/lcm/lcm_neg.cc: Likewise. From-SVN: r272616
Jonathan Wakely committed -
* testsuite/18_support/headers/cfloat/values_c++17.cc: New test. From-SVN: r272615
Jonathan Wakely committed -
From-SVN: r272613
GCC Administrator committed
-
- 23 Jun, 2019 10 commits
-
-
GCC recently introduced -Wformat-diag to scrutinize GCC error messages. It reports a number of warnings about gofrontend code, such as: ../../trunk/gcc/go/gofrontend/import.cc: In member function ‘Type* Import::type_for_index(int, const string&, size_t, bool*)’: ../../trunk/gcc/go/gofrontend/import.cc:1129:48: warning: unquoted operator ‘>=’ in format [-Wformat-diag] 1129 | "error in %s at %lu: bad type index %d >= %d", | ^~ ../../trunk/gcc/go/gofrontend/ast-dump.cc: In member function ‘void Ast_dump_context::dump(Gogo*, const char*)’: ../../trunk/gcc/go/gofrontend/ast-dump.cc:203:25: warning: unquoted option name ‘-fgo-dump-ast’ in format [-Wformat-diag] 203 | "cannot open %s:%m, -fgo-dump-ast ignored", dumpname.c_str()); | ^~~~~~~~~~~~~ ../../trunk/gcc/go/gofrontend/expressions.cc: In static member function ‘static Bexpression* Func_expression::get_code_pointer(Gogo*, Named_object*, Location)’: ../../trunk/gcc/go/gofrontend/expressions.cc:1350:29: warning: misspelled term ‘builtin function’ in format; use ‘built-in function’ instead [-Wformat-diag] 1350 | "invalid use of special builtin function %qs; must be called", | ^~~~~~~~~~~~~~~~ ../../trunk/gcc/go/gofrontend/gogo.cc: In member function ‘void Gogo::add_linkname(const string&, bool, const string&, Location)’: ../../trunk/gcc/go/gofrontend/gogo.cc:2527:4: warning: unquoted sequence of 2 consecutive punctuation characters ‘//’ in format [-Wformat-diag] 2527 | ("%s is not a function; " | ~^~~~~~~~~~~~~~~~~~~~~~~~ 2528 | "//go:linkname is only supported for functions"), | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ This CL edits error messages to avoid these warnings. Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/183497 * go.test/test/blank1.go: Update for diagnostic message changes. From-SVN: r272608
Ian Lance Taylor committed -
GCC recently added a new warning -Wformat-diag which does a lot of rigorous checks on GCC diagnostic messages. This produces a number of unnecessary diagnostics on gofrontend diagnostic output, such as ../../trunk/gcc/go/gofrontend/escape.cc: In member function ‘virtual int Escape_analysis_assign::statement(Block*, size_t*, Statement*)’: ../../trunk/gcc/go/gofrontend/escape.cc:1336:33: warning: spurious leading punctuation sequence ‘[’ in format [-Wformat-diag] 1336 | go_inform(s->location(), "[%d] %s esc: %s", | ^ ../../trunk/gcc/go/gofrontend/escape.cc: In member function ‘void Escape_analysis_assign::call(Call_expression*)’: ../../trunk/gcc/go/gofrontend/escape.cc:1964:17: warning: unquoted operator ‘::’ in format [-Wformat-diag] 1964 | "esccall:: indirect call <- %s, untracked", | ^~ ../../trunk/gcc/go/gofrontend/escape.cc:1964:34: warning: unbalanced punctuation character ‘<’ in format [-Wformat-diag] 1964 | "esccall:: indirect call <- %s, untracked", | ^ Avoid these messages by adding a new function go_debug that uses only printf formatting, not GCC diagnostic formatting, and change all the optimization debugging messages to use it. None of the debugging messages used the GCC diagnostic formatting specifiers anyhow. Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/183437 From-SVN: r272607
Ian Lance Taylor committed -
This cannot pass for current Darwin, since it requires VSX and we don't have any hardware supporting that. Add a dg-requires clause for this. 2019-06-23 Iain Sandoe <iain@sandoe.co.uk> * gcc.target/powerpc/builtins-2.c: Require VSX hardware support. From-SVN: r272606
Iain Sandoe committed -
Darwin (unlike most of the members of the PowerPC port family) defaults to signed chars, so the test was failing to compile with a "mismatched parameters" error. 2019-06-23 Iain Sandoe <iain@sandoe.co.uk> * gcc.target/powerpc/pr80125.c (foo): Use an unsigned char vector explicitly for the vec_perm. From-SVN: r272605
Iain Sandoe committed -
This needs to account for Darwin's __USER_LABEL_PREFIX__. 2019-06-23 Iain Sandoe <iain@sandoe.co.uk> * gcc.target/powerpc/builtins-1.c: Account for Darwin's use of __USER_LABEL_PREFIX__. From-SVN: r272604
Iain Sandoe committed -
For compatibility with other members of the port. Note, that we do not handle the longcall attribute, since longcall is not required/used on current Darwin. 2019-06-23 Iain Sandoe <iain@sandoe.co.uk> * config/rs6000/darwin.h: Handle GCC target pragma. From-SVN: r272603
Iain Sandoe committed -
Emit __PPC__ (32b) and __PPC64__ (64bit) as per the other members of the PowerPC port. 2019-06-23 Iain Sandoe <iain@sandoe.co.uk> * config/rs6000/darwin.h: (__PPC__, __PPC64__): New. From-SVN: r272602
Iain Sandoe committed -
Firstly, we adjust the test conditions to use non-PIC code for Darwin. Secondly, we have to account for out-of-line GPR restores which gives a false positive on one of the scan-assembler-not. Lastly, we make the test a bit more specific for Darwin - that it looks for absence of branches to local labels. 2019-06-23 Iain Sandoe <iain@sandoe.co.uk> * gcc.target/powerpc/pr71785.c: For Darwin, make test non-PIC, expect the out-of-line GPR restore, and test specifically for absence of branches to local labels. From-SVN: r272601
Iain Sandoe committed -
From-SVN: r272600
Marek Polacek committed -
From-SVN: r272599
GCC Administrator committed
-
- 22 Jun, 2019 12 commits
-
-
From-SVN: r272595
Jerry DeLisle committed -
re PR fortran/89782 (Can do an internal READ of a character array when it is a parameter, but not a scalar character parameter) 2019-06-22 Jerry DeLisle <jvdelisle@gcc.gnu.org> PR fortran/89782 * io.c (gfc_resolve_dt): Check that internal units are not character PARAMETER. * gfortran.dg/io_constraints.f90: New test. From-SVN: r272594
Jerry DeLisle committed -
The two tests use decimal floating point, add the relevant dg-requires so that they are unsupported on platforms without DFP. 2019-06-22 Iain Sandoe <iain@sandoe.co.uk> * gcc.target/powerpc/pr64205.c: Require effective target dfp. * gcc.target/powerpc/pr79909.c: Likewise. From-SVN: r272592
Iain Sandoe committed -
This test is failing because of a pedantic warning that is unrelated to the purpose of the test. Fixed by suppressing that warning. 2019-06-22 Iain Sandoe <iain@sandoe.co.uk> * gcc.target/powerpc/darwin-bool-1.c: Suppress the pedantic warning about _Bool. From-SVN: r272591
Iain Sandoe committed -
From-SVN: r272590
Jeff Law committed -
PR c++/65707 PR c++/89480 PR c++/58836 * g++.dg/cpp0x/nondeduced5.C: New test. * g++.dg/cpp0x/nondeduced6.C: New test. * g++.dg/cpp0x/nondeduced7.C: New test. From-SVN: r272589
Marek Polacek committed -
PR c++/66256 * g++.dg/cpp0x/noexcept54.C: New test. From-SVN: r272588
Marek Polacek committed -
* gcc.dg/tree-ssa/alias-access-path-6.c: New testcase. * tree-ssa-alias.c (nonoverlapping_component_refs_p): Do not give up on bitfields; continue searching for different refs appearing later. From-SVN: r272587
Jan Hubicka committed -
PR c++/52869 * cp-tree.def (DEFAULT_ARG): Update commentary. * cp-tree.h (UNPARSED_NOEXCEPT_SPEC_P): New macro. (tree_default_arg): Use tree_base instead of tree_common. (do_push_parm_decls, maybe_check_overriding_exception_spec): Declare. * decl.c (do_push_parm_decls): New function, broken out of... (store_parm_decls): ...here. Call it. * except.c (nothrow_spec_p): Accept DEFAULT_ARG in the assert. * parser.c (cp_parser_noexcept_specification_opt, cp_parser_late_noexcept_specifier, noexcept_override_late_checks): Forward-declare. (unparsed_noexcepts): New macro. (push_unparsed_function_queues): Update initializer. (cp_parser_direct_declarator): Pass FRIEND_P to cp_parser_exception_specification_opt. (inject_parm_decls): New. (pop_injected_parms): New. (cp_parser_class_specifier_1): Implement delayed parsing of noexcept-specifiers. (cp_parser_save_noexcept): New. (cp_parser_late_noexcept_specifier): New. (noexcept_override_late_checks): New. (cp_parser_noexcept_specification_opt): Add FRIEND_P parameter. Call cp_parser_save_noexcept instead of the normal processing if needed. (cp_parser_exception_specification_opt): Add FRIEND_P parameter and pass it to cp_parser_noexcept_specification_opt. (cp_parser_save_member_function_body): Fix comment. (cp_parser_save_default_args): Maybe save the noexcept-specifier to post process. (cp_parser_transaction): Update call to cp_parser_noexcept_specification_opt. (cp_parser_transaction_expression): Likewise. * parser.h (cp_unparsed_functions_entry): Add new field to carry a noexcept-specifier. * pt.c (dependent_type_p_r): Handle unparsed noexcept expression. * search.c (maybe_check_overriding_exception_spec): New function, broken out of... (check_final_overrider): ...here. Call maybe_check_overriding_exception_spec. * tree.c (canonical_eh_spec): Handle UNPARSED_NOEXCEPT_SPEC_P. (cp_tree_equal): Handle DEFAULT_ARG. * g++.dg/cpp0x/noexcept45.C: New test. * g++.dg/cpp0x/noexcept46.C: New test. * g++.dg/cpp0x/noexcept47.C: New test. * g++.dg/cpp0x/noexcept48.C: New test. * g++.dg/cpp0x/noexcept49.C: New test. * g++.dg/cpp0x/noexcept50.C: New test. * g++.dg/cpp0x/noexcept51.C: New test. * g++.dg/cpp0x/noexcept52.C: New test. * g++.dg/cpp0x/noexcept53.C: New test. * g++.dg/eh/shadow1.C: Adjust dg-error. From-SVN: r272586
Marek Polacek committed -
* cvt.c (convert_to_void): Don't emit unused warnings in an unevaluated context. * g++.dg/cpp0x/Wunused-value1.C: New test. From-SVN: r272585
Marek Polacek committed -
/cp 2019-06-22 Paolo Carlini <paolo.carlini@oracle.com> * decl.c (grokdeclarator): Use id_loc, typespec_loc, and locations[ds_storage_class] in a few additional places. /testsuite 2019-06-22 Paolo Carlini <paolo.carlini@oracle.com> * g++.dg/diagnostic/auto-storage-1.C: New. * g++.dg/diagnostic/no-type-1.C: Likewise. * g++.dg/diagnostic/no-type-2.C: Likewise. * g++.dg/diagnostic/top-level-auto-1.C: Likewise. * g++.dg/cpp0x/auto9.C: Test some locations too. * g++.dg/cpp1z/register1.C: Likewise. * g++.dg/cpp1z/register2.C: Likewise. * g++.dg/cpp1z/register3.C: Likewise. * g++.dg/other/error34.C: Likewise. From-SVN: r272584
Paolo Carlini committed -
From-SVN: r272583
GCC Administrator committed
-
- 21 Jun, 2019 8 commits
-
-
Let the Go frontend recognize some math/bits functions and turn them into intrinsics. Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/183266 * go-gcc.cc (Gcc_backend::Gcc_backend): Define math/bits builtins. From-SVN: r272579
Cherry Zhang committed -
Now that type equality is just a pointer equality, write it inlined and remove the eqtype function. Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/182978 From-SVN: r272578
Ian Lance Taylor committed -
Now that type equality is just simple pointer equality, we can open code some type assertions instead of making runtime calls. Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/182977 From-SVN: r272577
Ian Lance Taylor committed -
2019-06-21 Paolo Carlini <paolo.carlini@oracle.com> PR c++/90909 * g++.dg/other/final7.C: New. From-SVN: r272576
Paolo Carlini committed -
* tree-vect-data-refs.c (vect_find_stmt_data_reference): Handle even zero DR_OFFSET, but DR_BASE_ADDRESS of POINTER_PLUS_EXPR containing the offset as possible simd lane access. Look through widening conversion. Move the TREE_CODE (DR_INIT (newdr)) == INTEGER_CST test earlier and reindent. * g++.dg/vect/simd-2.cc: Don't xfail, instead expect vectorization on x86. * g++.dg/vect/simd-5.cc: Likewise. From-SVN: r272575
Jakub Jelinek committed -
/cp 2019-06-21 Paolo Carlini <paolo.carlini@oracle.com> PR c++/90909 Revert: 2019-05-21 Paolo Carlini <paolo.carlini@oracle.com> PR c++/67184 PR c++/69445 * call.c (build_over_call): Devirtualize when the final overrider comes from the base. /testsuite 2019-06-21 Paolo Carlini <paolo.carlini@oracle.com> PR c++/90909 Revert: 2019-05-21 Paolo Carlini <paolo.carlini@oracle.com> PR c++/67184 PR c++/69445 * g++.dg/other/final3.C: New. * g++.dg/other/final4.C: Likewise. * g++.dg/other/final5.C: Likewise. * g++.dg/other/final6.C: New. From-SVN: r272574
Paolo Carlini committed -
/cp 2019-06-21 Paolo Carlini <paolo.carlini@oracle.com> PR c++/90909 Revert: 2019-05-21 Paolo Carlini <paolo.carlini@oracle.com> PR c++/67184 PR c++/69445 * call.c (build_over_call): Devirtualize when the final overrider comes from the base. /testsuite 2019-06-21 Paolo Carlini <paolo.carlini@oracle.com> PR c++/90909 Revert: 2019-05-21 Paolo Carlini <paolo.carlini@oracle.com> PR c++/67184 PR c++/69445 * g++.dg/other/final3.C: New. * g++.dg/other/final4.C: Likewise. * g++.dg/other/final5.C: Likewise. * g++.dg/other/final6.C: New. From-SVN: r272573
Paolo Carlini committed -
* decl.c (grokdeclarator): Diagnose qualified-id in friend function definition. Improve location for diagnostics of friend functions. * g++.dg/diagnostic/friend2.C: New test. * g++.dg/diagnostic/friend3.C: New test. From-SVN: r272572
Marek Polacek committed
-