[PATCH] libstdc++: don't use #include_next in c_global headers

2020-04-19 Thread Helmut Grohne
The and headers need their counter parts and from the libc respectively, but libstdc++ wraps these headers. Now and include these headers using $ echo '#include ' | g++ -x c++ -E - -isystem /usr/include >/dev/null In file included from :1: /usr/include/c++/9/cstdlib:75:15: fatal error:

[committed] libstdc++: Define operator<=> for std::stack and std::queue

2020-04-19 Thread Jonathan Wakely via Gcc-patches
Some more C++20 changes from P1614R2, "The Mothership has Landed". * include/bits/stl_queue.h (queue): Define operator<=> for C++20. * include/bits/stl_stack.h (stack): Likewise. * testsuite/23_containers/queue/cmp_c++20.cc: New test. *

Aw: [Patch fortran/93364] [9/10 Regression] ICE in gfc_set_array_spec, at fortran/array.c:879

2020-04-19 Thread Harald Anlauf
Hi again, I was so focussed on whether I got this correct for the gcc git repository that I forgot to mention that this has been cleanly regtested on x86_64-pc-linux-gnu. Sorry for the added noise. Harald > Gesendet: Sonntag, 19. April 2020 um 22:49 Uhr > Von: "Harald Anlauf" > An: "fortran"

[Patch fortran/93364] [9/10 Regression] ICE in gfc_set_array_spec, at fortran/array.c:879

2020-04-19 Thread Harald Anlauf
Hi, a missing check in gfc_set_array_spec for for sum of rank and corank not exceeding GFC_MAX_DIMENSIONS could trigger an assert on invalid code. The attached patch fixes that. OK for mainline / backport to 9-branch? Harald 2020-04-19 Harald Anlauf PR fortran/93364 *

[committed] libstdc++: Remove operator!= overloads for unordered containers

2020-04-19 Thread Jonathan Wakely via Gcc-patches
Some more C++20 changes from P1614R2, "The Mothership has Landed". * include/bits/unordered_map.h (unordered_map, unordered_multimap): Remove redundant operator!= for C++20. * include/bits/unordered_set.h (unordered_set, unordered_multiset): Likewise. *

[committed] libstdc++: Fix redundant assignment (PR 94629)

2020-04-19 Thread Jonathan Wakely via Gcc-patches
This appears to be a copy error, which cppcheck diagnoses. PR other/94629 * include/debug/formatter.h (_Error_formatter::_Parameter): Fix redundant assignment in constructor. Tested powerpc64le-linux, committed to master. commit a2c0fa35d0dc8912b0c1a658234221de61e60840

[PATCH] coroutines: Fix handling of ramp return value [PR94661]

2020-04-19 Thread Iain Sandoe
Hi, Coroutine ramp functions have synthesised return values (the user-authored function body cannot have an explicit 'return'). The current implementation attempts to optimise by building the return in-place, in the manner of C++17 code. Clearly, that was too ambitious and the fix builds a

New Swedish PO file for 'gcc' (version 10.1-b20200322)

2020-04-19 Thread Translation Project Robot
Hello, gentle maintainer. This is a message from the Translation Project robot. A revised PO file for textual domain 'gcc' has been submitted by the Swedish team of translators. The file is available at: https://translationproject.org/latest/gcc/sv.po (This file,

[RFA PATCH]: i386: Use generic division to generate INVALID and DIVZERO exceptions

2020-04-19 Thread Uros Bizjak via Gcc-patches
This patch implements the idea from glibc, where generic division operations instead of assembly are used where appropriate. --commit-- i386: Use generic division to generate INVALID and DIVZERO exceptions Introduce math_force_eval to evaluate generic division to generate INVALID and DIVZERO

[committed] libphobos: Merge upstream phobos bf0d0a37c (PR94455)

2020-04-19 Thread Iain Buclaw via Gcc-patches
Hi, This patch merges libphobos with upstream phobos bf0d0a37c. Fixes std.array.Appender and RefAppender to use .opSlice() instead of data() Previously, Appender.data() was used to extract a slice of the Appender's array. Now use the [] slice operator instead. The same goes for RefAppender.

Re: [Patch, fortran] PR fortran/90350 - ubound ICE on assumed size array even though explicit bound is specified

2020-04-19 Thread José Rui Faustino de Sousa via Gcc-patches
Hi Thomas! > ? In other words, maybe a check on the upper bound > of the last dimension would be better? > You mean enforcing: C928 (R921) The second subscript shall not be omitted from a subscript-triplet in the last dimension of an assumed-size array. right? If I have correctly

[PATCH] c++: Fix bogus -Wparentheses warning with fold-expression [PR94505]

2020-04-19 Thread Marek Polacek via Gcc-patches
We issue bogus -Wparentheses warnings (3 of them!) for this fold expression: ((B && true) || ...) Firstly, issuing a warning for a compiler-generated expression is wrong and secondly, B && true must be wrapped in ( ) otherwise you'll get error: binary expression in operand of fold-expression.

[PATCH] c++: Recursive unification with packs and explicit targs [PR94628]

2020-04-19 Thread Patrick Palka via Gcc-patches
This PR seems to be similar to PR c++/43382, except that the recursive call to the variadic function with trailing return type in this testcase is additionally given some explicit template arguments. In the first testcase below, when resolving the recursive call to 'select', fn_type_unification

Re: [Patch, fortran] PR fortran/90350 - ubound ICE on assumed size array even though explicit bound is specified

2020-04-19 Thread Thomas Koenig via Gcc-patches
Hi Jose, first, thanks for coming on board! A question: Do you have a copyright assignment yet? This patch is probably short enough that it can be accepted without it, but if you're planning to contribute more (which I certainly hope) then it would make sense to do this. Regarding your patch,

[Patch, fortran] PR fortran/90350 - ubound ICE on assumed size array even though explicit bound is specified

2020-04-19 Thread José Rui Faustino de Sousa via Gcc-patches
Hi all! Proposed patch to Bug 90350 - ubound ICE on assumed size array even though explicit bound is specified Patch tested only on x86_64-pc-linux-gnu. Bumped into the same problem. Probably a better fix would be to add an extra step to the reference chain reflecting that array-section

[committed] libphobos: Merge upstream phobos 99003a75a

2020-04-19 Thread Iain Buclaw via Gcc-patches
Hi, This patch merges libphobos with upstream phobos 99003a75a. Fixes hasLength unittest to pass on X32. Bootstrapped and regression tested on x86_64-linux-gnu with target_board configurations {-m64,-m32,-mx32}. Committed to mainline. Regards Iain. --- libphobos/src/MERGE |

[committed 2/2] d/dmd: Merge upstream dmd ba99ee345 (PR94642)

2020-04-19 Thread Iain Buclaw via Gcc-patches
Hi, This patch merges the D front-end implementation with dmd upstream ba99ee345. Initializes the VectorArrayExp::size field with the correct value, fixing PR94642. Bootstrapped and regression tested on x86_64-linux-gnu, and committed to mainline. Regards Iain. --- gcc/d/dmd/MERGE| 2

[committed 1/2] d/dmd: Merge upstream dmd 09be6ee14 (PR94653)

2020-04-19 Thread Iain Buclaw via Gcc-patches
Hi, This patch merges the D front-end implementation with dmd upstream 09be6ee14. Initializes ncost before use, which was caught by valgrind, fixing PR94653. Bootstrapped and regression tested on x86_64-linux-gnu, and committed to mainline. Regards Iain. --- gcc/d/dmd/MERGE | 2 +-

[committed] coroutines, testsuite: Require C++17 for two tests.

2020-04-19 Thread Iain Sandoe
Hi, While the coroutines implementation, and most of the coroutines tests, will operate with C++14 or newer, these tests require facilities introduced in C++17. Add the target requirement. Tested on x86_64-darwin16, applied to master, thanks Iain gcc/testsuite/ 2020-04-19 Iain Sandoe

[committed] i386: Remove unneeded assignments when triggering SSE exceptions

2020-04-19 Thread Uros Bizjak via Gcc-patches
According to "Intel 64 and IA32 Arch SDM, Vol. 3: "Because SIMD floating-point exceptions are precise and occur immediately, the situation does not arise where an x87 FPU instruction, a WAIT/FWAIT instruction, or another SSE/SSE2/SSE3 instruction will catch a pending unmasked SIMD floating-point

Re: [PATCH] c, objc: Fix up c_parser_objc_selector_arg after CPP_SCOPE changes [PR94637]

2020-04-19 Thread Iain Sandoe
Hi Jakub, thanks for looking at this. Jakub Jelinek wrote: Similarly to inline asm, :: (or any other number of consecutive colons) can appear in ObjC @selector argument and with the introduction of CPP_SCOPE into the C FE, we need to trat CPP_SCOPE as two CPP_COLON tokens. The C++ FE does

[committed] d: Fix FAIL in gdc.dg/runnable.d on X32 targets (PR94609)

2020-04-19 Thread Iain Buclaw via Gcc-patches
Hi, Patch fixes test failure seen on X32 where a nested struct was passed in registers, rather than via invisible reference. Now, all non-POD structs are passed by invisible reference, not just those with a user-defined copy constructor/destructor. Bootstrapped and regression tested on