- 10 May, 2020 1 commit
-
-
GCC Administrator committed
-
- 09 May, 2020 1 commit
-
-
GCC Administrator committed
-
- 08 May, 2020 3 commits
-
-
Here we have (conceptually *) something like struct B { }; struct D : B { }; D(0); // invalid and in C++20 the ()-initialization has created a { 0 } constructor that it tries to initialize an object of type D with. We should reject initializing an object of type B from 0, but we wrongly accept it because process_init_constructor_record skips initializers for empty bases/fields: if (DECL_SIZE (field) && integer_zerop (DECL_SIZE (field)) && !TREE_SIDE_EFFECTS (next)) /* Don't add trivial initialization of an empty base/field to the constructor, as they might not be ordered the way the back-end expects. */ continue; but here 'next' was error_mark_node, returned by massage_elt_init, so we wound up with { } which would validly value-initialize the object. [*] Usually digest_init in build_new_method_call_1 would detect this, but in this case the instance is is_dummy_object and we don't call digest just yet. PR c++/94885 * typeck2.c (process_init_constructor_record): Return PICFLAG_ERRONEOUS if an initializer element was erroneous. * g++.dg/cpp2a/paren-init26.C: New test.
Marek Polacek committed -
On Thu, May 07, 2020 at 02:45:29PM +0200, Thomas Schwinge wrote: > >>+ for (tree op = win; TREE_CODE (op) == COMPOUND_EXPR; > > ..., and new 'op' variable here. > > >>+ op = TREE_OPERAND (op, 1)) > >>+ v.safe_push (op); > >>+ FOR_EACH_VEC_ELT_REVERSE (v, i, op) > >>+ ret = build2_loc (EXPR_LOCATION (op), COMPOUND_EXPR, > >>+ TREE_TYPE (win), TREE_OPERAND (op, 0), > >>+ ret); > >>+ return ret; > >> } > >> while (TREE_CODE (op) == NOP_EXPR) > >> { There is no reason for the shadowing and op at this point acts as a temporary and will be overwritten in FOR_EACH_VEC_ELT_REVERSE anyway. So, we can just s/tree // here. 2020-05-08 Jakub Jelinek <jakub@redhat.com> PR middle-end/94724 * tree.c (get_narrower): Reuse the op temporary instead of shadowing it.
Jakub Jelinek committed -
GCC Administrator committed
-
- 07 May, 2020 18 commits
-
-
The deduced return type causes the instantiation of the function body, which can then require the instantiation of std::projected::operator* which is intentionally not defined. This patch uses a helper trait to define the return type, so that the function body doesn't need to be instantiated. Unlike on the master branch, this backport to gcc-10 does not change the iter_rvalue_reference_t alias template and __indirectly_readable_impl concept to use the new trait. Backport from mainline 2020-05-01 Jonathan Wakely <jwakely@redhat.com> Patrick Palka <ppalka@redhat.com> PR libstdc++/92894 * include/bits/iterator_concepts.h (ranges::__cust_imove::_IMove): Add trait to determine return type and an alias for it. (ranges::__cust_imove::_IMove::operator()): Use __result instead of deduced return type. * testsuite/24_iterators/customization_points/92894.cc: New test. * testsuite/24_iterators/indirect_callable/92894.cc: New test. Co-authored-by: Patrick Palka <ppalka@redhat.com>
Jonathan Wakely committed -
Here we ICE with -std=c++98 since the newly added call to uses_template_parms (r10-6357): we hit 26530 gcc_assert (cxx_dialect >= cxx11 26531 || INTEGRAL_OR_ENUMERATION_TYPE_P (type)); and TYPE is a record type. The problem is that the argument to value_dependent_expression_p does not satisfy potential_constant_expression which it must, as the comment explains. I thought about fixing this in uses_template_parms -- only call v_d_e_p if p_c_e is true, but in this case we want to also suppress the warnings if we don't have a constant expression. I couldn't simply check TREE_CONSTANT as in compute_array_index_type_loc, because then we'd stop warning in the new Wtype-limits3.C test. Fixed by using type_dependent_expression_p_push instead. This means that we won't suppress the warnings for value-dependent expressions that aren't type-dependent, e.g. sizeof (T). This only seems to make a difference for -Wdiv-by-zero, now tested in Wdiv-by-zero-3.C, where I think it's reasonable to warn. It could make -Wtautological-compare warn more, but that warning doesn't trigger when it gets constant arguments. Wtype-limits4.C is a test reduced from poly-int.h and it tests a scenario that was missing in our testsuite. This patch also moves the warning_sentinels after the RECURs -- we mean to use them for build_x_binary_op purposes only. PR c++/94938 * pt.c (tsubst_copy_and_build): Call type_dependent_expression_p_push instead of uses_template_parms. Move the warning_sentinels after the RECURs. * g++.dg/warn/Wdiv-by-zero-3.C: New test. * g++.dg/warn/Wtype-limits4.C: New test. * g++.dg/warn/template-2.C: New test. * g++.old-deja/g++.pt/crash10.C: Add dg-warning.
Marek Polacek committed -
Essentially the same fix as for x86. 2020-05-07 Uroš Bizjak <ubizjak@gmail.com> gcc/ * config/alpha/alpha.c (alpha_atomic_assign_expand_fenv): Use TARGET_EXPR instead of MODIFY_EXPR for the first assignments to fenv_var and new_fenv_var.
Uros Bizjak committed -
Backport from mainline 2020-05-07 Martin Liska <mliska@suse.cz> * doc/invoke.texi: Fix 2 optindex entries.
Martin Liska committed -
The testcase in the current form doesn't FAIL without the patch on x86_64-linux unless also testing with -m32; as that the 64-bit testing on that target is probably way more common, and we can use also attributes that FAIL without the patch with -m64, the following patch adjusts the test, so that it FAILs without the patch for both -m64 and -m32 (but not -mx32) and PASSes with the patch. 2020-05-07 Jakub Jelinek <jakub@redhat.com> PR c++/94946 * g++.dg/ext/attr-parm-1.C: Enable the test also for lp64 x86, use sysv_abi and ms_abi attributes in that case instead of fastcall and no attribute.
Jakub Jelinek committed -
If the second argument of __builtin_speculation_safe_value is error_mark_node (or has such a type), we ICE during useless_typ_conversion_p. 202-05-07 Jakub Jelinek <jakub@redhat.com> PR c/94968 * c-common.c (speculation_safe_value_resolve_params): Return false if error_operand_p (val2). (resolve_overloaded_builtin) <case BUILT_IN_SPECULATION_SAFE_VALUE_N>: Remove extraneous semicolon. * gcc.dg/pr94968.c: New test.
Jakub Jelinek committed -
The following testcase gets a bogus warning during build_base_path, when cp_build_indirect_ref* calls strict_aliasing_warning with a dependent expression. IMHO calling get_alias_set etc. on dependent types feels wrong to me, we should just defer the warnings in those cases until instantiation and only handle the cases where neither type nor expr are dependent. 2020-05-06 Jakub Jelinek <jakub@redhat.com> PR c++/94951 * typeck.c (cp_strict_aliasing_warning): New function. (cp_build_indirect_ref_1, build_reinterpret_cast_1): Use it instead of strict_aliasing_warning. * g++.dg/warn/Wstrict-aliasing-bogus-tmpl.C: New test.
Jakub Jelinek committed -
On the following testcase we ICE, because synthesize_method is called twice on the same sfk_comparison method fndecl, the first time it works fine because start_preparsed_function in that case sets both current_function_decl and cfun, but second time it is called it only sets the former and keeps cfun NULL, so we ICE when trying to store current_function_returns_value. I think it is just wrong to call synthesize_method multiple times, and most synthesize_method callers avoid that by not calling it if DECL_INITIAL is already set, so this patch does that too. 2020-05-06 Jakub Jelinek <jakub@redhat.com> PR c++/94907 * method.c (defaulted_late_check): Don't call synthesize_method on constexpr sfk_comparison if it has been called on it already. * g++.dg/cpp2a/spaceship-synth8.C: New test.
Jakub Jelinek committed -
Similarly to the fixes on many other targets, riscv needs to use TARGET_EXPR to avoid having the create_tmp_var_raw temporaries without proper DECL_CONTEXT and not mentioned in local decls. 2020-05-06 Jakub Jelinek <jakub@redhat.com> PR target/94950 * config/riscv/riscv-builtins.c (riscv_atomic_assign_expand_fenv): Use TARGET_EXPR instead of MODIFY_EXPR for first assignment to old_flags.
Jakub Jelinek committed -
There were some discussions about whether REG_EQUAL notes are valid on insns with a single set which contains auto-inc-dec side-effects in the SET_SRC and the majority thinks that it should be valid. So, this patch fixes the combiner to punt in that case, because otherwise the auto-inc-dec side-effects from the SET_SRC are lost. 2020-05-06 Jakub Jelinek <jakub@redhat.com> PR rtl-optimization/94873 * combine.c (combine_instructions): Don't optimize using REG_EQUAL note if SET_SRC (set) has side-effects. * gcc.dg/pr94873.c: New test.
Jakub Jelinek committed -
This insn and split splits into HI->V?HImode broadcast for avx2 and later, but either the operands need to be %xmm0-%xmm15 (i.e. VEX encoded insn), or the insn needs both AVX512BW and AVX512VL. Now, Yv constraint is v for AVX512VL and x otherwise, so for -mavx512vl -mno-avx512bw we ICE if we end up with a %xmm16+ register from RA. Yw constraint is v for AVX512VL and AVX512BW and nothing otherwise, so in this pattern we actually need xYw. 2020-05-05 Jakub Jelinek <jakub@redhat.com> PR target/94942 * config/i386/mmx.md (*vec_dupv4hi): Use xYw constraints instead of Yv. * gcc.target/i386/pr94942.c: New test.
Jakub Jelinek committed -
While testing the --with-documentation-root-url= changes, I run into [Wreturn-type] URL pointing to gfortran documentation where it obviously isn't documented. The following patch updates the list of options to match reality (on the other side -Wconversion-extra is gfortran only option documented in gfortran.texi). Or, perhaps better use the attached patch instead, which doesn't have a hardcoded list and instead uses the flags? I went through options.c and the updated list of options matches exactly the cases where CL_Fortran is set for "-W*" options together with CL_C and/or CL_CXX (ok, there is also -Wall and -Wextra, but hopefully we don't emit [Wall] or [Wextra] for anything). 2020-05-04 Jakub Jelinek <jakub@redhat.com> * opts.c (get_option_html_page): Instead of hardcoding a list of options common between C/C++ and Fortran only use gfortran/ documentation for warnings that have CL_Fortran set but not CL_C or CL_CXX.
Jakub Jelinek committed -
If there are _Atomic side-effects in the parameter declarations of non-nested function, when they are parsed, current_function_decl is NULL, the create_artificial_label created labels during build_atomic* are then adjusted by store_parm_decls through set_labels_context_r callback. Unfortunately, if such thing happens in nested function parameter declarations, while those decls are parsed current_function_decl is the parent function (and am not sure it is a good idea to temporarily clear it, some code perhaps should be aware it is in a nested function, or it can refer to variables from the parent function etc.) and that means store_param_decls through set_labels_context_r doesn't adjust anything. As those labels are emitted in the nested function body rather than in the parent, I think it is ok to override the context in those cases. 2020-04-30 Jakub Jelinek <jakub@redhat.com> PR c/94842 * c-decl.c (set_labels_context_r): In addition to context-less LABEL_DECLs adjust also LABEL_DECLs with context equal to parent function if any. (store_parm_decls): Adjust comment. * gcc.dg/pr94842.c: New test.
Jakub Jelinek committed -
2020-05-07 Jakub Jelinek <jakub@redhat.com> * BASE-VER: Set to 10.1.1.
Jakub Jelinek committed -
Jakub Jelinek committed
-
2020-05-07 Jakub Jelinek <jakub@redhat.com> * gennews (files): Add files for GCC 10.
Jakub Jelinek committed -
Eric Botcazou committed
-
GCC Administrator committed
-
- 06 May, 2020 9 commits
-
-
This uses a target spec to test only on ia32 targets
Nathan Sidwell committed -
Jason's fix for 90570 & 79585 was a bit overzealous. Dependent attribs should still attach to a parameter decl. * decl.c (grokdeclarator): Don't splice template attributes in parm context -- they can apply to the parm.
Nathan Sidwell committed -
This version of the fix uses __getauxval instead of getauxval. The whole thing is guarded simply on __gnu_linux__. __getauxval was introduced in 2.16 but the aarch64 port was added in 2.17 so in practice I expect all aarch64 glibcs to support __getauxval. Bootstrapped and tested on aarch64-none-linux-gnu. Also tested on aarch64-none-elf. 2020-05-06 Kyrylo Tkachov <kyrylo.tkachov@arm.com> * config/aarch64/lse-init.c (init_have_lse_atomics): Use __getauxval instead of getauxval. (AT_HWCAP): Define. (HWCAP_ATOMICS): Define. Guard detection on __gnu_linux__.
Kyrylo Tkachov committed -
* config/abi/post/x86_64-linux-gnu/x32/baseline_symbols.txt: Updated.
H.J. Lu committed -
I just remembered that the libstdc++ ABI baselines haven't been updated for the GCC 10 release yet. This patch corrects this for Solaris/SPARC and x86. Created on master with make new-abi-baseline on i386-pc-solaris2.11 and sparc-sun-solaris2.11, bootstrapped on gcc-10 branch without regressions. * config/abi/post/i386-solaris/baseline_symbols.txt: Regenerate. * config/abi/post/i386-solaris/amd64/baseline_symbols.txt: Likewise. * config/abi/post/sparc-solaris/baseline_symbols.txt: Likewise. * config/abi/post/sparc-solaris/sparcv9/baseline_symbols.txt: Likewise.
Rainer Orth committed -
* doc/xml/manual/abi.xml (abi.versioning.history): Document library versions for GCC 9.[123] and 10.1 releases. * doc/html/*: Regenerate.
Jonathan Wakely committed -
On Wed, May 06, 2020 at 10:49:13AM +0200, Rainer Orth wrote: > I just remembered that the libstdc++ ABI baselines haven't been updated > for the GCC 10 release yet. This patch corrects this for Solaris/SPARC > and x86. Oops, here are the updates from Fedora packages built during the weekend. 2020-05-06 Jakub Jelinek <jakub@redhat.com> * config/abi/post/x86_64-linux-gnu/baseline_symbols.txt: Update. * config/abi/post/x86_64-linux-gnu/32/baseline_symbols.txt: Update. * config/abi/post/i386-linux-gnu/baseline_symbols.txt: Update. * config/abi/post/i486-linux-gnu/baseline_symbols.txt: Update. * config/abi/post/aarch64-linux-gnu/baseline_symbols.txt: Update. * config/abi/post/s390x-linux-gnu/baseline_symbols.txt: Update. * config/abi/post/powerpc64-linux-gnu/baseline_symbols.txt: Update.
Jakub Jelinek committed -
This patch updates install.texi for GCC 10 on Solaris. It includes some general cleanup and updates and includes a couple of caveats, some of them found when testing GCC 10.1.0 RC1 with only the bundled tools. The reference to TGCware on the binaries page is gone because they only provide binaries up to Solaris 9. The note about configuring 64-bit Solaris/SPARC compilers with --build=sparcv9-sun-solaris2.11 became necessary because upstream config.guess silently reverted my patch to automatically detect this. We already had a bug report about a comparison failure caused by this issue. Tested with make doc/gccinstall.info and doc/gccinstall.pdf and inspection of the resulting files. * doc/install.texi: Replace Sun with Solaris as appropriate. (Tools/packages necessary for building GCC, Perl version between 5.6.1 and 5.6.24): Remove Solaris 8 reference. (Installing GCC: Binaries, Solaris 2 (SPARC, Intel)): Remove TGCware reference. (Specific, i?86-*-solaris2*): Update version references for Solaris 11.3 and later. Remove gas 2.26 caveat. (Specific, *-*-solaris2*): Update version references for Solaris 11.3 and later. Remove boehm-gc reference. Document GMP, MPFR caveats on Solaris 11.3. (Specific, sparc-sun-solaris2*): Update Solaris 9 references. (Specific, sparc64-*-solaris2*): Likewise. Document --build requirement.
Rainer Orth committed -
GCC Administrator committed
-
- 05 May, 2020 2 commits
-
-
I've recently tested i386-pc-solaris2.11 bootstrap on Solaris 11/x86 with only the bundled tools (using /usr/gnu/bin/as from binutils 2.30 in this case). It failed compiling libgo/runtime/proc.c, creating invalid assembly: proc.s: Assembler messages: proc.s:2092: Error: junk at end of line, first unrecognized character is `*' .globl __emutls_v.*runtime.g and several more errors. This is completely unexpected since Solaris does support TLS. It turned out that 32-bit TLS detection in gcc/configure had failed: configure:25145: checking assembler for thread-local storage support configure:25158: /usr/gnu/bin/as --fatal-warnings -o conftest.o conftest.s >&5 conftest.s: Assembler messages: conftest.s:6: Error: relocated field and relocation type differ in signedness conftest.s:7: Error: @TLSLDM reloc is not supported with 64-bit output format conftest.s:7: Error: junk `@tlsldm' after expression which isn't unexpected given that the bundled gas has been configured for x86_64-pc-solaris2.11, i.e. 64-bit-default. This is easily fixed by explicitly passing --32 for the 32-bit case, matching what is done for the 64-bit test. Tested on i386-pc-solaris2.11 with 32-bit-default and 64-bit-default gas as well as with /usr/bin/as, always correctly detecting TLS support. * configure.ac <i[34567]86-*-*>: Add --32 to tls_as_opt on Solaris. * configure: Regenerate.
Rainer Orth committed -
GCC Administrator committed
-
- 04 May, 2020 6 commits
-
-
The previous URL to an entry in the wayback machine now redirects to a page saying "SGI.com Tech Archive Resources now retired" so use an older entry from the archive. * doc/xml/faq.xml: Use working link for SGI STL FAQ. * doc/html/*: Regenerate.
Jonathan Wakely committed -
This fixes two compilation errors preventing bootstrap with Ada on x86_64-pc-cygwin. 2020-05-04 Mikael Pettersson <mikpelinux@gmail.com> PR bootstrap/94918 * mingw32.h: Prevent windows.h from including emmintrin.h on Cygw64. * s-oscons-tmplt.c (Serial_Port_Descriptor): Use System.Win32.HANDLE also on Cygwin.
Eric Botcazou committed -
create_output_operand coerces an output operand to the insn's predicates, using a suggested rtx location if convenient. But if that rtx location is actually required rather than optional, the builder of the insn has to emit a move afterwards. (We could instead add a new interface that does this automatically, but that's future work.) This PR shows that we were failing to emit the move for some of the vector load internal functions. I think there are other routines in internal-fn.c that potentially have the same problem, but this patch is supposed to be a conservative subset suitable for backporting to GCC 10. 2020-05-04 Richard Sandiford <richard.sandiford@arm.com> gcc/ PR middle-end/94941 * internal-fn.c (expand_load_lanes_optab_fn): Emit a move if the chosen lhs is different from the gcall lhs. (expand_mask_load_optab_fn): Likewise. (expand_gather_load_optab_fn): Likewise. gcc/testsuite/ PR middle-end/94941 * gcc.target/aarch64/sve/acle/general/unoptimized_1.c: New test.
Richard Sandiford committed -
* sv.po: Update.
Joseph Myers committed -
Revert: 2020-04-30 Marek Polacek <polacek@redhat.com> PR c++/94775 * tree.c (check_base_type): Return true only if TYPE_USER_ALIGN match. (check_aligned_type): Check if TYPE_USER_ALIGN match.
Marek Polacek committed -
GCC Administrator committed
-