[Bug preprocessor/82176] Feature request: replace __FILE__ with file's basename instead its full name

2019-10-29 Thread f.hollerer at gmx dot net
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82176

--- Comment #7 from f.hollerer at gmx dot net ---
Yes, the __FILE_NAME__ macro provided by Clang is exactly the feature I am
asking for:

__FILE_NAME__
Clang-specific extension that functions similar to __FILE__ but only
renders the last path component (the filename) instead of an invocation
dependent full path to that file.

[Bug preprocessor/82176] Feature request: replace __FILE__ with file's basename instead its full name

2019-10-29 Thread f.hollerer at gmx dot net
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82176

--- Comment #8 from f.hollerer at gmx dot net ---
I have to correct me. The __FILE_NAME__ macro goes in the direction I would
like to have. But this does not solve the problem with assert().

My preferred solution is to have the expansion of the __FILE__ macro controlled
by a command line options.

As explained in my original post I use third party code which is augmented with
asserts(). I don't want to touch this code.

To my understanding assert() uses __FILE__ and __LINE__. I would like to have a
command line option which let __FILE__ expand to the last path component (the
filename) instead of an invocation dependent full path of that file.

This would:

- shorten the output of assert()
- minimize the image size due to shorter strings
- make the build reproduceable as the output does not depend on the current
working directory.

To sum up. This is what the feature request is about:

https://www.iar.com/support/tech-notes/general/avoiding-full-paths-in-the-output-file/

Please provide a '--no_path_in_file_macros' as provided by the IAC compiler.

[Bug tree-optimization/92263] New: ICE in commit_one_edge_insertion, at cfgrtl.c:2087

2019-10-29 Thread marxin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92263

Bug ID: 92263
   Summary: ICE in commit_one_edge_insertion, at cfgrtl.c:2087
   Product: gcc
   Version: 10.0
Status: UNCONFIRMED
  Keywords: ice-on-valid-code
  Severity: normal
  Priority: P3
 Component: tree-optimization
  Assignee: unassigned at gcc dot gnu.org
  Reporter: marxin at gcc dot gnu.org
  Target Milestone: ---
  Host: x86_64-linux-gnu
Target: riscv64-linux-gnu

I see the following ICE with a cross compiler:

$ ./xgcc -B.
/home/marxin/Programming/gcc/gcc/testsuite/gcc.c-torture/compile/pr33855.c
-fno-tree-dce -fno-tree-forwprop -Os -ffloat-store
/home/marxin/Programming/gcc/gcc/testsuite/gcc.c-torture/compile/pr33855.c: In
function ‘foo’:
/home/marxin/Programming/gcc/gcc/testsuite/gcc.c-torture/compile/pr33855.c:21:11:
warning: implicit declaration of function ‘cabsl’
[-Wimplicit-function-declaration]
   21 |   if (cabsl(vsorc.vqd[indx]) < 1.e-20)
  |   ^
/home/marxin/Programming/gcc/gcc/testsuite/gcc.c-torture/compile/pr33855.c:21:11:
warning: incompatible implicit declaration of built-in function ‘cabsl’
/home/marxin/Programming/gcc/gcc/testsuite/gcc.c-torture/compile/pr33855.c:1:1:
note: include ‘’ or provide a declaration of ‘cabsl’
  +++ |+#include 
1 | /* Testcase by Martin Michlmayr  */
during RTL pass: expand
/home/marxin/Programming/gcc/gcc/testsuite/gcc.c-torture/compile/pr33855.c:27:1:
internal compiler error: in commit_one_edge_insertion, at cfgrtl.c:2087
   27 | }
  | ^
0xa65912 commit_one_edge_insertion(edge_def*)
../../gcc/cfgrtl.c:2087
0xa659c4 commit_edge_insertions()
../../gcc/cfgrtl.c:2119
0xa47418 execute
../../gcc/cfgexpand.c:6622
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See  for instructions.

[Bug ipa/92234] [10 Regression] ICE verify_gimple failed (profiled lto) on s390x-linux-gnu

2019-10-29 Thread doko at debian dot org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92234

--- Comment #2 from Matthias Klose  ---
same with r277529

[Bug target/92258] [10 Regression] ICE: output_operand: invalid %-code

2019-10-29 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92258

--- Comment #2 from Jakub Jelinek  ---
Author: jakub
Date: Tue Oct 29 07:49:46 2019
New Revision: 277551

URL: https://gcc.gnu.org/viewcvs?rev=277551&root=gcc&view=rev
Log:
PR target/92258
* config/i386/sse.md (iptr): Revert 2019-10-27 change.

* gcc.target/i386/pr92258.c: New test.

Added:
trunk/gcc/testsuite/gcc.target/i386/pr92258.c
Modified:
trunk/gcc/ChangeLog
trunk/gcc/config/i386/sse.md
trunk/gcc/testsuite/ChangeLog

[Bug tree-optimization/92263] ICE in commit_one_edge_insertion, at cfgrtl.c:2087

2019-10-29 Thread marxin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92263

Martin Liška  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
 Ever confirmed|0   |1

[Bug tree-optimization/92241] [10 Regression] ice in vect_mark_pattern_st mts, at tree-vect-patterns.c:5175

2019-10-29 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92241

Richard Biener  changed:

   What|Removed |Added

 CC||jan at jki dot io

--- Comment #6 from Richard Biener  ---
*** Bug 92228 has been marked as a duplicate of this bug. ***

[Bug tree-optimization/92228] [10 Regression] ICE in vectorizable_reduction, at tree-vect-loop.c:5730

2019-10-29 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92228

Richard Biener  changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution|--- |DUPLICATE

--- Comment #5 from Richard Biener  ---
Thanks a lot.

*** This bug has been marked as a duplicate of bug 92241 ***

[Bug tree-optimization/92241] [10 Regression] ice in vect_mark_pattern_st mts, at tree-vect-patterns.c:5175

2019-10-29 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92241

--- Comment #7 from Richard Biener  ---
Author: rguenth
Date: Tue Oct 29 08:05:38 2019
New Revision: 277553

URL: https://gcc.gnu.org/viewcvs?rev=277553&root=gcc&view=rev
Log:
2019-10-29  Richard Biener  

PR tree-optimization/92241
* gcc.dg/torture/pr92241-2.c: New testcase.

Added:
trunk/gcc/testsuite/gcc.dg/torture/pr92241-2.c
Modified:
trunk/gcc/testsuite/ChangeLog

[Bug c/60523] Warning flag for octal literals [-Woctal-literals]

2019-10-29 Thread david at westcontrol dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=60523

--- Comment #10 from David Brown  ---
(In reply to Eric Gallager from comment #9)
> (In reply to Eric Gallager from comment #8)
> > *** Bug 70952 has been marked as a duplicate of this bug. ***
> 
> While this was a mistake, it still might be worth grouping the flag proposed
> in that bug, -Woctal-escapes, and the flag proposed in this bug,
> -Woctal-literals, under an umbrella flag called just -Woctal

That makes a lot of sense.  I expect users who want one of these warnings would
want both, so combining them would save effort for users and gcc developers.

[Bug fortran/92208] [9/10 Regression] internal compile error, character array of dynamic length returned from function and passed to subroutine

2019-10-29 Thread burnus at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92208

--- Comment #3 from Tobias Burnus  ---
"fixed" by the following patch:
* The LHS [se->string_length] is the string length represented as
  MAX_EXPR <(integer(kind=8)) D.4012, 0>
* The RHS [expr->ts.u.cl->backend_decl] is ..__result

The question is now: how to do this properly?

--- a/gcc/fortran/trans-array.c
+++ b/gcc/fortran/trans-array.c
@@ -8051,3 +8051,3 @@ gfc_conv_array_parameter (gfc_se * se, gfc_expr * expr,
bool g77,
}
-  if (expr->ts.type == BT_CHARACTER)
+  if (false && expr->ts.type == BT_CHARACTER)
se->string_length = expr->ts.u.cl->backend_decl;

[Bug tree-optimization/92262] [10 Regression] ICE: verify_gimple failed (error: incorrect sharing of tree nodes)

2019-10-29 Thread marxin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92262

Martin Liška  changed:

   What|Removed |Added

 Status|UNCONFIRMED |ASSIGNED
   Last reconfirmed||2019-10-29
 CC||marxin at gcc dot gnu.org
   Assignee|unassigned at gcc dot gnu.org  |marxin at gcc dot 
gnu.org
 Ever confirmed|0   |1

--- Comment #1 from Martin Liška  ---
Confirmed, I can take a look.

[Bug target/92256] [10 regression] error in gcc.dg/unroll-and-jam.c after r277501

2019-10-29 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92256

Richard Biener  changed:

   What|Removed |Added

  Component|other   |target
   Target Milestone|--- |10.0

--- Comment #1 from Richard Biener  ---
Note flag_unroll_loops also tunes GIMPLE level "unrolling" (which is actually
complete peeling) which is usually not done at -O2 unless it doesn't increase
size.

[Bug tree-optimization/92260] [10 Regression] ICE in exact_div, at poly-int.h:2162

2019-10-29 Thread marxin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92260

Martin Liška  changed:

   What|Removed |Added

 Status|UNCONFIRMED |ASSIGNED
  Known to work||9.2.0
   Keywords||ice-on-valid-code
   Last reconfirmed||2019-10-29
  Component|c++ |tree-optimization
 CC||marxin at gcc dot gnu.org
 Ever confirmed|0   |1
Summary|ice in exact_div, at|[10 Regression] ICE in
   |poly-int.h:2162 |exact_div, at
   ||poly-int.h:2162
   Target Milestone|--- |10.0
  Known to fail||10.0

--- Comment #3 from Martin Liška  ---
Confirmed, started with r277241.

[Bug tree-optimization/92260] [10 Regression] ICE in exact_div, at poly-int.h:2162

2019-10-29 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92260

Richard Biener  changed:

   What|Removed |Added

   Assignee|unassigned at gcc dot gnu.org  |rguenth at gcc dot 
gnu.org

--- Comment #4 from Richard Biener  ---
Confirmed, mine.

[Bug tree-optimization/92262] [10 Regression] ICE: verify_gimple failed (error: incorrect sharing of tree nodes)

2019-10-29 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92262

Richard Biener  changed:

   What|Removed |Added

 CC||jakub at gcc dot gnu.org
   Target Milestone|--- |10.0

--- Comment #2 from Richard Biener  ---
Very likely caused by Jakubs changes though.

[Bug gcov-profile/92259] ICE with lto and auto-profile cp/mangle.c:1641 write_closure_type_name

2019-10-29 Thread marxin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92259

Martin Liška  changed:

   What|Removed |Added

 CC||amker at gcc dot gnu.org

--- Comment #2 from Martin Liška  ---
Confirmed, it's an auto FDO issue. To be honest, autofdo seems to me very
broken right now in the GCC compiler.
Maybe Bin would be interested in this issue?

[Bug gcov-profile/92259] ICE with lto and auto-profile cp/mangle.c:1641 write_closure_type_name

2019-10-29 Thread marxin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92259

Martin Liška  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2019-10-29
 Ever confirmed|0   |1

[Bug lto/41526] gimple bytecode streams are not portable between different hosts

2019-10-29 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=41526

Richard Biener  changed:

   What|Removed |Added

   Keywords||lto

--- Comment #6 from Richard Biener  ---
Note the bug is certainly valid and I'd be surprised if exchanging LTO IL
containing object files between a big and little-endian host would work
even for the very simplest testcase.  But then I am not aware of anybody
doing this experiment and trying to fix the remaining issues.  Certainly
everything going through the data-streamer interface should be fine
unless the consumers do not use appropriately typed entities...

[Bug tree-optimization/92262] [10 Regression] ICE: verify_gimple failed (error: incorrect sharing of tree nodes)

2019-10-29 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92262

--- Comment #3 from Jakub Jelinek  ---
I can't reproduce it on a cross to powerpc64-linux.

[Bug ipa/92251] [10 regression] SEGV in ipa_get_cs_argument_count

2019-10-29 Thread marxin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92251

Martin Liška  changed:

   What|Removed |Added

 Status|UNCONFIRMED |WAITING
   Last reconfirmed||2019-10-29
 Ever confirmed|0   |1

--- Comment #2 from Martin Liška  ---
@Rainer: Can you please test it now?

[Bug tree-optimization/92262] [10 Regression] ICE: verify_gimple failed (error: incorrect sharing of tree nodes)

2019-10-29 Thread marxin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92262

Martin Liška  changed:

   What|Removed |Added

 Status|ASSIGNED|NEW
   Assignee|marxin at gcc dot gnu.org  |unassigned at gcc dot 
gnu.org

--- Comment #4 from Martin Liška  ---
I can with:

$ ./xgcc -v
Using built-in specs.
COLLECT_GCC=./xgcc
Target: powerpc-e300c3-linux-gnu
Configured with: ../configure --enable-languages=c,c++
--prefix=/home/marxin/bin/gcc --disable-bootstrap --disable-multilib
--target=powerpc-e300c3-linux-gnu --without-isl
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 10.0.0 20191029 (experimental) (GCC) 

$ ./xg++ -B. ~/Programming/testcases/pr92262.c -c -O2 -ftree-loop-distribution
-fvar-tracking-assignments -fpermissive
/home/marxin/Programming/testcases/pr92262.c:10:2: warning: ‘operator new’
takes type ‘size_t’ (‘unsigned int’) as first parameter [-fpermissive]
   10 | *operator new (long unsigned int, void *as)
  |  ^~~~
/home/marxin/Programming/testcases/pr92262.c: In function ‘int main()’:
/home/marxin/Programming/testcases/pr92262.c:124:1: error: incorrect sharing of
tree nodes
  124 | main ()
  | ^~~~
(unsigned int) &a8
# DEBUG du => (int *) (((sizetype) _5 + 4294967293 <= (sizetype) _29 ?
unsigned int) _29 - (unsigned int) _5) + 3) / 4 + 1) * 4 + (unsigned int)
&a8 : (unsigned int) &a8 + 4) - doloop.30_51 * 4)
/home/marxin/Programming/testcases/pr92262.c:124:1: error: incorrect sharing of
tree nodes
(unsigned int) &a8
# DEBUG D#6 => (int *) sizetype) _5 + 4294967293 <= (sizetype) _29 ?
unsigned int) _29 - (unsigned int) _5) + 3) / 4 + 1) * 4 + (unsigned int)
&a8 : (unsigned int) &a8 + 4) - doloop.30_51 * 4) + 4)
during GIMPLE pass: ivopts
/home/marxin/Programming/testcases/pr92262.c:124:1: internal compiler error:
verify_gimple failed
0xfebd91 verify_gimple_in_cfg(function*, bool)
../../gcc/tree-cfg.c:5427
0xecc6bf execute_function_todo
../../gcc/passes.c:1983
0xecd46e execute_todo
../../gcc/passes.c:2037
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <https://gcc.gnu.org/bugs/> for instructions.

[Bug tree-optimization/92262] [10 Regression] ICE: verify_gimple failed (error: incorrect sharing of tree nodes)

2019-10-29 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92262

--- Comment #5 from Jakub Jelinek  ---
Actually I can, but for some reason I had to use explicit -fchecking, dunno how
I've configured this cross.
Anyway, I don't see a tree sharing issue in the newly added code, but
get_computation_at doesn't unshare, which can be perhaps ok with the way it is
used in non-debug stmts, but it is not ok for debug stmts.
Now, we could unshare_expr in get_debug_computation_at when get_computation_at
succeeds, but as we now iterate over possibly several IVs, I think it is better
to unshare only when we pick the best candidate.
So:
--- gcc/tree-ssa-loop-ivopts.c.jj   2019-10-23 14:35:42.994753407 +0200
+++ gcc/tree-ssa-loop-ivopts.c  2019-10-29 09:45:47.418217336 +0100
@@ -4152,8 +4152,6 @@ get_debug_computation_at (class loop *lo
   var = fold_convert (ctype, var);
 }

-  ubase = unshare_expr (ubase);
-  cbase = unshare_expr (cbase);
   if (stmt_after_increment (loop, cand, at))
 var = fold_build2 (MINUS_EXPR, TREE_TYPE (var), var,
   unshare_expr (cstep));
@@ -7648,6 +7646,7 @@ remove_unused_ivs (struct ivopts_data *d
  if (!best_cand)
continue;

+ comp = unshare_expr (comp);
  if (count > 1)
{
  tree vexpr = make_node (DEBUG_EXPR_DECL);

[Bug target/92256] [10 regression] error in gcc.dg/unroll-and-jam.c after r277501

2019-10-29 Thread guojiufu at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92256

--- Comment #2 from Jiu Fu Guo  ---
Just send out a new patch for review. The new patch will make this case pass
too.

[Bug rtl-optimization/92264] New: [10 Regression] Compile time hog in 521.wrf_r with -Ofast -march=znver2 -g since r276318

2019-10-29 Thread marxin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92264

Bug ID: 92264
   Summary: [10 Regression] Compile time hog in 521.wrf_r with
-Ofast -march=znver2 -g since r276318
   Product: gcc
   Version: 10.0
Status: UNCONFIRMED
  Keywords: compile-time-hog
  Severity: normal
  Priority: P3
 Component: rtl-optimization
  Assignee: unassigned at gcc dot gnu.org
  Reporter: marxin at gcc dot gnu.org
CC: rsandifo at gcc dot gnu.org
Blocks: 26163
  Target Milestone: ---
  Host: x86_64-linux-gnu

Since the mentioned revision I see huge compile time hog:

$ timeout 300 gfortran module_configure.fppized.f90 -c -march=znver2
-std=legacy -fconvert=big-endian -fno-openmp -Ofast -march=znver2 -g

It takes at least 10 minutes to compile now. Before the revision it takes ~200s
with checking compiler on a Ryzen machine.

I see in perf top something like:

  62.38%  f951   [.] find_base_term
  14.27%  f951   [.] ix86_find_base_term
   5.53%  [kernel]   [k]
acpi_processor_ffh_cstate_enter
   2.90%  f951   [.] cselib_sp_based_value_p
   2.88%  libc-2.30.so   [.] _int_malloc
   2.44%  f951   [.] find_base_term
   0.87%  libc-2.30.so   [.]
__memmove_avx_unaligned_erms
   0.72%  f951   [.] rtx_equal_for_memref_p
   0.54%  f951   [.] drop_overlapping_mem_locs

Richard, can you please take a look?


Referenced Bugs:

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=26163
[Bug 26163] [meta-bug] missed optimization in SPEC (2k17, 2k and 2k6 and 95)

[Bug ipa/92254] [10 regression] ICE LTO in inline_small_functions, at ipa-inline.c:2000

2019-10-29 Thread marxin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92254

Martin Liška  changed:

   What|Removed |Added

   Keywords||ice-on-valid-code
 Status|UNCONFIRMED |ASSIGNED
   Last reconfirmed||2019-10-29
  Known to work||9.2.0
   Assignee|unassigned at gcc dot gnu.org  |hubicka at gcc dot 
gnu.org
 Ever confirmed|0   |1
  Known to fail||10.0

--- Comment #2 from Martin Liška  ---
Started with r277484.

[Bug tree-optimization/65930] Reduction with sign-change not handled

2019-10-29 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65930

--- Comment #30 from Richard Biener  ---
Author: rguenth
Date: Tue Oct 29 09:33:49 2019
New Revision: 277566

URL: https://gcc.gnu.org/viewcvs?rev=277566&root=gcc&view=rev
Log:
2019-10-29  Richard Biener  

PR tree-optimization/65930
* tree-vect-loop.c (check_reduction_path): Relax single-use
check allowing out-of-loop uses.
(vect_is_simple_reduction): SLP reduction chains cannot have
intermediate stmts used outside of the loop.
(vect_create_epilog_for_reduction): The adjustment might need
to be converted.
(vectorizable_reduction): Annotate live stmts of the reduction
chain with STMT_VINFO_REDUC_DEF.
* tree-vect-stms.c (process_use): Remove no longer true asserts.

* gcc.dg/vect/pr65930-1.c: New testcase.

Added:
trunk/gcc/testsuite/gcc.dg/vect/pr65930-1.c
Modified:
trunk/gcc/ChangeLog
trunk/gcc/testsuite/ChangeLog
trunk/gcc/tree-vect-loop.c
trunk/gcc/tree-vect-stmts.c

[Bug c++/90734] [concepts] Pre-normalization substitution into constraints of templated function breaks subsumption

2019-10-29 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90734

Jonathan Wakely  changed:

   What|Removed |Added

   Keywords||rejects-valid
 Status|UNCONFIRMED |NEW
   Last reconfirmed||2019-10-29
 CC||redi at gcc dot gnu.org
   See Also||https://gcc.gnu.org/bugzill
   ||a/show_bug.cgi?id=82507
 Blocks||67491
 Ever confirmed|0   |1

--- Comment #2 from Jonathan Wakely  ---
Bug 82507 is fixed on trunk, but this isn't.

Refreshed for C++2a syntax (https://godbolt.org/z/M6D5k8):

template 
inline constexpr bool bool_ = B;

#if defined(WORKAROUND)
template
concept Same_impl = __is_same_as(T, U);
#else
template 
concept Same_impl = bool_<__is_same_as(T, U)>;
#endif

template
concept Same = Same_impl && Same_impl;

template
concept Foo = Same;

template
concept Bar = Foo && Same;

template
struct S1 {
// overload set incorrectly is ambiguous (should resolve to second
overload)
static constexpr bool f() requires Foo { return false; }
static constexpr bool f() requires Bar { return true; }
};

template
struct S2 {
// overload set incorrectly is not ambiguous (resolves to third overload)
static constexpr bool f() requires Foo { return false; }
static constexpr bool f() requires Bar { return false; }
static constexpr bool f() requires bool_ && true { return true; }
};

template
concept can_f = requires { T::f(); };

int main() {
static_assert(Foo);
static_assert(Bar);

static_assert(can_f>);  // Fails
static_assert(S1::f());// Bogus error

static_assert(!can_f>); // Fails
#ifndef WORKAROUND
static_assert(S2::f());// Bogus non-error
#endif
}


: In function 'int main()':
:48:30: error: call of overloaded 'f()' is ambiguous
   48 | static_assert(S2::f());// Bogus non-error
  |  ^
:31:27: note: candidate: 'static constexpr bool S2::f() requires 
Foo [with T = int]'
   31 | static constexpr bool f() requires Foo { return false; }
  |   ^
:32:27: note: candidate: 'static constexpr bool S2::f() requires 
Bar [with T = int]'
   32 | static constexpr bool f() requires Bar { return false; }
  |   ^
:33:27: note: candidate: 'static constexpr bool S2::f() requires
(bool_) && true [with T = int]'
   33 | static constexpr bool f() requires bool_ && true { return
true; }
  |   ^

Compiler returned: 1


Referenced Bugs:

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67491
[Bug 67491] [meta-bug] concepts issues

[Bug c++/67775] [concepts] bug when using variadic expansions in compound requirements

2019-10-29 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67775

Jonathan Wakely  changed:

   What|Removed |Added

  Known to work||10.0

--- Comment #1 from Jonathan Wakely  ---
Seems to be fixed on trunk.

[Bug tree-optimization/92262] [10 Regression] ICE: verify_gimple failed (error: incorrect sharing of tree nodes)

2019-10-29 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92262

--- Comment #6 from Jakub Jelinek  ---
Actually, to be precise, get_computation_at does unshare expressions, that is
done in unshare_aff_combination.  The problem is that afterwards
aff_combination_to_tree calls fold_build* and those invoke the various GENERIC
folders and those do not generally guarantee unsharing.
In particular, fold_binary_op_with_conditional_arg is eventually called, with
(sizetype) _5 + 18446744073709551609 <= (sizetype) _29 ? unsigned long) _29
- (unsigned long) _5) + 7) / 8 + 1) * 4 : 4
as op0 and (unsigned long) &a8 as op1 and it adds the (unsigned long) &a8
operand to both the ... * 4 and 4 expressions and so appears twice.
Now, I'm not sure what the right fix is, because in theory this can happen in
lots of places.  Either fold-const.c could unshare_expr if it uses an operand
multiple times and it is during or after gimplification, or just various places
in GIMPLE which fold trees and then try to gimplify them need to unshare just
in case (especially because the gimplifier is destructive and when gimplifying
one copy it might clobber the other one), something else?

[Bug c++/68731] [concepts] ICE when referencing struct type in specialization

2019-10-29 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68731

Jonathan Wakely  changed:

   What|Removed |Added

  Known to work||10.0
 Blocks||67491

--- Comment #1 from Jonathan Wakely  ---
Seems to be fixed on trunk.


Referenced Bugs:

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67491
[Bug 67491] [meta-bug] concepts issues

[Bug rtl-optimization/92213] internal compiler error: in lra_assign, at lra-assigns.c:1647

2019-10-29 Thread crazylht at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92213

--- Comment #7 from Hongtao.liu  ---
Created attachment 47124
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=47124&action=edit
command to show cfg of this file xdot test.dot(attachment name)

The root cause of live in for 

;; lr  in68 [k0]  << This doesn't look right.

comes from

BB 17:  
gen: 17:

   17   18   68(k0)(there's no use of k0 in bb17)

gen 68(k0) is generated by exception edge from bb6--> bb17, bb6 has spill
68(k0) which make k0 as gen of bb17.
refer to

-
1039  /* No need to record conflicts for call clobbered regs if we  
1040 have nonlocal labels around, as we don't ever try to   
1041 allocate such regs in this case.  */   
1042  if (!cfun->has_nonlocal_label 
1043  && has_abnormal_call_or_eh_pred_edge_p (bb))  
1044for (px = 0; HARD_REGISTER_NUM_P (px); px++)
1045  if (eh_edge_abi.clobbers_at_least_part_of_reg_p (px)  
1046#ifdef REAL_PIC_OFFSET_TABLE_REGNUM 
1047  /* We should create a conflict of PIC pseudo with PIC 
1048 hard reg as PIC hard reg can have a wrong value after  
1049 jump described by the abnormal edge.  In this case we  
1050 cannot allocate PIC hard reg to PIC pseudo as PIC  
1051 pseudo will also have a wrong value.  */   
1052  || (px == REAL_PIC_OFFSET_TABLE_REGNUM
1053  && pic_offset_table_rtx != NULL_RTX   
1054  && !HARD_REGISTER_P (pic_offset_table_rtx))   
1055#endif  
1056  ) 
1057make_hard_regno_live (px);  
1058}  
--

Then df analyze will take 68(k0) as liveout for all pred bb which is too
conservative. so when bb2 use 68(k0) as assignment, it shows that it would be
used by liveout, then there's an asserttion failure.


6678BB 2:   
6679killed: 2:  
6680
6681   17  132  140  146  153  164  171  175  182  186  189 
6682  191  196  200  201  203  205  209  210  211  212  215 
6683  217  218  220  221  223  224  226  227  228  230  232 
6684  234  236  238  253  257  258  259  265  266  267  268 
6685  269  270  271  272  273  274  275  276  277  295  296 
6686  297  307  308  309  310   
6687livein: 2:  
6688
6689   68   
6690liveout: 2: 
6691
669267   16   19   68<(comes from bb17)  201
---

If you're on server, you can use dot -Tpng test.dot -o test.png, then copy
test.png outside.

[Bug c++/68828] [concepts] ICE in fold with requires and function call around parameters

2019-10-29 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68828

Jonathan Wakely  changed:

   What|Removed |Added

  Known to work||10.0
 Blocks||67491

--- Comment #1 from Jonathan Wakely  ---
No ICE with current trunk.


Referenced Bugs:

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67491
[Bug 67491] [meta-bug] concepts issues

[Bug c++/69472] [concepts] constraint ignored on constrained member template of a class template

2019-10-29 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69472

Jonathan Wakely  changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 Resolution|--- |DUPLICATE

--- Comment #1 from Jonathan Wakely  ---
I rediscovered this recently and reported Bug 92103

*** This bug has been marked as a duplicate of bug 92103 ***

[Bug c++/92103] constraints not checked on nested class template

2019-10-29 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92103

Jonathan Wakely  changed:

   What|Removed |Added

 CC||lucdanton at free dot fr

--- Comment #2 from Jonathan Wakely  ---
*** Bug 69472 has been marked as a duplicate of this bug. ***

[Bug c++/69364] [concepts] failure to properly order constraints when using fold expressions

2019-10-29 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69364

Jonathan Wakely  changed:

   What|Removed |Added

 Blocks||67491

--- Comment #1 from Jonathan Wakely  ---
Still ambiguous with current trunk.


Referenced Bugs:

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67491
[Bug 67491] [meta-bug] concepts issues

[Bug c++/71217] [concepts] Incorrect recursive concept evaluation

2019-10-29 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71217

Jonathan Wakely  changed:

   What|Removed |Added

  Known to work||10.0
 Blocks||67491

--- Comment #1 from Jonathan Wakely  ---
Seems to be fixed on current trunk:

template struct is_same {
  static constexpr bool value = false;
};

template struct is_same {
  static constexpr bool value = true;
};

template  struct Fold;

template 
struct IntFoldCtor
 {
  enum RetType { Ret = false };
 };

template 
concept TestInt = (bool)IntFoldCtor::Ret || is_same::value ;

template 
struct IntFoldCtor >
 {
  enum RetType { Ret = true };
 };

static_assert(TestInt);

static_assert(!TestInt); // 0

static_assert(TestInt< Fold >); // 1

static_assert(!TestInt< Fold >);  // 0

static_assert(TestInt< Fold,int> >); // 0

static_assert(!TestInt< Fold,int> >); // 0

static_assert(!TestInt< Fold,short> >); // 0


Referenced Bugs:

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67491
[Bug 67491] [meta-bug] concepts issues

[Bug c++/69470] [concepts] bogus constrained member class template redeclared with different access

2019-10-29 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69470

Jonathan Wakely  changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 Resolution|--- |DUPLICATE

--- Comment #3 from Jonathan Wakely  ---
I rediscovered this one too.

*** This bug has been marked as a duplicate of bug 92078 ***

[Bug c++/92078] error: 'struct std::ptr' redeclared with different access

2019-10-29 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92078

Jonathan Wakely  changed:

   What|Removed |Added

 CC||lucdanton at free dot fr

--- Comment #2 from Jonathan Wakely  ---
*** Bug 69470 has been marked as a duplicate of this bug. ***

[Bug c++/69470] [concepts] bogus constrained member class template redeclared with different access

2019-10-29 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69470

--- Comment #4 from Jonathan Wakely  ---
(In reply to Vedran Miletic from comment #1)
> Happens when building ns-3 [1] too.
> 
> [1016/2462] Compiling src/wifi/model/wifi-mac-queue.cc
> In file included from ./ns3/test.h:24:0,
>  from ../src/spectrum/test/tv-helper-distribution-test.cc:23:
> /usr/include/c++/6.0.0/sstream:300:7: error: ‘struct
> std::__cxx11::basic_stringbuf<_CharT, _Traits, _Alloc>::__xfer_bufptrs’
> redeclared with different access
>struct __xfer_bufptrs
>^~

That was a different bug, not related to concepts.

[Bug c++/77811] [concepts] invalid redefinition error when declaring friend function

2019-10-29 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77811

Jonathan Wakely  changed:

   What|Removed |Added

  Known to work||10.0
 Blocks||67491

--- Comment #1 from Jonathan Wakely  ---
Compiles ok with current trunk.


Referenced Bugs:

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67491
[Bug 67491] [meta-bug] concepts issues

[Bug c++/77755] [concepts] Abbreviatd function template pack expansions not working

2019-10-29 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77755

Jonathan Wakely  changed:

   What|Removed |Added

   Keywords||rejects-valid
 Status|UNCONFIRMED |NEW
   Last reconfirmed||2019-10-29
 Blocks||67491
 Ever confirmed|0   |1
  Known to fail||10.0

--- Comment #1 from Jonathan Wakely  ---
Please provide complete testcases that we can actually test. You're missing the
 header here.

Complete testcase:

template struct trait { static constexpr bool value = false; };

template  struct S{};

template 
concept Integral = trait::value;

void foo (S)
{
}


Still fails on current trunk with -std=gnu++2a


b.cc:8:25: error: expansion pattern 'auto:1' contains no parameter packs
8 | int foo (S)
  | ^~~
b.cc:8:28: error: template argument 1 is invalid
8 | int foo (S)
  |^


Referenced Bugs:

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67491
[Bug 67491] [meta-bug] concepts issues

[Bug c++/79682] [concepts] ambiguous overload with functionally equivalent predicate constraints compiles

2019-10-29 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79682

Jonathan Wakely  changed:

   What|Removed |Added

  Known to work||10.0
 Blocks||67491

--- Comment #1 from Jonathan Wakely  ---
With this updated testcase using C++2a syntax:

template 
requires ((N & 0x1) != 0) && (N > 1)
int foo() { return 0; }

template 
requires ((N & 0x1) != 0x0)
void foo() { }

int main(void) {
  return foo<0x03>();
}

Current trunk prints:

b.cc: In function 'int main()':
b.cc:10:20: error: call of overloaded 'foo<3>()' is ambiguous
   10 |   return foo<0x03>();
  |^
b.cc:3:5: note: candidate: 'int foo() [with unsigned int N = 3]'
3 | int foo() { return 0; }
  | ^~~
b.cc:7:6: note: candidate: 'void foo() [with unsigned int N = 3]'
7 | void foo() { }
  |  ^~~


So it seems to be fixed. We might want to add the testcase to the testsuite
before closing the bug though.


Referenced Bugs:

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67491
[Bug 67491] [meta-bug] concepts issues

[Bug c++/85846] [Concepts] Concept as value in initializer: bogus declared-as-implicit-template error

2019-10-29 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85846

Jonathan Wakely  changed:

   What|Removed |Added

   Keywords||rejects-valid
 Status|UNCONFIRMED |NEW
   Last reconfirmed||2019-10-29
 Blocks||67491
 Ever confirmed|0   |1
  Known to fail||10.0


Referenced Bugs:

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67491
[Bug 67491] [meta-bug] concepts issues

[Bug c++/85991] [Concepts] Template placeholder: ICE cp_parser_lookup_name, at cp/parser.c:26223

2019-10-29 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85991

Jonathan Wakely  changed:

   What|Removed |Added

 Blocks||67491

--- Comment #1 from Jonathan Wakely  ---
No ICE with current trunk:

b.cc:1:51: warning: the 'bool' keyword is not allowed in a C++20 concept
definition
1 | template  class, int> concept bool TmplC = true;
  |   ^~~~
b.cc:3:10: error: 'TmplC' does not constrain a type
3 | void f(A> *);
  |  ^~~
b.cc:1:56: note: concept defined here
1 | template  class, int> concept bool TmplC = true;
  |^
b.cc:3:10: error: wrong number of template arguments (1, should be 2)
3 | void f(A> *);
  |  ^~~
b.cc:1:56: note: provided for 'template
class, int  > concept const bool TmplC<
,  >'
1 | template  class, int> concept bool TmplC = true;
  |^
b.cc:3:10: error: wrong number of template arguments (1, should be 2)
3 | void f(A> *);
  |  ^~~
b.cc:1:56: note: provided for 'template
class, int  > concept const bool TmplC<
,  >'
1 | template  class, int> concept bool TmplC = true;
  |^
b.cc:3:17: error: template argument 1 is invalid
3 | void f(A> *);
  | ^~


Referenced Bugs:

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67491
[Bug 67491] [meta-bug] concepts issues

[Bug c++/89657] [concepts] ICE when calling lambda returning requires-expression

2019-10-29 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89657

Jonathan Wakely  changed:

   What|Removed |Added

  Known to work||10.0
 Blocks||67491

--- Comment #2 from Jonathan Wakely  ---
Seems to be fixed on trunk.


Referenced Bugs:

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67491
[Bug 67491] [meta-bug] concepts issues

[Bug c++/90033] [concepts] ICE segfault evaluating a requires clause that transitively depends on itself

2019-10-29 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90033

Jonathan Wakely  changed:

   What|Removed |Added

  Known to work||10.0
 Blocks||67491

--- Comment #1 from Jonathan Wakely  ---
Compiles with current trunk.


Referenced Bugs:

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67491
[Bug 67491] [meta-bug] concepts issues

[Bug tree-optimization/92262] [10 Regression] ICE: verify_gimple failed (error: incorrect sharing of tree nodes)

2019-10-29 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92262

Jakub Jelinek  changed:

   What|Removed |Added

 Status|NEW |ASSIGNED
   Assignee|unassigned at gcc dot gnu.org  |jakub at gcc dot gnu.org

--- Comment #7 from Jakub Jelinek  ---
Created attachment 47125
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=47125&action=edit
gcc10-pr92262.patch

Full patch I'm going to test.

[Bug c++/90396] [contracts] error while using sizeof in [[assert]]: internal compiler error: in gimplify_expr, at gimplify.c:13199

2019-10-29 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90396

Jonathan Wakely  changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 Resolution|--- |INVALID

--- Comment #1 from Jonathan Wakely  ---
The contracts branch does not exist in upstream GCC, please report this to
https://gitlab.com/lock3/gcc-new/issues (although it seems to compile with the
version on godbolt now).

[Bug c++/90398] [contracts] Segmentation fault when using [[assert]] and -fno-exception

2019-10-29 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90398

Jonathan Wakely  changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 Resolution|--- |INVALID
Summary|[concepts] Segmentation |[contracts] Segmentation
   |fault when using [[assert]] |fault when using [[assert]]
   |and -fno-exception  |and -fno-exception

--- Comment #1 from Jonathan Wakely  ---
The contracts branch does not exist in upstream GCC, please report this to
https://gitlab.com/lock3/gcc-new/issues instead.

[Bug c++/90675] [concepts] expressions in compound requirements not correctly treated as unevaluated operands

2019-10-29 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90675

Jonathan Wakely  changed:

   What|Removed |Added

   Keywords||rejects-valid
  Known to work||10.0
 Blocks||67491

--- Comment #1 from Jonathan Wakely  ---
Seems to be fixed on trunk.


Referenced Bugs:

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67491
[Bug 67491] [meta-bug] concepts issues

[Bug c++/91405] [concepts] internal compiler error: in synthesize_implicit_template_parm, at cp/parser.c:41206

2019-10-29 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91405

Jonathan Wakely  changed:

   What|Removed |Added

   Keywords||ice-on-invalid-code
  Known to work||10.0
 Blocks||67491

--- Comment #2 from Jonathan Wakely  ---
No ICE with current trunk (after updating the testcase to C++2a syntax).


Referenced Bugs:

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67491
[Bug 67491] [meta-bug] concepts issues

[Bug c++/91467] [concepts] ICE: in tsubst_copy, at cp/pt.c:15545

2019-10-29 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91467

Jonathan Wakely  changed:

   What|Removed |Added

   Keywords|ice-on-valid-code   |ice-on-invalid-code
  Known to work||10.0
 Blocks||67491

--- Comment #1 from Jonathan Wakely  ---
With an updated testcase using C++2a syntax there's no ICE on current trunk:

template constexpr bool same = false;
template constexpr bool same = true;

template concept same_as = same;

template
struct foo {
T t;

template
void set(U&& u) requires requires { { static_cast(u)} -> same_as; }
{
t = static_cast(u);
}
};

int main()
{
auto w = foo{5};
w.set(5.0f);
}


Referenced Bugs:

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67491
[Bug 67491] [meta-bug] concepts issues

[Bug c++/91466] [concepts] indicates "used in its own initializer" when not, constraint order change passes compilation.

2019-10-29 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91466

Jonathan Wakely  changed:

   What|Removed |Added

  Known to work||10.0
 Blocks||67491

--- Comment #1 from Jonathan Wakely  ---
Compiles on current trunk after changing the return type constraint:

#include 
#include 

template
concept integral_constant_ = std::is_empty_v && std::is_trivial_v &&
requires
{
typename T::value_type;
requires std::is_integral_v;
{ T::value } -> std::same_as;
};

struct sz_fn
{
template requires requires(R&& r) { {static_cast(r).size()} ->
integral_constant_; }
constexpr auto operator()(R&& r) {
return static_cast(r).size();
}
};

constexpr auto sz = sz_fn{};


int main()
{
auto arr = std::array{1, 2, 3, 4, 5};

return !std::is_invocable_v;
}


Referenced Bugs:

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67491
[Bug 67491] [meta-bug] concepts issues

[Bug c++/67704] [concepts] requirements not being applied to aliases

2019-10-29 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67704

Jonathan Wakely  changed:

   What|Removed |Added

 CC||frederik.engels24 at gmail dot 
com

--- Comment #4 from Jonathan Wakely  ---
*** Bug 91487 has been marked as a duplicate of this bug. ***

[Bug c++/91487] [concepts] alias constraint not respected

2019-10-29 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91487

Jonathan Wakely  changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 Resolution|--- |DUPLICATE

--- Comment #1 from Jonathan Wakely  ---
dup

*** This bug has been marked as a duplicate of bug 67704 ***

[Bug c++/67658] [concepts] invalid code with constrained concepts compiles

2019-10-29 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67658

Jonathan Wakely  changed:

   What|Removed |Added

   Keywords||accepts-invalid
  Known to work||10.0

--- Comment #3 from Jonathan Wakely  ---
Fixed on trunk but the testcase doesn't seem to be committed yet.

[Bug c++/91662] [concepts] unable to deduce placeholder type, should be accepted

2019-10-29 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91662

Jonathan Wakely  changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 Blocks||67491
 Resolution|--- |FIXED
   Target Milestone|--- |10.0

--- Comment #1 from Jonathan Wakely  ---
(In reply to Frederik Engels from comment #0)
> The following should compile but doesn't on current gcc-trunk (20190902)
> with options: "-std=c++2a -fconcepts"

Because the implementation hadn't been updated for the recent changes to return
type constraints. This was fixed by r276764.


Referenced Bugs:

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67491
[Bug 67491] [meta-bug] concepts issues

[Bug c++/67491] [meta-bug] concepts issues

2019-10-29 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67491
Bug 67491 depends on bug 91662, which changed state.

Bug 91662 Summary: [concepts] unable to deduce placeholder type, should be 
accepted
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91662

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 Resolution|--- |FIXED

[Bug c++/68781] [concepts] requires in member function is not unevaluated

2019-10-29 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68781

Jonathan Wakely  changed:

   What|Removed |Added

  Known to work||10.0
 Blocks||67491

--- Comment #2 from Jonathan Wakely  ---
dup of PR 90675 ?


Referenced Bugs:

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67491
[Bug 67491] [meta-bug] concepts issues

[Bug c++/92186] [concepts] requires expression outside of concept definition cannot return false

2019-10-29 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92186

Jonathan Wakely  changed:

   What|Removed |Added

   Keywords||rejects-valid
 Status|UNCONFIRMED |NEW
   Last reconfirmed||2019-10-29
 Blocks||67491
 Ever confirmed|0   |1


Referenced Bugs:

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67491
[Bug 67491] [meta-bug] concepts issues

[Bug ipa/92242] [10 regression] LTO ICE in ipa_get_cs_argument_count ipa-prop.h:598

2019-10-29 Thread ro at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92242

Rainer Orth  changed:

   What|Removed |Added

 CC||ro at gcc dot gnu.org

--- Comment #6 from Rainer Orth  ---
*** Bug 92251 has been marked as a duplicate of this bug. ***

[Bug ipa/92251] [10 regression] SEGV in ipa_get_cs_argument_count

2019-10-29 Thread ro at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92251

Rainer Orth  changed:

   What|Removed |Added

 Status|WAITING |RESOLVED
 Resolution|--- |DUPLICATE

--- Comment #3 from Rainer Orth  ---
(In reply to Martin Liška from comment #2)
> @Rainer: Can you please test it now?

I did during last night's bootstraps and the failure is gone.  So indeed a dup.

*** This bug has been marked as a duplicate of bug 92242 ***

[Bug rtl-optimization/92264] [10 Regression] Compile time hog in 521.wrf_r with -Ofast -march=znver2 -g since r276318

2019-10-29 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92264

Richard Biener  changed:

   What|Removed |Added

 Target||x86_64-linux-gnu
   Host|x86_64-linux-gnu|
   Target Milestone|--- |10.0

--- Comment #1 from Richard Biener  ---
Note find_base_term is known to be quadratic ... possibly we were able to
short-cut this much more often before the rev.

[Bug target/92265] New: [x86] Dubious target costs for vec_construct

2019-10-29 Thread rsandifo at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92265

Bug ID: 92265
   Summary: [x86] Dubious target costs for vec_construct
   Product: gcc
   Version: unknown
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: target
  Assignee: unassigned at gcc dot gnu.org
  Reporter: rsandifo at gcc dot gnu.org
CC: amonakov at gcc dot gnu.org, uros at gcc dot gnu.org
  Target Milestone: ---
Target: x86_64-linux-gnu

The x86 costs for vec_construct look a little low, especially
for -m32.  E.g. gcc.target/i386/pr84101.c has:

---
typedef struct uint64_pair uint64_pair_t ;
struct uint64_pair
{
  unsigned long w0 ;
  unsigned long w1 ;
} ;

uint64_pair_t pair(int num)
{
  uint64_pair_t p ;

  p.w0 = num << 1 ;
  p.w1 = num >> 1 ;

  return p ;
}
---

where uint64_pair is actually a uint32_pair for -m32.
If we consider applying SLP vectorisation to the store,
we have the difference between:

- 2 scalar_stores
- 1 vec_construct + 1 vector_store

The vec_construct cost for 64-bit and 128-bit vectors is:

  int cost = TYPE_VECTOR_SUBPARTS (vectype) * ix86_cost->sse_op;

i.e. one SSE op per element.  With -mtune=intel this gives:

- 2 scalar_stores = 3 + 3 insns
- 1 vec_construct + 1 vector_store = 2 + 3 insns

But for integer elements, the vec_construct actually needs two
integer-to-vector moves followed by an SSE pack:

movd%eax, %xmm1
movd%ecx, %xmm0
punpckldq   %xmm1, %xmm0
movq%xmm0, (%edx)

compared to:

movl%eax, 4(%edx)
movl%ecx, (%edx)

I don't know enough about the Intel uarchs to know if there's
a significant difference between these two in practice.

But as Alexander points out, things are much worse if the
elements are DImode rather than SImode, i.e. if we change
the above "unsigned long"s to "__UINT64_TYPE__"s.  We then
end up spilling the four registers to the stack, loading
them into a vector register, and then storing that vector
register out separately:

movl%edx, 8(%esp)
...
movl%edx, 12(%esp)
movq8(%esp), %xmm0
movl%eax, 8(%esp)
...
movl%edx, 12(%esp)
movhps  8(%esp), %xmm0
movups  %xmm0, (%ecx)

vs. 4 scalar stores directly to (%ecx).  Here we're operating
on DIs and V2DIs, but the costs are the same as for SI vs. V2SI:

- 2 scalar_stores = 3 + 3 insns
- 1 vec_construct + 1 vector_store = 2 + 3 insns

So as far as the vectoriser is concerned, the vector form
seems cheaper.

[Bug tree-optimization/92266] Duplicate code generation for live stmts from SLP

2019-10-29 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92266

Richard Biener  changed:

   What|Removed |Added

 Status|UNCONFIRMED |ASSIGNED
   Last reconfirmed||2019-10-29
   Assignee|unassigned at gcc dot gnu.org  |rguenth at gcc dot 
gnu.org
 Ever confirmed|0   |1

--- Comment #1 from Richard Biener  ---
Mine.

[Bug tree-optimization/92266] New: Duplicate code generation for live stmts from SLP

2019-10-29 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92266

Bug ID: 92266
   Summary: Duplicate code generation for live stmts from SLP
   Product: gcc
   Version: 10.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: tree-optimization
  Assignee: unassigned at gcc dot gnu.org
  Reporter: rguenth at gcc dot gnu.org
  Target Milestone: ---

int foo (int * __restrict__ a, int * b, int n)
{
  int tem1, tem2;
  for (int i = 0; i < n; ++i)
{
  tem1 = a[i*2 + 0] * 2;
  tem2 = a[i*2 + 1] * 2;
  b[i*4 + 0] = tem1;
  b[i*4 + 1] = tem1;
  b[i*4 + 2] = tem2;
  b[i*4 + 3] = tem2;
}
  return tem1 + tem2;
}

shows

   [local count: 105119324]:
  # tem1_55 = PHI 
  # tem2_54 = PHI 
  # vect_tem1_35.9_53 = PHI 
  _61 = BIT_FIELD_REF ;
  _62 = BIT_FIELD_REF ;
  _63 = BIT_FIELD_REF ;
  _64 = BIT_FIELD_REF ;
  goto ; [100.00%]

   [local count: 850510900]:
  goto ; [100.00%]

   [local count: 118111601]:
  # tem1_45 = PHI 
  # tem2_46 = PHI 
  _33 = tem1_45 + tem2_46;

which is because we iterate like

  FOR_EACH_VEC_ELT (SLP_TREE_SCALAR_STMTS (slp_node), i, slp_stmt_info)
{
  if (STMT_VINFO_LIVE_P (slp_stmt_info)
  && !vectorizable_live_operation (slp_stmt_info, gsi, slp_node,
   slp_node_instance, i,
   vec_stmt_p, cost_vec))
return false;
}

so for stmts appearing multiple times we code-gen the live operation multiple
times.  This is even worse for stmts appearing in multiple SLP nodes.
Luckily the code is all dead in the end.

[Bug tree-optimization/88915] Try smaller vectorisation factors in scalar fallback

2019-10-29 Thread avieira at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88915

--- Comment #5 from avieira at gcc dot gnu.org ---
Author: avieira
Date: Tue Oct 29 13:15:46 2019
New Revision: 277569

URL: https://gcc.gnu.org/viewcvs?rev=277569&root=gcc&view=rev
Log:
[vect]PR 88915: Vectorize epilogues when versioning loops

gcc/ChangeLog:
2019-10-29  Andre Vieira  

PR 88915
* tree-ssa-loop-niter.h (simplify_replace_tree): Change declaration.
* tree-ssa-loop-niter.c (simplify_replace_tree): Add context parameter
and make the valueize function pointer also take a void pointer.
* gcc/tree-ssa-sccvn.c (vn_valueize_wrapper): New function to wrap
around vn_valueize, to call it without a context.
(process_bb): Use vn_valueize_wrapper instead of vn_valueize.
* tree-vect-loop.c (_loop_vec_info): Initialize epilogue_vinfos.
(~_loop_vec_info): Release epilogue_vinfos.
(vect_analyze_loop_costing): Use knowledge of main VF to estimate
number of iterations of epilogue.
(vect_analyze_loop_2): Adapt to analyse main loop for all supported
vector sizes when vect-epilogues-nomask=1.  Also keep track of lowest
versioning threshold needed for main loop.
(vect_analyze_loop): Likewise.
(find_in_mapping): New helper function.
(update_epilogue_loop_vinfo): New function.
(vect_transform_loop): When vectorizing epilogues re-use analysis done
on main loop and call update_epilogue_loop_vinfo to update it.
* tree-vect-loop-manip.c (vect_update_inits_of_drs): No longer insert
stmts on loop preheader edge.
(vect_do_peeling): Enable skip-vectors when doing loop versioning if
we decided to vectorize epilogues.  Update epilogues NITERS and
construct ADVANCE to update epilogues data references where needed.
* tree-vectorizer.h (_loop_vec_info): Add epilogue_vinfos.
(vect_do_peeling, vect_update_inits_of_drs,
 determine_peel_for_niter, vect_analyze_loop): Add or update
declarations.
* tree-vectorizer.c (try_vectorize_loop_1): Make sure to use already
created loop_vec_info's for epilogues when available.  Otherwise
analyse
epilogue separately.


Modified:
trunk/gcc/ChangeLog
trunk/gcc/tree-ssa-loop-niter.c
trunk/gcc/tree-ssa-loop-niter.h
trunk/gcc/tree-ssa-sccvn.c
trunk/gcc/tree-vect-loop-manip.c
trunk/gcc/tree-vect-loop.c
trunk/gcc/tree-vectorizer.c
trunk/gcc/tree-vectorizer.h

[Bug libstdc++/92267] New: crash with a cppunit test case (built by GCC 9) and cpptest (built with GCC 8)

2019-10-29 Thread doko at debian dot org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92267

Bug ID: 92267
   Summary: crash with a cppunit test case (built by GCC 9) and
cpptest (built with GCC 8)
   Product: gcc
   Version: 9.2.1
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: libstdc++
  Assignee: unassigned at gcc dot gnu.org
  Reporter: doko at debian dot org
  Target Milestone: ---

Created attachment 47126
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=47126&action=edit
abigail for cppunit

having a cppunit built with GCC 8, and building the testcase with GCC 9
crashes. Rebuild cppunit with GCC 9 as well, then the test runs as expected.

$ cat foo.cc
#include 
#include 
#include 

class X {
private:
std::stack s1;
std::stack s2;
};

int
main(int argc, char *argv[]) {
X *x = new X();
//  delete x;
std::string r;
CPPUNIT_ASSERT(r.empty());
return 0;
}

[Bug libstdc++/92267] [9 Regression] crash with a cppunit test case (built by GCC 9) and cpptest (built with GCC 8)

2019-10-29 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92267

Jonathan Wakely  changed:

   What|Removed |Added

   Keywords||ABI
 Status|UNCONFIRMED |ASSIGNED
   Last reconfirmed||2019-10-29
   Assignee|unassigned at gcc dot gnu.org  |redi at gcc dot gnu.org
Summary|crash with a cppunit test   |[9 Regression] crash with a
   |case (built by GCC 9) and   |cppunit test case (built by
   |cpptest (built with GCC 8)  |GCC 9) and cpptest (built
   ||with GCC 8)
 Ever confirmed|0   |1

[Bug middle-end/92263] ICE in commit_one_edge_insertion, at cfgrtl.c:2087

2019-10-29 Thread marxin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92263

Martin Liška  changed:

   What|Removed |Added

 Status|NEW |ASSIGNED
   Assignee|unassigned at gcc dot gnu.org  |marxin at gcc dot 
gnu.org

--- Comment #1 from Martin Liška  ---
I'm bisecting that right now ..

[Bug libstdc++/92267] [9 Regression] crash with a cppunit test case (built by GCC 9) and cpptest (built with GCC 8)

2019-10-29 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92267

--- Comment #1 from Jonathan Wakely  ---
Preprocessing with GCC 8 and then compiling with GCC 9 doesn't crash, so it's
due to a change in libstdc++ headers.

[Bug tree-optimization/92260] [10 Regression] ICE in exact_div, at poly-int.h:2162

2019-10-29 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92260

--- Comment #5 from Richard Biener  ---
Author: rguenth
Date: Tue Oct 29 13:46:19 2019
New Revision: 277571

URL: https://gcc.gnu.org/viewcvs?rev=277571&root=gcc&view=rev
Log:
2019-10-29  Richard Biener  

PR tree-optimization/92260
* tree-vect-slp.c (vect_get_constant_vectors): Special-case
lane-reducing ops.

* gcc.dg/pr92260.c: New testcase.

Added:
trunk/gcc/testsuite/gcc.dg/pr92260.c
Modified:
trunk/gcc/ChangeLog
trunk/gcc/testsuite/ChangeLog
trunk/gcc/tree-vect-slp.c

[Bug tree-optimization/92260] [10 Regression] ICE in exact_div, at poly-int.h:2162

2019-10-29 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92260

Richard Biener  changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution|--- |FIXED

--- Comment #6 from Richard Biener  ---
Fixed.

[Bug rtl-optimization/92264] [10 Regression] Compile time hog in 521.wrf_r with -Ofast -march=znver2 -g since r276318

2019-10-29 Thread marxin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92264

--- Comment #2 from Martin Liška  ---
Just for the record, the compilation takes now ~2:30 hours.

[Bug libstdc++/92267] [9 Regression] crash with a cppunit test case (built by GCC 9) and cpptest (built with GCC 8)

2019-10-29 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92267

--- Comment #2 from Jonathan Wakely  ---
Seems to be due to r260380

[Bug middle-end/92263] [10 Regression] ICE in commit_one_edge_insertion, at cfgrtl.c:2087 since r270758

2019-10-29 Thread marxin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92263

Martin Liška  changed:

   What|Removed |Added

   Keywords|needs-bisection |
 Status|ASSIGNED|NEW
  Known to work||9.2.0
   Assignee|marxin at gcc dot gnu.org  |unassigned at gcc dot 
gnu.org
   Target Milestone|--- |10.0
Summary|ICE in  |[10 Regression] ICE in
   |commit_one_edge_insertion,  |commit_one_edge_insertion,
   |at cfgrtl.c:2087|at cfgrtl.c:2087 since
   ||r270758
  Known to fail||10.0

--- Comment #2 from Martin Liška  ---
Started with r270758.
@Jim: Can you please take a look?

[Bug libstdc++/92267] [9/10 Regression] crash with a cppunit test case (built by GCC 9) and cpptest (built with GCC 8)

2019-10-29 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92267

Jonathan Wakely  changed:

   What|Removed |Added

  Known to work||8.3.0
   Target Milestone|--- |9.3
  Known to fail||10.0, 9.2.0

--- Comment #3 from Jonathan Wakely  ---
This change (to prevent a -Wdeprecated-copy warning) changes the copy
constructor from non-trivial to trivial:

+#if __cplusplus < 201103L
+  // Conversion from iterator to const_iterator.
   _Deque_iterator(const iterator& __x) _GLIBCXX_NOEXCEPT
   : _M_cur(__x._M_cur), _M_first(__x._M_first),
_M_last(__x._M_last), _M_node(__x._M_node) { }
+#else
+  // Conversion from iterator to const_iterator.
+  template,
+  is_same<_Iter, iterator>>>
+   _Deque_iterator(const _Iter& __x) noexcept
+   : _M_cur(__x._M_cur), _M_first(__x._M_first),
+ _M_last(__x._M_last), _M_node(__x._M_node) { }
+
+  _Deque_iterator(const _Deque_iterator&) = default;
+  _Deque_iterator& operator=(const _Deque_iterator&) = default;
+#endif

The fix is to define the copy constructor explicitly again:

-  _Deque_iterator(const _Deque_iterator&) = default;
+  _Deque_iterator(const _Deque_iterator& __x) noexcept
+   : _M_cur(__x._M_cur), _M_first(__x._M_first),
+_M_last(__x._M_last), _M_node(__x._M_node) { }
+

[Bug target/92265] [x86] Dubious target costs for vec_construct

2019-10-29 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92265

Richard Biener  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2019-10-29
 CC||hubicka at gcc dot gnu.org
Version|unknown |10.0
 Ever confirmed|0   |1

--- Comment #1 from Richard Biener  ---
Honza noticed the integer vs. FP scalar thing as well.  The DImode case should
have higher cost already (but also not account for the int to FP register file
move).  Note that when the construction happens from memory via strided
loads this move can be elided so care has to be taken to not pessimize the
costs for that.

[Bug target/92265] [x86] Dubious target costs for vec_construct

2019-10-29 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92265

--- Comment #2 from Richard Biener  ---
Oh, and there's also the case where

VPINSR[BWDQ]

takes a GPR (or memory) to insert int a XMM reg.  PINSRW is available
with SSE2, the B/Q/D variants with SSE4.1.

It's also only the non-zero lane inserts that require an extra move
if the above are not available.  There's memory move to upper half
for DImode memory sources as well.

Note the larger store might still be good to reduce needed store
bandwith and to avoid later STLF issues when a vector load follows.

But some targets have non-trivial move cost between register files
(not Intel though).

So the question is whether your example makes a difference in practice.

[Bug bootstrap/92235] [10 Regression] ICE in host_detect_local_cpu, segfault (profiled lto) on powerpc64le-linux-gnu

2019-10-29 Thread doko at debian dot org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92235

--- Comment #2 from Matthias Klose  ---
same with r277529

[Bug c++/92268] New: Constraint normalization substitutes parameter too early

2019-10-29 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92268

Bug ID: 92268
   Summary: Constraint normalization substitutes parameter too
early
   Product: gcc
   Version: 10.0
Status: UNCONFIRMED
  Keywords: rejects-valid
  Severity: normal
  Priority: P3
 Component: c++
  Assignee: unassigned at gcc dot gnu.org
  Reporter: redi at gcc dot gnu.org
Blocks: 67491
  Target Milestone: ---

The following program fails to compile with -std=gnu++2a

template
  struct common_reference { };

template
  using common_reference_t = typename common_reference::type;

template concept foo = true;
template concept bar = true;
template concept baz = true;

template
  concept common_reference_with
=  foo, common_reference_t>
&& bar, common_reference_t>
&& baz, common_reference_t>;

template
  using iter_reference_t = decltype(((T*)0)->f());

template
  concept forward_iterator
= common_reference_with&&, typename I::value_type&>;

struct test_range
{
  struct iterator
  {
using value_type = int;

char f() const;
  };

  iterator begin();
};

template
concept F = requires (T& t) { { t.begin() } -> forward_iterator; };

static_assert( !F );


Checking the F concept fails:

bug.cc:37:33: error: no type named 'type' in 'struct common_reference'
   37 | concept F = requires (T& t) { { t.begin() } -> forward_iterator; };
  |   ~~^~~
bug.cc:37:33: error: no type named 'type' in 'struct common_reference'
bug.cc:37:33: error: no type named 'type' in 'struct common_reference'



On IRC Jason said:

[02:36]  jwakely: you're hitting an error during normalization, which
means the constraints could never be satisfied
[02:40]  but it looks like when we normalize the forward_iterator
constraint on the compound-requirement we're normalizing
forward_iterator, which is wrong -- we should be normalizing
forward_iterator, and then checking whether that's satisfied with iterator
[02:40]  so it's a compiler bug
[02:40]  as well as the diagnostic issue
[02:40]  Andrew sent me a patch to improve handling of nested
requirements that I haven't looked at yet, it may help with this


Referenced Bugs:

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67491
[Bug 67491] [meta-bug] concepts issues

[Bug c++/92268] Constraint normalization substitutes parameter too early

2019-10-29 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92268

Jonathan Wakely  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2019-10-29
 Ever confirmed|0   |1

[Bug c++/92268] Constraint normalization substitutes parameter too early

2019-10-29 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92268

--- Comment #1 from Jonathan Wakely  ---
The workaround is to require that the common_reference_t types exist:

template
  concept common_reference_with
=  
// 
   requires { typename common_reference_t;
  typename common_reference_t; }
   &&
// 
foo, common_reference_t>
&& bar, common_reference_t>
&& baz, common_reference_t>;

[Bug c++/83806] [7 Regression] Spurious -Wunused-but-set-parameter with nullptr

2019-10-29 Thread ma.noack.pr at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83806

--- Comment #7 from Matthias Noack  ---
Can confirm, that it is fixed in 8.3.0 and 9.2.1.

[Bug driver/47785] GCC with -flto does not pass -Wa/-Xassembler options to the assembler

2019-10-29 Thread hjl.tools at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=47785

H.J. Lu  changed:

   What|Removed |Added

Summary|GCC with -flto does not |GCC with -flto does not
   |pass -Wa options to the |pass -Wa/-Xassembler
   |assembler   |options to the assembler

--- Comment #15 from H.J. Lu  ---
We need to also handle -Xassembler? Since -Wa, doesn't work with comma in
assembler options, like -mfoo=foo1,foo2, one needs to use

-Xassembler -mfoo=foo1,foo2

to pass -mfoo=foo1,foo2 to assembler.

[Bug tree-optimization/83543] strlen of a local array member not optimized on some targets

2019-10-29 Thread msebor at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83543

--- Comment #9 from Martin Sebor  ---
Author: msebor
Date: Tue Oct 29 16:14:18 2019
New Revision: 277576

URL: https://gcc.gnu.org/viewcvs?rev=277576&root=gcc&view=rev
Log:
gcc/testsuite/ChangeLog:

PR testsuite/92144
* c-c++-common/Warray-bounds-4.c: Disable test to avoid failures
due to PR 83543.


Modified:
trunk/gcc/testsuite/ChangeLog
trunk/gcc/testsuite/c-c++-common/Warray-bounds-4.c

[Bug testsuite/92144] [10 regression] c-c++-common/Warray-bounds-4.c still fails after r277080

2019-10-29 Thread msebor at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92144

--- Comment #2 from Martin Sebor  ---
Author: msebor
Date: Tue Oct 29 16:14:18 2019
New Revision: 277576

URL: https://gcc.gnu.org/viewcvs?rev=277576&root=gcc&view=rev
Log:
gcc/testsuite/ChangeLog:

PR testsuite/92144
* c-c++-common/Warray-bounds-4.c: Disable test to avoid failures
due to PR 83543.


Modified:
trunk/gcc/testsuite/ChangeLog
trunk/gcc/testsuite/c-c++-common/Warray-bounds-4.c

[Bug tree-optimization/56456] [meta-bug] bogus/missing -Warray-bounds

2019-10-29 Thread msebor at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=56456
Bug 56456 depends on bug 92144, which changed state.

Bug 92144 Summary: [10 regression] c-c++-common/Warray-bounds-4.c still fails 
after r277080
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92144

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 Resolution|--- |FIXED

[Bug testsuite/92144] [10 regression] c-c++-common/Warray-bounds-4.c still fails after r277080

2019-10-29 Thread msebor at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92144

Martin Sebor  changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 Resolution|--- |FIXED
   Assignee|unassigned at gcc dot gnu.org  |msebor at gcc dot 
gnu.org

--- Comment #3 from Martin Sebor  ---
The test is running into the limitation in PR 83543.  I've disabled the test in
r277576 until that's resolved (hopefully in GCC 11).

[Bug c++/92268] Constraint normalization substitutes parameter too early

2019-10-29 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92268

--- Comment #2 from Jonathan Wakely  ---
(Comment 1 was wrong)

A workaround is to replace the compound-requirement with a simple-requirement
that depends on a function constrained with the desired constraint:


template void workaround(I) { }

template
concept F = requires (T& t) { workaround(t.begin()); };

[Bug preprocessor/82176] Feature request: replace __FILE__ with file's basename instead its full name

2019-10-29 Thread joseph at codesourcery dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82176

--- Comment #9 from joseph at codesourcery dot com  ---
On Tue, 29 Oct 2019, f.hollerer at gmx dot net wrote:

> This would:
> 
> - shorten the output of assert()
> - minimize the image size due to shorter strings
> - make the build reproduceable as the output does not depend on the current
> working directory.

Note that we have the -ffile-prefix-map / -fmacro-prefix-map / 
-fdebug-prefix-map options you can use to specify a mapping from the 
actual directory names used in the build to the names you want to appear 
in the output.

[Bug libstdc++/92267] [9/10 Regression] crash with a cppunit test case (built by GCC 9) and cpptest (built with GCC 8)

2019-10-29 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92267

--- Comment #4 from Jonathan Wakely  ---
Author: redi
Date: Tue Oct 29 17:14:55 2019
New Revision: 277577

URL: https://gcc.gnu.org/viewcvs?rev=277577&root=gcc&view=rev
Log:
PR libstdc++/92267 fix ABI change in deque iterators

Defaulting the copy constructor on its first declaration made it change
from user-provided (and non-trivial) to implicitly-defined (and
trivial). This caused an ABI incompatibility between GCC 8 and GCC 9,
where functions taking a deque iterator disagree on the argument passing
convention.

PR libstdc++/92267
* include/bits/stl_deque.h (_Deque_iterator(const _Deque_iterator&)):
Do not define as defaulted.
* testsuite/23_containers/deque/types/92267.cc: New test.

Added:
trunk/libstdc++-v3/testsuite/23_containers/deque/types/92267.cc
Modified:
trunk/libstdc++-v3/ChangeLog
trunk/libstdc++-v3/include/bits/stl_deque.h

[Bug c/92269] New: Profiling (-p) does not work on H8

2019-10-29 Thread mti-1 at tillenius dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92269

Bug ID: 92269
   Summary: Profiling (-p) does not work on H8
   Product: gcc
   Version: 9.2.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c
  Assignee: unassigned at gcc dot gnu.org
  Reporter: mti-1 at tillenius dot com
  Target Milestone: ---

gcc/config/h8300/h8300.h seems to be missing a single '.' in the definition of
FUNCTION_PROFILER macro. It should be ".LP" rather than just "LP".

#define FUNCTION_PROFILER(FILE, LABELNO)  \
  fprintf (FILE, "\t%s\t#.LP%d,%s\n\tjsr @mcount\n", \
   h8_mov_op, (LABELNO), h8_reg_names[0]);

[Bug preprocessor/82176] Feature request: replace __FILE__ with file's basename instead its full name

2019-10-29 Thread fuchedzhy at google dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82176

--- Comment #10 from Gregory Fuchedzhy  ---
(In reply to f.hollerer from comment #8)
> To my understanding assert() uses __FILE__ and __LINE__. I would like to
> have a command line option which let __FILE__ expand to the last path
> component (the filename) instead of an invocation dependent full path of
> that file.

If __FILE_NAME__ is implemented would adding -D__FILE__=__FILE_NAME__ solve
your particular usecase?

[Bug target/92258] [10 Regression] ICE: output_operand: invalid %-code

2019-10-29 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92258

Jakub Jelinek  changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 CC||jakub at gcc dot gnu.org
 Resolution|--- |FIXED

--- Comment #3 from Jakub Jelinek  ---
Fixed.

[Bug libstdc++/91495] std::transform_reduce with unary op is implemented in the parallel case but not the basic case

2019-10-29 Thread gcc-bugs at marehr dot dialup.fu-berlin.de
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91495

gcc-bugs at marehr dot dialup.fu-berlin.de changed:

   What|Removed |Added

 CC||gcc-bugs at marehr dot 
dialup.fu-b
   ||erlin.de

--- Comment #4 from gcc-bugs at marehr dot dialup.fu-berlin.de ---
Will this be back-ported to gcc-7 or gcc-8?

[Bug c++/83806] [7 Regression] Spurious -Wunused-but-set-parameter with nullptr

2019-10-29 Thread egallager at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83806

Eric Gallager  changed:

   What|Removed |Added

 CC||egallager at gcc dot gnu.org
  Known to work||8.3.0, 9.2.1
 Blocks||89180

--- Comment #8 from Eric Gallager  ---
(In reply to Matthias Noack from comment #7)
> Can confirm, that it is fixed in 8.3.0 and 9.2.1.

Yup, the reason this bug is still open is in case backports to the branch for 7
are desired.


Referenced Bugs:

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89180
[Bug 89180] [meta-bug] bogus/missing -Wunused warnings

[Bug c++/92182] No way to silence ''A::TKind' is too small to hold all values of 'enum Kind''

2019-10-29 Thread egallager at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92182

Eric Gallager  changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 CC||egallager at gcc dot gnu.org
 Blocks||44209
 Resolution|--- |DUPLICATE

--- Comment #2 from Eric Gallager  ---
I think this is a dup of bug 61414

*** This bug has been marked as a duplicate of bug 61414 ***


Referenced Bugs:

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=44209
[Bug 44209] [meta-bug] Some warnings are not linked to diagnostics options

[Bug c++/61414] enum class bitfield size-checking needs a separate warning flag controlling it

2019-10-29 Thread egallager at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61414

Eric Gallager  changed:

   What|Removed |Added

 CC||david.bolvansky at gmail dot 
com

--- Comment #18 from Eric Gallager  ---
*** Bug 92182 has been marked as a duplicate of this bug. ***

  1   2   >