The current generic implementation of __complex_proj used when cproj is
not available calculates the wrong projection, giving a different result
than given by C99's cproj.
When C99 cproj is not available but isinf and copysign are, use those to
give correct results for float, double and long double. Otherwise, and
for other specializations of std::complex, just use a generic version
that returns its argument, and so doesn't support infinities.
We might want to consider adding additional overloads of __complex_proj
to support extended types such as _Float64x, _Float128 etc.
PR libstdc++/61761
* include/std/complex (__complex_proj): Return parameter unchanged.
[_GLIBCXX_USE_C99_COMPLEX] (__complex_proj): Change overloads for
floating-point types to take std::complex arguments.
[_GLIBCXX_USE_C99_MATH_TR1] (__complex_proj): Add overloads for
floating-point types.
* testsuite/26_numerics/complex/proj.cc: New test.
From-SVN: r270759
2019-04-30 Martin Liska <mliska@suse.cz>
* opts.c (enable_warning_as_error): Provide hints
for unknown options.
2019-04-30 Martin Liska <mliska@suse.cz>
* c-pragma.c (handle_pragma_diagnostic): Provide hints
for unknown options.
2019-04-30 Martin Liska <mliska@suse.cz>
* gcc.dg/Werror-13.c: Add new tests for it.
* gcc.dg/pragma-diag-6.c: Likewise.
From-SVN: r270693
PR target/89093
* config/aarch64/aarch64.c (aarch64_process_one_target_attr): Don't skip
whitespace at the start of target attribute string.
* gcc.target/aarch64/pr89093.c: New test.
* gcc.target/aarch64/pr63304_1.c: Remove space from target string.
From-SVN: r270690
This keeps coming up repeatedly and the ACLE has finally added
__ARM_FEATURE_ATOMICS for the LSE feature in GCC. This is now part of
the latest ACLE release
(https://developer.arm.com/docs/101028/latest/5-feature-test-macros)
I know it's late for GCC-9 but this is a simple macro which need not
wait for another year.
Ok for trunk and to backport to all release branches ?
Tested with a simple build and a smoke test.
PR target/86538
* config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins): Define
__ARM_FEATURE_ATOMICS
From-SVN: r270686
The root_path.cc test had some debugging macros left in accidentally, so
didn't FAIL correctly if an assertion failed.
The string-char8_t.cc tests didn't compile on Windows.
* testsuite/27_io/filesystem/path/decompose/root_path.cc: Remove
macros accidentally left in.
* testsuite/27_io/filesystem/path/native/string-char8_t.cc: Remove
unnecessary -lstdc++fs option. Fix test for mingw.
* testsuite/experimental/filesystem/path/native/string-char8_t.cc:
Fix test for mingw.
From-SVN: r270685
2019-04-30 Martin Liska <mliska@suse.cz>
* gimple-fold.c (gimple_fold_builtin_memory_op): Change endp
into built_in_function enum. Remove code for endp == 2 and
use BUILT_IN_* constants.
(gimple_fold_builtin): Call the function with fcode.
From-SVN: r270682
2019-04-30 Martin Liska <mliska@suse.cz>
* config/i386/i386.c (ix86_builtin_reciprocal): Cast
DECL_FUNCTION_CODE into ix86_builtins enum before
the switch statement.
From-SVN: r270681
If a noexcept function calls a function that might throw, doing the tail
call optimization means that an exception thrown in the called function
will propagate out, breaking the noexcept specification. So we need to
prevent the optimization in that case.
* tree-tailcall.c (find_tail_calls): Don't turn a call from a
nothrow function to a might-throw function into a tail call.
From-SVN: r270656
...since it was only ever zero in practice. I wondered about making
it a symbolic constant instead, but it didn't seem worth it when
there was only one user (and that user was part of the internal
tree-data-ref.c implementation).
2019-04-29 Richard Sandiford <richard.sandiford@arm.com>
gcc/
* tree-data-ref.h (data_dependence_relation::inner_loop): Delete.
(DDR_INNER_LOOP): Likewise.
* tree-data-ref.c (dump_data_dependence_relation): Update accordingly.
(initialize_data_dependence_relation): Likewise.
(insert_innermost_unit_dist_vector): Use 0 instead of DDR_INNER_LOOP.
From-SVN: r270654
PR rtl-optimization/90257
* cfgrtl.c (flow_active_insn_p): Return true for USE of a function
return value.
Revert the revert:
2019-04-21 H.J. Lu <hongjiu.lu@intel.com>
PR target/90178
Revert:
2018-11-21 Uros Bizjak <ubizjak@gmail.com>
Revert the revert:
2013-10-26 Vladimir Makarov <vmakarov@redhat.com>
Revert:
2013-10-25 Vladimir Makarov <vmakarov@redhat.com>
* lra-spills.c (lra_final_code_change): Remove useless move insns.
From-SVN: r270653
We already added it to the std::vector primary template.
* include/bits/stl_bvector.h (vector<bool>::empty()): Add nodiscard
attribute.
From-SVN: r270648
This class template has been unused since __gnu_debug::__base was
removed in r263786.
* include/bits/stl_iterator_base_types.h (_Iter_base): Remove unused
class template and partial specialization.
From-SVN: r270647
The standard only requires that _Size can be converted to an integral
type, not that it can be used for arithmetic. Add a new set of
__size_to_integer helper functions to do the conversion (which will be
ambiguous if there is no one conversion that is better than any others).
Also add tests for DR 426 which requires these algorithms and search_n
to handle negative values of n.
PR libstdc++/87982
* include/bits/stl_algo.h (generate_n): Convert _Size parameter to
an integral type.
* include/bits/stl_algobase.h (__size_to_integer): New overloaded
functions to convert a value to an integral type.
(__fill_n_a, __fill_n_a): Assert that __n is already an integral type.
(fill_n): Convert _Size parameter to an integral type.
* testsuite/25_algorithms/fill_n/dr426.cc: New test.
* testsuite/25_algorithms/generate_n/87982.cc: New test.
* testsuite/25_algorithms/generate_n/dr426.cc: New test.
From-SVN: r270646