aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2020-12-22gimplify: Gimplify value in gimplify_init_ctor_eval_range [PR98353]Jakub Jelinek2-1/+22
gimplify_init_ctor_eval_range wasn't gimplifying value, so if it wasn't a gimple val, verification at the end of gimplification would ICE (or with release checking some random pass later on would ICE or misbehave). 2020-12-21 Jakub Jelinek <jakub@redhat.com> PR c++/98353 * gimplify.c (gimplify_init_ctor_eval_range): Gimplify value before storing it into cref. * g++.dg/opt/pr98353.C: New test.
2020-12-21c++: Fix demangling of qualified-id after '.'Jason Merrill2-4/+19
The demangler was assuming that only an unqualified-id could appear after . or ->. libiberty/ChangeLog: * cp-demangle.c (d_expression_1): Recognize qualified-id on RHS of dt/pt. * testsuite/demangle-expected: Add test.
2020-12-21c++: Fix demangling of x.operator typeJason Merrill2-1/+13
d_operator_name decides whether "cv" indicates a cast or a conversion operator based on is_expression. "on" specifies that we want the conversion operator. libiberty/ChangeLog: * cp-demangle.c (d_unqualified_name): Clear is_expression. * testsuite/demangle-expected: Add tests.
2020-12-21Darwin : Update the kernel version to macOS version mapping.Iain Sandoe1-2/+15
With the change to macOS 11 and Darwin20, the algorithm for mapping kernel version to macOS version has changed. We now have darwin 20.X.Y => macOS 11.(X > 0 ? X - 1 : 0).??. It currently unclear if the Y will be mapped to macOS patch version and, if so, whether it will be one-based or 0-based. Likewise, it's unknown if Darwin 21 will map to macOS 12, so these entries are unchanged for the present. gcc/ChangeLog: * config/darwin-driver.c (darwin_find_version_from_kernel): Compute the minor OS version from the minor kernel version.
2020-12-21libstdc++: Disable floating-point std::to_chars on unsupported targetsPatrick Palka7-4/+33
This patch conditionally disables the floating-point std::to_chars implementation on targets whose float and double aren't IEEE binary32 and binary64, until a proper fallback can be added for such targets. This fixes a bootstrap failure on non-IEEE-754 FP targets such as vax-netbsdelf. The new preprocessor tests in c++config that detect the binary32 and binary64 formats were copied from gcc/testsuite/gcc.dg/float-exact-1.c. libstdc++-v3/ChangeLog: * include/bits/c++config (_GLIBCXX_FLOAT_IS_IEEE_BINARY_32): Define this macro. (_GLIBCXX_DOUBLE_IS_IEEE_BINARY_64): Likewise. * include/std/charconv (to_chars): Use these macros to conditionally hide the overloads for floating-point types. * src/c++17/floating_to_chars.cc: Use the macros to conditionally disable this file. (floating_type_traits<float>): Remove redundant static assert. (floating_type_traits<double>): Likewise. * testsuite/20_util/to_chars/double.cc: Run this test only on ieee-floats effective targets. * testsuite/20_util/to_chars/float.cc: Likewise. * testsuite/20_util/to_chars/long_double.cc: Likewise. * testsuite/lib/libstdc++.exp (check_effective_target_ieee-floats): Define new proc for detecting whether float and double have the IEEE binary32 and binary64 formats.
2020-12-21c++: Windows rename [PR 98412]Nathan Sidwell1-2/+12
Some system's rename(2) fails if the target already exists, so delete it first. gcc/cp/ * module.cc (create_dirs): Add logging. (finish_module_processing): Unlink before rename.
2020-12-21bootstrap: std:stoul non-portable [PR 98412]Nathan Sidwell4-6/+18
Fix some more system-specific issues. Not everyone's C++11 is the same :( PR bootstrap/98412 libcody/ * client.cc: Include cstdlib. * server.cc: Include cstdlib. gcc/cp/ * mapper-client.cc: INCLUDE_STRING, INCLUDE_VECTOR. (module_client::open_module_client): Avoid std::stoul. * mapper-resolver.cc: INCLUDE_STRING, INCLUDE_VECTOR.
2020-12-21libcody: Include <netinet/in.h> as neededGerald Pfeifer1-0/+1
libcody as originally added to GCC fail to build on *-unknown-freebsd11.4 and presumably others: c++ -std=c++11 -g -include config.h -I ... -MMD -MP -MF netclient.d -c -o netclient.o .../libcody/netclient.cc:114:3: error: unknown type sockaddr_in6 addr; ^~~~~~~~~~~~ sockaddr_in6 is declared in /usr/include/netinet6/in6.h, which is included by /usr/include/netinet/in.h. Indeed, per https://man7.org/linux/man-pages/man7/ipv6.7.html #include <sys/socket.h> #include <netinet/in.h> should be included, and our own gcc/ada/gsocket.h also has #if !(defined (VMS) || defined (__MINGW32__)) #include <sys/socket.h> #include <sys/un.h> #include <netinet/in.h> : #endif libcody/ChangeLog: 2020-12-21 Gerald Pfeifer <gerald@pfeifer.com> * netserver.cc: Include <netinet/in.h>.
2020-12-21libcody: Add ranlibNathan Sidwell4-0/+96
Add RANLIB. libcody/ * Makefile.in (RANLIB): New var. * Makesub.in (libcody.a): Apply RANLIB. * configure.ac: Call AC_PROG_RANLIB. * configure: Rebuilt.
2020-12-21libcody: to_string is not always available [PR 98412]Nathan Sidwell1-1/+7
to_string is not always available, so don't use it. libcody/ * buffer.cc (MessageBuffer::AppendInteger): Workaround to_string's non-ubiquity.
2020-12-21libcody: Add netinet.hNathan Sidwell1-0/+1
We explicitly need to inlude netinet.h, (despite what happened on my test systems) libcody/ * netclient.cc: Add netinet.h.
2020-12-21c++tools: Fix exe suffix [PR 98409]Nathan Sidwell1-1/+1
I had a thinko about variable case, and, coupled with Make's behaviour of just consing up variables out of nothing, and linux not having an executable extension, didn't notice. PR other/98409 c++tools/ * Makefile.in: Fix exeext variable case.
2020-12-21gcc-changelog: new error for quoted utf8 filenamesMartin Liska3-0/+39
contrib/ChangeLog: * gcc-changelog/git_commit.py: Add new error for quoted filenames. * gcc-changelog/test_email.py: Test it. * gcc-changelog/test_patches.txt: Test it.
2020-12-21gcc-changelog: add Unicode test-caseMartin Liska2-0/+32
contrib/ChangeLog: * gcc-changelog/test_email.py: New test. * gcc-changelog/test_patches.txt: Likewise.
2020-12-21fold-const: Fix up a buffer overflow in native_encode_initializer [PR98407]Jakub Jelinek2-3/+13
For flexible array members we need to incrementally clear just from ptr + total_bytes up to new ptr + total_bytes, but memset has been called with the length from ptr, so was missing - total_bytes. Additionally, in this code off is guaranteed to be -1 and thus o 0, so don't bother pretending we could handle anything else, it would be more complicated than that. 2020-12-21 Jakub Jelinek <jakub@redhat.com> PR tree-optimization/98407 * fold-const.c (native_encode_initializer): When handling flexible array members, fix up computation of length for memset. Also remove " - o" as o is always guaranteed to be 0 in this code path. * gcc.c-torture/compile/pr98407.c: New test.
2020-12-21openmp: Fix up handling of addressable temporaries in simd lb, b and incr ↵Jakub Jelinek2-3/+38
expressions [PR98383] For simd, we have code to artificially add locally defined variables into private clauses if they are addressable, so that omplower turns them into "omp simd array" variables. As the testcase shows, this is undesirable if those temporaries only show in the lb, b or incr expressions and nowhere else, if it is just used there, we really want normal scalar temporaries. This patch implements that by making sure we don't set for those GOVD_LOCAL-ish temporaries turned into GOVD_PRIVATE the GOVD_SEEN flag during gimplification of the lb, b and incr expressions, which means that the private clause isn't added for those. 2020-12-21 Jakub Jelinek <jakub@redhat.com> PR c++/98383 * gimplify.c (struct gimplify_omp_ctx): Add in_for_exprs flag. (gimple_add_tmp_var): For addressable temporaries appearing in simd lb, b or incr expressions, don't add a private clause unless it is seen also outside of those expressions in the simd body. (omp_notice_variable): Likewise. (gimplify_omp_for): Set and reset in_for_exprs around gimplification of lb, b or incr expressions. * g++.dg/gomp/pr98383.C: New test.
2020-12-20libgo: adjust sysinfo scripts for changed -fdump-go-specNikhil Benesch4-92/+22
The -fdump-go-spec flag to GCC recently changed to be more fastidious about handling incomplete types. This caused some breakage in mk[r]sysinfo.sh on Solaris. This commit adjusts for the new behavior. Specifically: * Types that refer to _in6_addr may be hidden behind a typedef and can no longer be filtered out with `grep -v in6_addr`. Instead just rewrite the definition of _in6_addr to [16]byte wherever it appears. * timestruc_t is now (correctly) emitted as an alias for timespec, so this case is handled specially. * stdio.h is included in sysinfo.c to avoid emitting an incomplete definition of the FILE type. * Dummy definitions for _u?pad128_t are now emitted automatically, which conflict with the definitions installed by mk[r]sysinfo.sh. These definitions were actually dead code, so just remove them. Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/278672
2020-12-21Daily bump.GCC Administrator6-1/+36
2020-12-20gcc: xtensa: implement bswapsi2, bswapdi2 and helpersMax Filippov4-0/+75
2020-12-20 Max Filippov <jcmvbkbc@gmail.com> gcc/ * config/xtensa/xtensa.md (bswapsi2, bswapdi2): New patterns. gcc/testsuite/ * gcc.target/xtensa/bswap.c: New test. libgcc/ * config/xtensa/lib1funcs.S (__bswapsi2, __bswapdi2): New functions. * config/xtensa/t-xtensa (LIB1ASMFUNCS): Add _bswapsi2 and _bswapdi2.
2020-12-20Made the ALLOCATED intrinsic work with scalar coarrays.Thomas Koenig5-2/+138
gcc/fortran/ChangeLog: * trans-array.c (gfc_conv_array_ref): Whitespace fix. Do not add offset if se->no_impl_this_image is set. * trans-intrinsic.c (gfc_conv_allocated): Set no_imp_this_image if checking the allocation status of a scalar. * trans.h (gfc_se): Add no_impl_this_image flag. gcc/testsuite/ChangeLog: * gfortran.dg/caf-shared/scalar_alloc_1.f90: New test. * gfortran.dg/caf-shared/scalar_alloc_2.f90: New test.
2020-12-20libstdc++: Fix indentation in <semaphore>Jonathan Wakely1-1/+2
libstdc++-v3/ChangeLog: * include/std/semaphore: Fix indentation.
2020-12-20doc: Fix a typo [PR98400]Jakub Jelinek1-1/+1
Fix a typo in an option name in documentation. 2020-12-20 Jakub Jelinek <jakub@redhat.com> PR other/98400 * doc/invoke.texi (-mbackchain): Fix a typo - -mmo-backchain -> -mno-backchain.
2020-12-20Set DECL_ARTIFICIAL on gfortran internal variables.Thomas Koenig1-0/+3
It seems we sometimes use DECL_ARTIFICIAL as choosing between different code paths. In order not to make -fdebug-aux-vars do different things, set DECL_ARTIFICIAL on the variables to avoid these different code paths (and the corresponding regressions). gcc/fortran/ChangeLog: * trans.c (create_var_debug_raw): Set DECL_ARTIFICIAL on variables. (cherry picked from commit 8d76c007afe4c70f51fd56b0e5b89522de5de61f)
2020-12-20Fix allocation with source for coarrays.Thomas Koenig3-14/+72
gcc/fortran/ChangeLog: * resolve.c (gfc_expr_to_initialize): Check for coarrays only if the reference is right. * trans-array.c (gfc_array_allocate): If SOURCE has a size, use it.
2020-12-20Set DECL_ARTIFICIAL on gfortran internal variables.Thomas Koenig1-0/+3
It seems we sometimes use DECL_ARTIFICIAL as choosing between different code paths. In order not to make -fdebug-aux-vars do different things, set DECL_ARTIFICIAL on the variables to avoid these different code paths (and the corresponding regressions). gcc/fortran/ChangeLog: * trans.c (create_var_debug_raw): Set DECL_ARTIFICIAL on variables.
2020-12-20Correct coarray indices for test case.Thomas Koenig1-8/+8
gcc/testsuite/ChangeLog: * gfortran.dg/coarray/send_char_array_1.f90: Correct coarray indces.
2020-12-20Daily bump.GCC Administrator3-1/+42
2020-12-19expr: Fix up constant_byte_string bitfield handling [PR98366]Jakub Jelinek3-123/+103
constant_byte_string now uses a convert_to_bytes function, which doesn't handle bitfields at all (don't punt on them, just puts them into wrong bits or bytes). Furthermore, I don't see a reason why that function should exist at all, it duplicates native_encode_initializer functionality. Except that native_encode_initializer punted on flexible array members and 2 tests in the testsuite relied on constant_byte_string handling those. So, this patch throws away convert_to_bytes, uses native_encode_initializer instead, but teaches it to handle flexible array members (only in the non-mask mode with off == -1 for now), furthermore, it adds various corner case checks that the old implementation was missing (like that STRING_CSTs use int as length and therefore we shouldn't try to build larger than that strings, or that native_encode*/native_interpret* APIs require sane host and target bytes (8-bit on both). 2020-12-19 Jakub Jelinek <jakub@redhat.com> PR middle-end/98366 * fold-const.c (native_encode_initializer): Don't try to memset more than total_bytes with off == -1 even if len is large. Handle flexible array member initializers if off == -1 and mask is NULL. * expr.c (convert_to_bytes): Remove. (constant_byte_string): Use native_encode_initializer instead of convert_to_bytes. Remove extraneous semicolon. Punt on various corner-cases the APIs don't handle, like sizes > INT_MAX, BITS_PER_UNIT != 8, CHAR_BIT != 8. * gcc.c-torture/execute/pr98366.c: New test.
2020-12-19Make allocate with source work, some more offset fixes for implied this_image().Thomas Koenig7-5/+202
gcc/fortran/ChangeLog: * options.c (gfc_post_options): Always set flag_debug_aux_vars for shared coarrays. * resolve.c (gfc_expr_to_initialize): Set extra dimensions to DIMEN_THIS_IMAGE. * trans-array.c (cas_add_strides): Re-introduce. (cas_add_this_image_offset): Rename add_lbound to correct_full_offset, use cas_add_strides. gcc/testsuite/ChangeLog: * gfortran.dg/caf-shared/alloc_coarray_with_source_1.f90: New test. * gfortran.dg/caf-shared/cobounds_torture_1.f90: New test. * gfortran.dg/caf-shared/cobounds_torture_2.f90: New test. * gfortran.dg/caf-shared/cobounds_torture_3.f90: New test.
2020-12-19d: Fix ICE in in force_decl_die, at dwarf2out.c with -gdwarf-2 ↵Iain Buclaw8-0/+94
-gstrict-dwarf [PR98067] Manifest constants in D are represented as CONST_DECLs, which can be imported from one module to another. However, when compiling on strict dwarf2 targets such as *-*-darwin10, importing CONST_DECLs cannot be represented in debug as D did not exist as an AT_language until dwarf3, and the only available fallback being DW_LANG_C. As CONST_DECLs are treated as enumerators in C, and not outputted individually in gen_decl_die, this causes an internal error in force_decl_die to occur. To handle this, similar to other places in dwarf2out, if a CONST_DECL is seen in dwarf2out_imported_module_or_decl_1, then we simply return early if the language is not one of Ada, D, or Fortran. gcc/ChangeLog: PR d/98067 * dwarf2out.c (dwarf2out_imported_module_or_decl_1): Handle CONST_DECL only if is_fortran, is_ada, or is_dlang. gcc/testsuite/ChangeLog: PR d/98067 * gdc.dg/debug/debug.exp: New test. * gdc.dg/debug/dwarf2/dwarf2.exp: New test. * gdc.dg/debug/dwarf2/imports/pr98067.d: New test. * gdc.dg/debug/dwarf2/langdw2.d: New test. * gdc.dg/debug/dwarf2/langdw3.d: New test. * gdc.dg/debug/dwarf2/pr98067.d: New test. * gdc.dg/debug/trivial.d: New test.
2020-12-19bswap: Fix up a thinko with empty CONSTRUCTORs [PR98378]Jakub Jelinek1-0/+2
The code I've added recently in find_bswap_or_nop for VECTOR CONSTRUCTORs is missing punt on an important case - namely empty CONSTRUCTORs, because in that case the loop will not initialize *n and the code after the loop will then use the uninitialized structure. 2020-12-19 Jakub Jelinek <jakub@redhat.com> PR tree-optimization/98378 * gimple-ssa-store-merging.c (find_bswap_or_nop): Punt if CONSTRUCTOR has no elements.
2020-12-19Daily bump.GCC Administrator8-1/+303
2020-12-18compiler: check for floating-point exponent overflowIan Lance Taylor6-12/+22
Adjust mksysinfo and mkrsysinfo to strip out floating-point max numbers, as they can trigger this error. Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/278476
2020-12-18Re: [r11-6232 Regression] FAIL: gcc.dg/pr97750.cAndrew MacLeod1-2/+2
Adjust testcase to not actually check for an undefined warning since we don't really care about it, or what line it is issued on. gcc/testsuite/ * gcc.dg/pr97750.c: Remove check for warning.
2020-12-18openmp: Don't optimize shared to firstprivate on task with depend clauseJakub Jelinek2-0/+59
The attached testcase is miscompiled, because we optimize shared clauses to firstprivate when task body can't modify the variable even when the task has depend clause. That is wrong, because firstprivate means the variable will be copied immediately when the task is created, while with depend clause some other task might change it later before the dependencies are satisfied and the task should observe the value only after the change. 2020-12-18 Jakub Jelinek <jakub@redhat.com> * gimplify.c (struct gimplify_omp_ctx): Add has_depend member. (gimplify_scan_omp_clauses): Set it to true if OMP_CLAUSE_DEPEND appears on OMP_TASK. (gimplify_adjust_omp_clauses_1, gimplify_adjust_omp_clauses): Force GOVD_WRITTEN on shared variables if task construct has depend clause. * testsuite/libgomp.c/task-6.c: New test.
2020-12-18openmp: Fix g++.dg/gomp/declare-target-3.C testcase when offloading is disabledKwok Cheung Yeung1-7/+7
2020-12-18 Kwok Cheung Yeung <kcy@codesourcery.com> gcc/testsuite/ * g++.dg/gomp/declare-target-3.C: Only check .offload_var_table entries if offloading is enabled.
2020-12-18libcc1: Fix up libcc1 configure [PR98330]Jakub Jelinek2-2/+2
Either we should write test x$darwin_dynamic_lookup = xyes or we should make sure the variable is always defined to non-empty string. 2020-12-18 Jakub Jelinek <jakub@redhat.com> PR bootstrap/98380 * configure.ac: Set darwin_dynamic_lookup=no instead to empty string. * configure: Regenerated.
2020-12-18aarch64: SVE: ICE in expand_direct_optab_fn [PR98177]Przemyslaw Wirkus5-4/+44
Problem comes from using the wrong interface to get the index type for a COND_REDUCTION. For fixed-length SVE we get a V2SI (a 64-bit Advanced SIMD vector) instead of a VNx2SI (an SVE vector that stores SI elements in DI containers). Credits to Richard Sandiford for pointing out the issue's root cause. Original PR snippet proposed to reproduce issue was only causing ICE for C++ compiler (see pr98177-1 test cases). I've slightly modified original snippet in order to reproduce issue on both C and C++ compilers. These are pr98177-2 test cases. gcc/ChangeLog: PR target/98177 * tree-vect-loop.c (vect_create_epilog_for_reduction): Use get_same_sized_vectype to obtain index type. (vectorizable_reduction): Likewise. gcc/testsuite/ChangeLog: PR target/98177 * g++.target/aarch64/sve/pr98177-1.C: New test. * g++.target/aarch64/sve/pr98177-2.C: New test. * gcc.target/aarch64/sve/pr98177-1.c: New test. * gcc.target/aarch64/sve/pr98177-2.c: New test.
2020-12-18libstdc++: Fix mistake in PR98374 change [PR98377]Patrick Palka1-1/+1
The #ifdef RADIXCHAR directive should be moved one line up so that it also guards the outer if statement, or else when RADIXCHAR is not defined the outer if statement will end up nonsensically guarding the declaration of output_length_upper_bound a few lines below it. libstdc++-v3/ChangeLog: PR libstdc++/98377 * src/c++17/floating_to_chars.cc (__floating_to_chars_precision): Fix mistake.
2020-12-18libstdc++: Fix build failure on AArch64 ILP32 [PR98370]Patrick Palka1-1/+1
This should fix a build failure on AArch64 ILP32 due to int32_t mapping to long int instead of int on this platform, which causes type deduction to fail in the below call to std::max as reported in the PR. libstdc++-v3/ChangeLog: PR libstdc++/98370 * src/c++17/floating_to_chars.cc (__floating_to_chars_shortest): Provide explicit template arguments to the call to std::max.
2020-12-18libstdc++: Fix build failure due to missing <langinfo.h> [PR98374]Patrick Palka1-1/+5
This should fix a build failure on Windows which lacks <langinfo.h>, from which we use nl_langinfo() to obtain the radix character of the current locale. (We can't use the more portable localeconv() from <clocale> to obtain the radix character of the current locale here because it's not thread-safe, unfortunately.) This change means that on Windows and other such platforms, we'll just always assume the radix character used by printf is '.' when formatting a long double through it. libstdc++-v3/ChangeLog: PR libstdc++/98374 * src/c++17/floating_to_chars.cc: Guard include of <langinfo.h> with __has_include. (__floating_to_chars_precision) [!defined(RADIXCHAR)]: Don't attempt to obtain the radix character of the current locale, just assume it's '.'.
2020-12-18libstdc++: Check FE_TONEAREST is defined before using itPatrick Palka2-6/+6
We need to test that FE_TONEAREST is defined before we may use it along with fegetround/fesetround to adjust the floating-point rounding mode. This fixes a build failure with older versions of newlib. libstdc++-v3/ChangeLog: * src/c++17/floating_from_chars.cc (from_chars_impl) [!defined(FE_TONEAREST)]: Don't adjust the rounding mode. * src/c++17/floating_to_chars.cc (__floating_to_chars_precision): Likewise.
2020-12-18openmp: Implicitly add 'declare target' directives for dynamic initializers ↵Kwok Cheung Yeung9-5/+118
in C++ 2020-12-18 Kwok Cheung Yeung <kcy@codesourcery.com> gcc/ * langhooks-def.h (lhd_get_decl_init): New. (lhd_finish_decl_inits): New. (LANG_HOOKS_GET_DECL_INIT): New. (LANG_HOOKS_OMP_FINISH_DECL_INITS): New. (LANG_HOOKS_DECLS): Add LANG_HOOKS_GET_DECL_INIT and LANG_HOOKS_OMP_FINISH_DECL_INITS. * langhooks.c (lhd_omp_get_decl_init): New. (lhd_omp_finish_decl_inits): New. * langhooks.h (struct lang_hooks_for_decls): Add omp_get_decl_init and omp_finish_decl_inits. * omp-offload.c (omp_discover_declare_target_var_r): Use get_decl_init langhook in place of DECL_INITIAL. Call omp_finish_decl_inits langhook at end of function. gcc/cp/ * cp-lang.c (cxx_get_decl_init): New. (cxx_omp_finish_decl_inits): New. (LANG_HOOKS_GET_DECL_INIT): New. (LANG_HOOKS_OMP_FINISH_DECL_INITS): New. * cp-tree.h (dynamic_initializers): New. * decl.c (dynamic_initializers): New. * decl2.c (c_parse_final_cleanups): Add initializer entries from vars to dynamic_initializers. gcc/testsuite/ * g++.dg/gomp/declare-target-3.C: New.
2020-12-18aarch64: Extend aarch64-autovec-preference==2 to 128-bit SVERichard Sandiford1-4/+5
When compiling with -msve-vector-bits=128, aarch64_preferred_simd_mode would pass the same vector width to aarch64_simd_container_mode for both SVE and Advanced SIMD, and so Advanced SIMD would always “win”. This patch instead makes it choose directly between SVE and Advanced SIMD modes, so that aarch64-autovec-preference==2 and aarch64-autovec-preference==4 work for this configuration. (aarch64-autovec-preference shouldn't affect aarch64_simd_container_mode because that would have an ABI impact for things like GNU vectors.) gcc/ * config/aarch64/aarch64.c (aarch64_preferred_simd_mode): Use aarch64_full_sve_mode and aarch64_vq_mode directly, instead of going via aarch64_simd_container_mode.
2020-12-18Arm: MVE: Add missing complex mul iteratorsTamar Christina1-0/+4
Seems when I split the patch I forgot to include these into the rot iterator.. The uncommitted hunks were still in my local tree so didn't notice. gcc/ChangeLog: * config/arm/iterators.md (rot): Add UNSPEC_VCMUL, UNSPEC_VCMUL90, UNSPEC_VCMUL180, UNSPEC_VCMUL270.
2020-12-18c++: Fix windows binary files [PR 98362]Nathan Sidwell1-4/+19
Windows has unique and special needs for open(2). gcc/cp/ * module.cc (O_CLOEXEC, O_BINARY): Add window's support. (elf_in::defrost, module_state::do_import) (finish_module_processing): Use O_BINARY.
2020-12-18As well as the PR this patch fixes problems in handling class objectsPaul Thomas9-161/+889
2020-12-18 Paul Thomas <pault@gcc.gnu.org> gcc/fortran PR fortran/83118 PR fortran/96012 * resolve.c (resolve_ordinary_assign): Generate a vtable if necessary for scalar non-polymorphic rhs's to unlimited lhs's. * trans-array.c (get_class_info_from_ss): New function. (gfc_trans_allocate_array_storage): Defer obtaining class element type until all sources of class exprs are tried. Use class API rather than TREE_OPERAND. Look for class expressions in ss->info by calling get_class_info_from_ss. After, obtain the element size for class descriptors. Where the element type is unknown, cast the data as character(len=size) to overcome unlimited polymorphic problems. (gfc_conv_ss_descriptor): Do not fix class variable refs. (build_class_array_ref, structure_alloc_comps): Replace code replicating the new function gfc_resize_class_size_with_len. (gfc_alloc_allocatable_for_assignment): Obtain element size for lhs in cases of deferred characters and class enitities. Move code for the element size of rhs to start of block. Clean up extraction of class parameters throughout this function. After the shape check test whether or not the lhs and rhs element sizes are the same. Use earlier evaluation of 'cond_null'. Reallocation of lhs only to happen if size changes or element size changes. * trans-expr.c (gfc_resize_class_size_with_len): New function. (gfc_get_class_from_expr): If a constant expression is encountered, return NULL_TREE; (trans_scalar_class_assign): New function. (gfc_conv_procedure_call): Ensure the vtable is present for passing a non-class actual to an unlimited formal. (trans_class_vptr_len_assignment): For expressions of type BT_CLASS, extract the class expression if necessary. Use a statement block outside the loop body. Ensure that 'rhs' is of the correct type. Obtain rhs vptr in all circumstances. (gfc_trans_scalar_assign): Call trans_scalar_class_assign to make maximum use of the vptr copy in place of assignment. (trans_class_assignment): Actually do reallocation if needed. (gfc_trans_assignment_1): Simplify some of the logic with 'realloc_flag'. Set 'vptr_copy' for all array assignments to unlimited polymorphic lhs. * trans.c (gfc_build_array_ref): Call gfc_resize_class_size_ with_len to correct span for unlimited polymorphic decls. * trans.h : Add prototype for gfc_resize_class_size_with_len. gcc/testsuite/ PR fortran/83118 PR fortran/96012 * gfortran.dg/dependency_60.f90: New test. * gfortran.dg/class_allocate_25.f90: New test. * gfortran.dg/class_assign_4.f90: New test. * gfortran.dg/unlimited_polymorphic_32.f03: New test.
2020-12-18c++: Fix PCH ICE with __builtin_source_location [PR98343]Jakub Jelinek3-0/+39
Seems the ggc_remove ppc_nx 3 operand member relies on the hash tables to contain pointers in the first element, which is not the case for source_location_table* hash table, which has location_t and unsigned as first two members and pointer somewhere else. I've tried to change: static void pch_nx (T &p, gt_pointer_operator op, void *cookie) { - op (&p, cookie); + extern void gt_pch_nx (T *, gt_pointer_operator, void *); + gt_pch_nx (&p, op, cookie); } in hash-traits.h, but that failed miserably. So, this patch instead overrides the two pch_nx overloads (only the second one is needed, the former one is identical to the ggc_remove one) but I need to override both. 2020-12-18 Jakub Jelinek <jakub@redhat.com> PR c++/98343 * cp-gimplify.c (source_location_table_entry_hash::pch_nx): Override static member functions from ggc_remove. * g++.dg/pch/pr98343.C: New test. * g++.dg/pch/pr98343.Hs: New file.
2020-12-17Go testsuite: handle +build lines correctlyIan Lance Taylor18-73/+119
Update the Go testsuite driver to handle +build lines as is done in the upstream repo, and update some tests to the upstream repo copy using +build lines with "gc" and "!gccgo" as appropriate. * go.test/go-test.exp (go-set-goos): New procedure. (go-gc-match): New procedure. (go-gc-tests): Call go-set-goos. Use go-gc-match to handle +build lines. Look for +build lines beyond first line of file.
2020-12-17libstdc++: Import MSVC floating-point std::to_chars testcasesPatrick Palka2-0/+61142
The testcases are imported almost verbatim, with the only change being to the -double_nan and -float_nan testcases. We expect these values to be formatted as "-nan" instead of "-nan(ind)". libstdc++-v3/ChangeLog: * testsuite/20_util/to_chars/double.cc: New test, consisting of testcases imported from the MSVC STL testsuite. * testsuite/20_util/to_chars/float.cc: Likewise.