[Bug sanitizer/92247] ‘__NR_open’ was not declared in this scope libsanitizer/sanitizer_common/sanitizer_linux compilation failed on ubuntu 18.04 WSL2

2019-10-28 Thread euloanty at live dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92247

--- Comment #4 from fdlbxtqi  ---
It sounds like it is a huge bug. I am using windows insider + wsl2. The problem
can even be observed on native windows.

I hope it could be fixed as soon as possible, or I could not build new
version's GCC on any platform.

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

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

--- Comment #9 from Eric Gallager  ---
(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

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

2019-10-28 Thread asolokha at gmx dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92262

Bug ID: 92262
   Summary: [10 Regression] ICE: verify_gimple failed (error:
incorrect sharing of tree nodes)
   Product: gcc
   Version: 10.0
Status: UNCONFIRMED
  Keywords: ice-checking, ice-on-valid-code
  Severity: normal
  Priority: P3
 Component: tree-optimization
  Assignee: unassigned at gcc dot gnu.org
  Reporter: asolokha at gmx dot com
  Target Milestone: ---
Target: powerpc-*-linux-gnu

Created attachment 47123
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=47123=edit
Testcase

g++-10.0.0-alpha20191027 snapshot (r277495) ICEs when compiling the attached
testcase reduced from
libstdc++-v3/testsuite/23_containers/deque/modifiers/erase/2.cc w/ -O2
-ftree-loop-distribution -fvar-tracking-assignments:

% powerpc-e300c3-linux-gnu-g++-10.0.0-alpha20191027 -m64 -O2
-ftree-loop-distribution -fvar-tracking-assignments -c jwwokwvg.cc
jwwokwvg.cc: In function 'int main()':
jwwokwvg.cc:124:1: error: incorrect sharing of tree nodes
  124 | main ()
  | ^~~~
(unsigned long) 
# DEBUG du => (int *) (((sizetype) _5 + 18446744073709551609 <= (sizetype) _29
? unsigned long) _29 - (unsigned long) _5) + 7) / 8 + 1) * 4 + (unsigned
long)  : (unsigned long)  + 4) - doloop.33_51 * 4)
jwwokwvg.cc:124:1: error: incorrect sharing of tree nodes
(unsigned long) 
# DEBUG D#4 => (int *) sizetype) _5 + 18446744073709551609 <= (sizetype)
_29 ? unsigned long) _29 - (unsigned long) _5) + 7) / 8 + 1) * 4 +
(unsigned long)  : (unsigned long)  + 4) - doloop.33_51 * 4) + 4)
during GIMPLE pass: ivopts
jwwokwvg.cc:124:1: internal compiler error: verify_gimple failed
0x1098f13 verify_gimple_in_cfg(function*, bool)
   
/var/tmp/portage/cross-powerpc-e300c3-linux-gnu/gcc-10.0.0_alpha20191027/work/gcc-10-20191027/gcc/tree-cfg.c:5427
0xf6996e execute_function_todo
   
/var/tmp/portage/cross-powerpc-e300c3-linux-gnu/gcc-10.0.0_alpha20191027/work/gcc-10-20191027/gcc/passes.c:1983
0xf6a18a execute_todo
   
/var/tmp/portage/cross-powerpc-e300c3-linux-gnu/gcc-10.0.0_alpha20191027/work/gcc-10-20191027/gcc/passes.c:2037

I cannot reproduce it for x86_64, though.

[Bug tree-optimization/92226] [10 Regression] live nul char store to array eliminated

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

--- Comment #3 from Martin Sebor  ---
Author: msebor
Date: Mon Oct 28 23:46:09 2019
New Revision: 277545

URL: https://gcc.gnu.org/viewcvs?rev=277545=gcc=rev
Log:
PR tree-optimization/92226 - live nul char store to array eliminated

gcc/testsuite/ChangeLog:

PR tree-optimization/92226
* gcc.dg/strlenopt-88.c: New test.

gcc/ChangeLog:

PR tree-optimization/92226
* tree-ssa-strlen.c (compare_nonzero_chars): Return -1 also when
the offset is in the open range outlined by SI's length.


Added:
trunk/gcc/testsuite/gcc.dg/strlenopt-88.c
Modified:
trunk/gcc/ChangeLog
trunk/gcc/testsuite/ChangeLog
trunk/gcc/tree-ssa-strlen.c

[Bug tree-optimization/83819] [meta-bug] missing strlen optimizations

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

Bug 92226 Summary: [10 Regression] live nul char store to array eliminated
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92226

   What|Removed |Added

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

[Bug tree-optimization/92226] [10 Regression] live nul char store to array eliminated

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

Martin Sebor  changed:

   What|Removed |Added

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

--- Comment #2 from Martin Sebor  ---
Patch committed in r277545.

[Bug c/92261] New: syntax errors on __has_builtin (__has_builtin)

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

Bug ID: 92261
   Summary: syntax errors on __has_builtin (__has_builtin)
   Product: gcc
   Version: 9.0
Status: UNCONFIRMED
  Severity: minor
  Priority: P3
 Component: c
  Assignee: unassigned at gcc dot gnu.org
  Reporter: msebor at gcc dot gnu.org
  Target Milestone: ---

With GCC support for __has_builtin (PR 66970) implemented, I noticed a
difference between it and Clang for the following test case that Clang accepts
and evaluates to zero:

$ cat z.c && gcc -S -Wall z.c
int f (void)
{
  return __has_builtin (__has_builtin);
}
z.c: In function ‘f’:
z.c:3:38: error: missing '(' after "__has_builtin"
3 |   return __has_builtin (__has_builtin);
  |  ^
z.c:3:25: error: macro "__has_builtin" requires an identifier
3 |   return __has_builtin (__has_builtin);
  | ^
z.c:3:23: error: expected ‘;’ at end of input
3 |   return __has_builtin (__has_builtin);
  |   ^
  |   ;
4 | }
  |
z.c:4:1: error: expected declaration or statement at end of input
4 | }
  | ^

[Bug target/90835] Incompatibilities with macOS 10.15 headers

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

Bug 66970 Summary: Add __has_builtin() macro
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66970

   What|Removed |Added

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

[Bug c/66970] Add __has_builtin() macro

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

Martin Sebor  changed:

   What|Removed |Added

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

--- Comment #24 from Martin Sebor  ---
Committed in r277544.

Unlike in Clang, arguments to the GCC __has_builtin operator are subject to
macro expansion.  Also unlike in Clang (as of today), in GCC __has_builtin
(__is_aggregate) && __has_builtin (__builtin_launder) && __has_builtin
(__builtin_offsetof) evaluates to non-zero.

[Bug c/66970] Add __has_builtin() macro

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

--- Comment #23 from Martin Sebor  ---
Author: msebor
Date: Mon Oct 28 22:46:28 2019
New Revision: 277544

URL: https://gcc.gnu.org/viewcvs?rev=277544=gcc=rev
Log:
PR c/66970 - Add __has_builtin() macro

gcc/ChangeLog:

PR c/66970
* doc/cpp.texi (__has_builtin): Document.
* doc/extend.texi (__builtin_frob_return_addr): Correct spelling.

gcc/c/ChangeLog:

PR c/66970
* c-decl.c (names_builtin_p): Define a new function.

gcc/c-family/ChangeLog:

PR c/66970
* c-common.c (c_common_nodes_and_builtins): Call c_define_builtins
even when only preprocessing.
* c-common.h (names_builtin_p): Declare new function.
* c-lex.c (init_c_lex): Set has_builtin.
(c_common_has_builtin): Define a new function.
* c-ppoutput.c (init_pp_output): Set has_builtin.

gcc/cp/ChangeLog:

PR c/66970
* cp-objcp-common.c (names_builtin_p): Define new function.

gcc/testsuite/ChangeLog:

PR c/66970
* c-c++-common/cpp/has-builtin-2.c: New test.
* c-c++-common/cpp/has-builtin-3.c: New test.
* c-c++-common/cpp/has-builtin.c: New test.


Added:
trunk/gcc/testsuite/c-c++-common/cpp/has-builtin-2.c
trunk/gcc/testsuite/c-c++-common/cpp/has-builtin-3.c
trunk/gcc/testsuite/c-c++-common/cpp/has-builtin.c
Modified:
trunk/gcc/ChangeLog
trunk/gcc/c-family/ChangeLog
trunk/gcc/c-family/c-common.c
trunk/gcc/c-family/c-common.h
trunk/gcc/c-family/c-lex.c
trunk/gcc/c-family/c-ppoutput.c
trunk/gcc/c/ChangeLog
trunk/gcc/c/c-decl.c
trunk/gcc/cp/ChangeLog
trunk/gcc/cp/cp-objcp-common.c
trunk/gcc/doc/cpp.texi
trunk/gcc/doc/extend.texi
trunk/gcc/testsuite/ChangeLog
trunk/libcpp/include/cpplib.h
trunk/libcpp/init.c
trunk/libcpp/macro.c
trunk/libcpp/traditional.c

[Bug c/91843] pretty printer mangles extended characters

2019-10-28 Thread lhyatt at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91843

--- Comment #2 from Lewis Hyatt  ---
Patch was sent for review:

https://gcc.gnu.org/ml/gcc-patches/2019-10/msg00766.html

Thanks!

[Bug c++/88337] Implement P1002R1, P1327R1, P1330R0, C++20 relaxations of constexpr restrictions.

2019-10-28 Thread mpolacek at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88337

--- Comment #5 from Marek Polacek  ---
Looks like we need to teach constexpr how to evaluate a call to __dynamic_cast.

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

2019-10-28 Thread ubizjak at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92258

Uroš Bizjak  changed:

   What|Removed |Added

 Status|UNCONFIRMED |ASSIGNED
   Last reconfirmed||2019-10-28
Version|unknown |10.0
   Assignee|unassigned at gcc dot gnu.org  |ubizjak at gmail dot com
   Target Milestone|--- |10.0
 Ever confirmed|0   |1

--- Comment #1 from Uroš Bizjak  ---
Due to r277481 [1] which removed a line too much from iptr iterator.

I have a patch.

[1] https://gcc.gnu.org/ml/gcc-patches/2019-10/msg01888.html

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

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

Tobias Burnus  changed:

   What|Removed |Added

 CC||tkoenig at gcc dot gnu.org

--- Comment #2 from Tobias Burnus  ---
Bisecting points at r267903

2019-01-13  Thomas Koenig  

PR fortran/59345
* trans-array.c (gfc_conv_array_parameter): Remove TODO.  Do not
pack/unpack results of functions which return an explicit-shaped
or allocatable array.

BTW, the the dump shows:

createvarnames (, MAX_EXPR <(integer(kind=8)) D.4012, 0>, D.4009,
D.4011, 3);
function1 (, (character(kind=1)[0:][1:MAX_EXPR <(integer(kind=8))
D.4012, 0>] * restrict) atmp.15.data, &"path"[1]{lb: 1 sz: 1}, ..__result, 4);

[Bug tree-optimization/92226] [10 Regression] live nul char store to array eliminated

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

Martin Sebor  changed:

   What|Removed |Added

   Keywords||patch

--- Comment #1 from Martin Sebor  ---
Patch: https://gcc.gnu.org/ml/gcc-patches/2019-10/msg01989.html

[Bug c++/92260] ice in exact_div, at poly-int.h:2162

2019-10-28 Thread dcb314 at hotmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92260

--- Comment #2 from David Binderman  ---
The reduced C++ code seems to be:

extern "C" int abs(int);
enum { a };
typedef int (*b)(const unsigned char *, long, const unsigned char *, long);
struct f {
  struct {
b c;
  } cu[];
};
template 
int e(const unsigned char *g, long h, unsigned char *m, long) {
  int i;
  for (int j; j; j++) {
for (int k = 0; k < d; k++)
  i += abs(g[k] - m[k]);
g += h;
  }
  return i;
}
template 
int l(const unsigned char *, long, const unsigned char *m, long n) {
  unsigned char o[1];
  int p(e<4, 4>(m, n, o, 0));
  return p;
}
void q(f ) { g.cu[a].c = l; }

[Bug c++/92260] ice in exact_div, at poly-int.h:2162

2019-10-28 Thread dcb314 at hotmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92260

--- Comment #1 from David Binderman  ---
The bug seems to start sometime between revision 277200 and 277250.

A run of creduce is proceeding in the other window. I'll report
back when it is finished.

[Bug c++/92260] New: ice in exact_div, at poly-int.h:2162

2019-10-28 Thread dcb314 at hotmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92260

Bug ID: 92260
   Summary: ice in exact_div, at poly-int.h:2162
   Product: gcc
   Version: 10.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c++
  Assignee: unassigned at gcc dot gnu.org
  Reporter: dcb314 at hotmail dot com
  Target Milestone: ---

Created attachment 47122
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=47122=edit
C++ source code

For the attached C++ code, recent gcc trunk does this with compiler
flag -O3:

/home/dcb/pkgsrc/pkgsrc/multimedia/x265/work/x265_3.2/source/common/pixel.cpp:718:5:
internal compiler error: in exact_div, at poly-int.h:2162
  718 | int psyCost_pp(const pixel* source, intptr_t sstride, const pixel*
recon, intptr_t rstride)
  | ^~
0x7eacd1 poly_int<1u, poly_result::is_poly>::type,
poly_coeff_pair_traits::is_poly>::type>::result_kind>::type>
exact_div<1u, unsigned long, unsigned long>(poly_int_pod<1u, unsigned long>
const&, unsigned long)
../../trunk/gcc/poly-int.h:2162
0x7eacd1 poly_int<1u, poly_result::result_kind>::type>
exact_div<1u, unsigned long, unsigned long>(poly_int_pod<1u, unsigned long>
const&, poly_int_pod<1u, unsigned long> const&)
../../trunk/gcc/poly-int.h:2175
0x7eacd1 vect_get_num_vectors
../../trunk/gcc/tree-vectorizer.h:1462
0x7eacd1 vect_get_constant_vectors
../../trunk/gcc/tree-vect-slp.c:3395

[Bug target/65342] [7/8 Regression] powerpc-darwin9 m64 code-gen error exposed by r210201

2019-10-28 Thread iains at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65342

--- Comment #33 from Iain Sandoe  ---
Author: iains
Date: Mon Oct 28 20:02:01 2019
New Revision: 277543

URL: https://gcc.gnu.org/viewcvs?rev=277543=gcc=rev
Log:
[Darwin, PPC] Fix PR 65342.

The current Darwin load/store lo_sum patterns have neither predicate nor
constraint. This means that most parts of the backend, which rely on
recog() to validate the rtx, can produce invalid combinations/selections.

For 32bit cases this isn't a problem since we can load/store to unaligned
addresses using D-mode insns.

Conversely, for 64bit instructions that use DS mode, this can manifest as
assemble errors (for an assembler that checks the LO14 relocations), or as
crashes caused by wrong offsets (or worse, wrong content for the two LSBs).

What we want to check for Y on Darwin is:
- that the alignment of the Symbols' target is sufficient for DS mode
- that the offset is suitable for DS mode.
(while looking through the Mach-O PIC unspecs).

So, the patch removes the Darwin-specific lo_sum patterns (we begin using
the movdi_internal64 patterns). We also we need to extend the handling of the
mem_operand_gpr constraint to allow looking through Mach-O PIC UNSPECs in
the lo_sum cases.

2019-10-28  Iain Sandoe  

Backport from mainline
2019-10-17  Iain Sandoe  

PR target/65342
* config/rs6000/darwin.md (movdi_low, movsi_low_st): Delete.
(movdi_low_st): Delete.
* config/rs6000/rs6000.c
(darwin_rs6000_legitimate_lo_sum_const_p): New.
(mem_operand_gpr): Validate Mach-O LO_SUM cases separately.
* config/rs6000/rs6000.md (movsi_low): Delete.


Modified:
branches/gcc-8-branch/gcc/ChangeLog
branches/gcc-8-branch/gcc/config/rs6000/darwin.md
branches/gcc-8-branch/gcc/config/rs6000/rs6000.c
branches/gcc-8-branch/gcc/config/rs6000/rs6000.md

[Bug demangler/67299] demangler mishandles complex types

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

Eric Gallager  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 CC||law at gcc dot gnu.org
 Resolution|--- |FIXED

--- Comment #5 from Eric Gallager  ---
Update: Jeff has fixed this in r277535:
https://gcc.gnu.org/ml/gcc-patches/2019-10/msg01982.html

[Bug target/67183] Darwin stub vs. non_lazy pointer ordering incompatible with clang assembler.

2019-10-28 Thread iains at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67183

--- Comment #7 from Iain Sandoe  ---
Author: iains
Date: Mon Oct 28 19:56:27 2019
New Revision: 277542

URL: https://gcc.gnu.org/viewcvs?rev=277542=gcc=rev
Log:
[Darwin, machopic] Fix for 67183

When we're using the LLVM-based assembler (the default on modern Darwin)
the ordering of stubs and non-lazy symbol pointers is important.

Interleaving the output (current GCC behaviour) leads to crashes which
prevents us from building code with symbol stubs.

To resolve this, we order the output of stubs and symbol indirections:

1. Any indirections in the data section
2. Symbol stubs.
3. Non-lazy symbol pointers.

At present, we still emit LTO sections after these.

2019-10-28  Iain Sandoe  

Backport from mainline
2019-10-12  Iain Sandoe  

PR target/67183
* config/darwin.c (machopic_indirection): New field to flag
non-lazy-symbol-pointers in the data section.
(machopic_indirection_name): Compute if an indirection should
appear in the data section.
(machopic_output_data_section_indirection): New callback split
from machopic_output_indirection.
(machopic_output_stub_indirection): Likewise.
(machopic_output_indirection): Retain the code for non-lazy
symbol pointers in their regular section.
(machopic_finish): Use the new callbacks to order the indirection
output.


Modified:
branches/gcc-8-branch/gcc/ChangeLog
branches/gcc-8-branch/gcc/config/darwin.c

[Bug target/59888] Darwin linker error "illegal text-relocation" with -shared

2019-10-28 Thread iains at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=59888

--- Comment #21 from Iain Sandoe  ---
Author: iains
Date: Mon Oct 28 19:40:03 2019
New Revision: 277540

URL: https://gcc.gnu.org/viewcvs?rev=277540=gcc=rev
Log:
[Darwin] Amend section for constants with relocations.

Darwin's linker doesn't like text section relocations (they require special
enabling). The Fortran FE, at least, seems to generate cases where the
initialiser for a pointer constant can need a relocation. We can handle
this by special-casing SECCAT_RODATA when the relocation is present by
placing the constant in the .const_data section.

2019-10-28  Iain Sandoe  

Backport from mainline
2019-10-05  Iain Sandoe  

PR target/59888
* config/darwin.c (darwin_rodata_section): Add relocation flag,
choose const_data section for constants with relocations.
(machopic_select_section): Pass relocation flag to
darwin_rodata_section ().


Modified:
branches/gcc-8-branch/gcc/ChangeLog
branches/gcc-8-branch/gcc/config/darwin.c

[Bug target/82981] [7 Regression] unnecessary __multi3 call for mips64r6 linux kernel

2019-10-28 Thread law at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82981

--- Comment #18 from Jeffrey A. Law  ---
Author: law
Date: Mon Oct 28 19:17:58 2019
New Revision: 277537

URL: https://gcc.gnu.org/viewcvs?rev=277537=gcc=rev
Log:
PR target/82981
* config/mips/mips.md (mulditi3): Generate patterns for high
doubleword and low doubleword result of multiplication on
MIPS64R6.

* gcc.target/mips/mips64r6-ti-mult.c: New test.

Added:
trunk/gcc/testsuite/gcc.target/mips/mips64r6-ti-mult.c
Modified:
trunk/gcc/ChangeLog
trunk/gcc/config/mips/mips.md
trunk/gcc/testsuite/ChangeLog

[Bug target/77918] S390: Floating point comparisons don't raise invalid for unordered operands.

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

--- Comment #15 from joseph at codesourcery dot com  ---
The glibc patch does not need to wait for GCC 10 to be released (we're not 
concerned with old development versions of GCC in glibc, __GNUC_PREREQ 
(10, 0) can be used for anything fixed in GCC 10 without regard for when 
exactly the fix went in).

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

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

--- Comment #5 from joseph at codesourcery dot com  ---
My previous comment was that the *patch* for that old bug was a 
host-dependency, so the bug having been closed as fixed suggests that the 
issue may be present in the source tree, not that the issue is absent.

Without having reviewed the listed issues in detail, the various header 
structures still seem to be written out as bytes without regard for 
endianness, for example.  However, HOST_WIDE_INT is now always 64-bit, so 
anything related to size of HOST_WIDE_INT is no longer an issue.

[Bug sanitizer/92247] ‘__NR_open’ was not declared in this scope libsanitizer/sanitizer_common/sanitizer_linux compilation failed on ubuntu 18.04 WSL2

2019-10-28 Thread pinskia at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92247

--- Comment #3 from Andrew Pinski  ---
Also this seems like it should be filed/fixed upstream first.

[Bug sanitizer/92247] ‘__NR_open’ was not declared in this scope libsanitizer/sanitizer_common/sanitizer_linux compilation failed on ubuntu 18.04 WSL2

2019-10-28 Thread pinskia at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92247

--- Comment #2 from Andrew Pinski  ---
SANITIZER_USES_CANONICAL_LINUX_SYSCALLS is not defined yet but I think Linux
upstream removed the define for __NR_open as it is a legacy system call only
there for backwards compability for old binaries.

[Bug fortran/91926] assumed rank optional

2019-10-28 Thread pault at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91926

Paul Thomas  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |FIXED

--- Comment #6 from Paul Thomas  ---
Fixed on 9-branch and trunk.

Thanks for the report.

Paul

[Bug fortran/91926] assumed rank optional

2019-10-28 Thread pault at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91926

--- Comment #5 from Paul Thomas  ---
Author: pault
Date: Mon Oct 28 18:28:48 2019
New Revision: 277531

URL: https://gcc.gnu.org/viewcvs?rev=277531=gcc=rev
Log:
2019-10-28  Paul Thomas  

Backport from trunk
PR fortran/91926
* trans-expr.c (gfc_conv_gfc_desc_to_cfi_desc): Correct the
assignment of the attribute field to account correctly for an
assumed shape dummy. Assign separately to the gfc and cfi
descriptors since the atribute can be different. Add branch to
correctly handle missing optional dummies.

2019-10-28  Paul Thomas  

Backport from trunk
PR fortran/91926
* gfortran.dg/ISO_Fortran_binding_13.f90 : New test.
* gfortran.dg/ISO_Fortran_binding_13.c : Additional source.
* gfortran.dg/ISO_Fortran_binding_14.f90 : New test.

Added:
branches/gcc-9-branch/gcc/testsuite/gfortran.dg/ISO_Fortran_binding_13.c
branches/gcc-9-branch/gcc/testsuite/gfortran.dg/ISO_Fortran_binding_13.f90
branches/gcc-9-branch/gcc/testsuite/gfortran.dg/ISO_Fortran_binding_14.f90
Modified:
branches/gcc-9-branch/gcc/fortran/ChangeLog
branches/gcc-9-branch/gcc/fortran/trans-expr.c
branches/gcc-9-branch/gcc/testsuite/ChangeLog

[Bug tree-optimization/92229] Optimization makes it impossible to read overflow flag

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

--- Comment #4 from joseph at codesourcery dot com  ---
On Sat, 26 Oct 2019, arieltorti14 at gmail dot com wrote:

> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92229
> 
> --- Comment #2 from Ariel Torti  ---
> (In reply to jos...@codesourcery.com from comment #1)
> > Built-in functions related to integer overflow should be defined in terms 
> > of the C abstract machine model, not in terms of processor flags.
> 
> They should indeed, but what I want to implement here is a function that
> outputs the value of the OV flag, a behavior that cannot be achieved as a
> consequence of optimizations.

You can write an asm to access a flag, it will just be whatever value the 
flag has for whatever code the compiler found matched the language-level 
semantics of your code, which may have nothing to do with your notion of 
what the flag "should" be.

Language semantics are only matched to processor features at ABI 
boundaries, not within functions (and not across calls to inline / static 
functions etc. either, because those aren't ABI boundaries; any good 
language feature in this area also needs to work in the presence of 
multiple functions, and of inlining and similar transformations, not just 
where the arithmetic is in the same function as the code that cares about 
whether it overflowed).

> > See recent WG14 discussions around this issue for various language design 
> > ideas.
> 
> Could you provide a link to the discussion in WG14 ? I'm not subscribed to it
> and I cannot find it.

http://www.open-std.org/jtc1/sc22/wg14/www/docs/n2428.pdf has discussions 
of some ideas.  I wasn't dialed into the WG14 meeting at the point where 
that paper was discussed so you'll need to wait for the Ithaca minutes for 
more on what WG14 thought of it there.

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

2019-10-28 Thread jan at jki dot io
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92259

--- Comment #1 from Jan  ---
Created attachment 47121
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=47121=edit
gcov file

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

2019-10-28 Thread jan at jki dot io
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92259

Bug ID: 92259
   Summary: ICE with lto and auto-profile cp/mangle.c:1641
write_closure_type_name
   Product: gcc
   Version: 10.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: lto
  Assignee: unassigned at gcc dot gnu.org
  Reporter: jan at jki dot io
CC: marxin at gcc dot gnu.org
  Target Milestone: ---

Created attachment 47120
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=47120=edit
preprocessed source

COLLECT_GCC_OPTIONS='-D' 'HAVE_CONFIG_H' '-I' '.' '-I'
'/var/tmp/portage/media-libs/harfbuzz-2.6.2/work/harfbuzz-2.6.2/src' '-I' '..'
'-pthread' '-I' '/usr/include/glib-2.0' '-I'
'/usr/lib64/glib-2.0/include' '-I' '/usr/include/freetype2' '-I'
'/usr/include/harfbuzz' '-I' '/usr/include/glib-2.0' '-I'
'/usr/lib64/glib-2.0/include' '-D' 'HB_NDEBUG' '-fno-rtt
i' '-pipe' '-march=skylake' '-O1' '-g' '-v' '-save-temps' '-fPIC' '-flto'
'-fauto-profile=/usr/src/gcov/media-libs/harfbuzz.gcov' '-fno-strict-aliasing'
'-std=c++14' '-fno-excepti
ons' '-fno-threadsafe-statics' '-fvisibility-inlines-hidden' '-c'
'-shared-libgcc'
 /usr/libexec/gcc/x86_64-pc-linux-gnu/10.0.0-pre/cc1plus -fpreprocessed
hb-ot-layout.ii -quiet -dumpbase hb-ot-layout.cc -march=skylake -auxbase
hb-ot-layout -g -O1 -std=c++14
 -version -fno-rtti -fPIC -flto
-fauto-profile=/usr/src/gcov/media-libs/harfbuzz.gcov -fno-strict-aliasing
-fno-exceptions -fno-threadsafe-statics -fvisibility-inlines-hidden -o h
b-ot-layout.s
GNU C++14 (Gentoo 10.0.0_pre) version 10.0.0-pre9999 20191028
(experimental) (x86_64-pc-linux-gnu)
compiled by GNU C version 10.0.0-pre9999 20191028 (experimental), GMP
version 6.1.2, MPFR version 4.0.2, MPC version 1.1.0, isl version isl-0.21-GMP

GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
GNU C++14 (Gentoo 10.0.0_pre) version 10.0.0-pre9999 20191028
(experimental) (x86_64-pc-linux-gnu)
compiled by GNU C version 10.0.0-pre9999 20191028 (experimental), GMP
version 6.1.2, MPFR version 4.0.2, MPC version 1.1.0, isl version isl-0.21-GMP

GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
Compiler executable checksum: 437eac8c0b7590909de6c19d5daad7d0
during GIMPLE pass: einline
‘
In file included from
/var/tmp/portage/media-libs/harfbuzz-2.6.2/work/harfbuzz-2.6.2/src/hb.hh:608,
 from
/var/tmp/portage/media-libs/harfbuzz-2.6.2/work/harfbuzz-2.6.2/src/hb-ot-layout.cc:31:
in pp_format, at pretty-print.c:1394
  372 |   hb_map_iter_t (const Iter& it, Proj f_) : it (it), f (f_) {}
  |   ^
0xe9cb30 pp_format(pretty_printer*, text_info*)
   
/var/tmp/portage/sys-devel/gcc-10.0.0_pre/work/gcc-10.0.0_pre/gcc/pretty-print.c:1394
0xe9dc54 pp_format_verbatim(pretty_printer*, text_info*)
   
/var/tmp/portage/sys-devel/gcc-10.0.0_pre/work/gcc-10.0.0_pre/gcc/pretty-print.c:1452
0xe9dc33 pp_verbatim(pretty_printer*, char const*, ...)
   
/var/tmp/portage/sys-devel/gcc-10.0.0_pre/work/gcc-10.0.0_pre/gcc/pretty-print.c:1672
0x5f28d1 print_instantiation_full_context
   
/var/tmp/portage/sys-devel/gcc-10.0.0_pre/work/gcc-10.0.0_pre/gcc/cp/error.c:3491
0x5f28d1 maybe_print_instantiation_context
   
/var/tmp/portage/sys-devel/gcc-10.0.0_pre/work/gcc-10.0.0_pre/gcc/cp/error.c:3639
0x14a382d default_tree_diagnostic_starter
   
/var/tmp/portage/sys-devel/gcc-10.0.0_pre/work/gcc-10.0.0_pre/gcc/tree-diagnostic.c:48
0x13cdf4b diagnostic_report_diagnostic(diagnostic_context*, diagnostic_info*)
   
/var/tmp/portage/sys-devel/gcc-10.0.0_pre/work/gcc-10.0.0_pre/gcc/diagnostic.c:1058
0x13cdbfd diagnostic_impl
   
/var/tmp/portage/sys-devel/gcc-10.0.0_pre/work/gcc-10.0.0_pre/gcc/diagnostic.c:1201
0xe97cb4 internal_error(char const*, ...)
   
/var/tmp/portage/sys-devel/gcc-10.0.0_pre/work/gcc-10.0.0_pre/gcc/diagnostic.c:1582
0x8e25fd crash_signal
   
/var/tmp/portage/sys-devel/gcc-10.0.0_pre/work/gcc-10.0.0_pre/gcc/toplev.c:326
0x7f8fbf3e9b8f ???
   
/var/tmp/portage/sys-libs/glibc-2.30/work/glibc-2.30/signal/../sysdeps/unix/sysv/linux/x86_64/sigaction.c:0
0x605ead write_closure_type_name
   
/var/tmp/portage/sys-devel/gcc-10.0.0_pre/work/gcc-10.0.0_pre/gcc/cp/mangle.c:1641
0x605ead write_unqualified_name
   
/var/tmp/portage/sys-devel/gcc-10.0.0_pre/work/gcc-10.0.0_pre/gcc/cp/mangle.c:1407
0xf2c4cd write_local_name
   
/var/tmp/portage/sys-devel/gcc-10.0.0_pre/work/gcc-10.0.0_pre/gcc/cp/mangle.c:2004
0xf2c4cd write_name
   
/var/tmp/portage/sys-devel/gcc-10.0.0_pre/work/gcc-10.0.0_pre/gcc/cp/mangle.c:962
0xf2ef6f write_class_enum_type
   
/var/tmp/portage/sys-devel/gcc-10.0.0_pre/work/gcc-10.0.0_pre/gcc/cp/mangle.c:2755
0xf2ef6f write_type
   
/var/tmp/portage/sy

[Bug target/92257] AVX512 incorrect usage of aligned loads and stores

2019-10-28 Thread pinskia at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92257

--- Comment #3 from Andrew Pinski  ---
(In reply to Ilya Albrekht from comment #2)
> PS. I guess you meant 512 bit?
Yes I mean 512bit or 64 byte.

[Bug target/92257] AVX512 incorrect usage of aligned loads and stores

2019-10-28 Thread ilya at alfs dot me
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92257

--- Comment #2 from Ilya Albrekht  ---
Thank you for your prompt reply. I missed that __m512i_u type exists to avoid
alignment requirement.

PS. I guess you meant 512 bit?

Regards,
Ilya

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

2019-10-28 Thread asolokha at gmx dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92258

Bug ID: 92258
   Summary: [10 Regression] ICE: output_operand: invalid %-code
   Product: gcc
   Version: unknown
Status: UNCONFIRMED
  Keywords: ice-on-valid-code
  Severity: normal
  Priority: P3
 Component: target
  Assignee: unassigned at gcc dot gnu.org
  Reporter: asolokha at gmx dot com
  Target Milestone: ---
Target: x86_64-unknown-linux-gnu

gcc-10.0.0-alpha20191027 snapshot (r277495) ICEs when compiling the following
testcase reduced from gcc/testsuite/gcc.target/i386/sse-23.c (many more
testcases also ICE similarly) w/ -masm=intel:

typedef double vz __attribute__ ((__vector_size__ (16)));

int
v2 (vz pv, vz bc)
{
  return __builtin_ia32_ucomisdeq (pv, bc);
}

% x86_64-unknown-linux-gnu-gcc-10.0.0-alpha20191027 -masm=intel -c k467o9dg.c
during RTL pass: final
k467o9dg.c: In function 'v2':
k467o9dg.c:7:1: internal compiler error: output_operand: invalid %-code
7 | }
  | ^
0x981dbb output_operand_lossage(char const*, ...)
   
/var/tmp/portage/sys-devel/gcc-10.0.0_alpha20191027/work/gcc-10-20191027/gcc/final.c:3610
0x9834b4 output_asm_insn(char const*, rtx_def**)
   
/var/tmp/portage/sys-devel/gcc-10.0.0_alpha20191027/work/gcc-10-20191027/gcc/final.c:3979
0x98558c final_scan_insn_1
   
/var/tmp/portage/sys-devel/gcc-10.0.0_alpha20191027/work/gcc-10-20191027/gcc/final.c:3107
0x98586e final_scan_insn(rtx_insn*, _IO_FILE*, int, int, int*)
   
/var/tmp/portage/sys-devel/gcc-10.0.0_alpha20191027/work/gcc-10-20191027/gcc/final.c:3153
0x985960 final_1
   
/var/tmp/portage/sys-devel/gcc-10.0.0_alpha20191027/work/gcc-10-20191027/gcc/final.c:2021
0x986504 rest_of_handle_final
   
/var/tmp/portage/sys-devel/gcc-10.0.0_alpha20191027/work/gcc-10-20191027/gcc/final.c:4659
0x986504 execute
   
/var/tmp/portage/sys-devel/gcc-10.0.0_alpha20191027/work/gcc-10-20191027/gcc/final.c:4737

[Bug c++/88337] Implement P1002R1, P1327R1, P1330R0, C++20 relaxations of constexpr restrictions.

2019-10-28 Thread mpolacek at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88337

Marek Polacek  changed:

   What|Removed |Added

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

--- Comment #4 from Marek Polacek  ---
P1002R1 and P1330R0 were implemented in GCC 9.  Taking this PR since I'm
looking into P1327R1 (for GCC 10).

[Bug tree-optimization/92163] [10 Regression] ICE: Segmentation fault (in bitmap_set_bit)

2019-10-28 Thread asolokha at gmx dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92163

--- Comment #8 from Arseny Solokha  ---
So can be closed now?

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

2019-10-28 Thread asolokha at gmx dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92228

--- Comment #4 from Arseny Solokha  ---
Done.

int ze, r2;
int i0[2];

void
np (int ch)
{
  while (ch < 1)
{
  if (i0[ch] != 0)
ze = r2 = ch;

  ++ch;
}
}

% gcc-10.0.0-alpha20191027 -O3 -c bisb9gfl.c
during GIMPLE pass: vect
bisb9gfl.c: In function 'np':
bisb9gfl.c:5:1: internal compiler error: in vectorizable_reduction, at
tree-vect-loop.c:5730
5 | np (int ch)
  | ^~
0x6ba80d vectorizable_reduction(_stmt_vec_info*, _slp_tree*, _slp_instance*,
vec*)
   
/var/tmp/portage/sys-devel/gcc-10.0.0_alpha20191027/work/gcc-10-20191027/gcc/tree-vect-loop.c:5730
0xe8bed9 vect_analyze_loop_operations
   
/var/tmp/portage/sys-devel/gcc-10.0.0_alpha20191027/work/gcc-10-20191027/gcc/tree-vect-loop.c:1560
0xe8bed9 vect_analyze_loop_2
   
/var/tmp/portage/sys-devel/gcc-10.0.0_alpha20191027/work/gcc-10-20191027/gcc/tree-vect-loop.c:2079
0xe8bed9 vect_analyze_loop(loop*, _loop_vec_info*, vec_info_shared*)
   
/var/tmp/portage/sys-devel/gcc-10.0.0_alpha20191027/work/gcc-10-20191027/gcc/tree-vect-loop.c:2367
0xea47d4 try_vectorize_loop_1
   
/var/tmp/portage/sys-devel/gcc-10.0.0_alpha20191027/work/gcc-10-20191027/gcc/tree-vectorizer.c:886
0xea55f4 vectorize_loops()
   
/var/tmp/portage/sys-devel/gcc-10.0.0_alpha20191027/work/gcc-10-20191027/gcc/tree-vectorizer.c:1114

[Bug target/92257] AVX512 incorrect usage of aligned loads and stores

2019-10-28 Thread pinskia at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92257

Andrew Pinski  changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
  Component|c   |target
 Resolution|--- |INVALID

--- Comment #1 from Andrew Pinski  ---
The alignment requirement for __m512i is 512 byte aligned.  The intrinsics that
does an unaligned load works correctly us that.

[Bug c/92257] New: AVX512 incorrect usage of aligned loads and stores

2019-10-28 Thread ilya at alfs dot me
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92257

Bug ID: 92257
   Summary: AVX512 incorrect usage of aligned loads and stores
   Product: gcc
   Version: 9.2.1
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c
  Assignee: unassigned at gcc dot gnu.org
  Reporter: ilya at alfs dot me
  Target Milestone: ---

Hello,

I had few segmentation faults while writing AVX512 code. SEGFAULTs were caused
by aligned loads used when data alignment can not be guaranteed in compile
time.

test.c:
#include 

__m512i foo(__m512i *a) {
return a[100];
}

gcc -S -O3 -march=icelake-client -mavx512f ./test.c

test.s:
.file   "test.c"
.text
.p2align 4
.globl  foo
.type   foo, @function
foo:
.LFB5279:
.cfi_startproc
vmovdqa64   6400(%rdi), %zmm0
ret
.cfi_endproc
.LFE5279:
.size   foo, .-foo
.ident  "GCC: (GNU) 9.2.1 20190827 (Red Hat 9.2.1-1)"
.section.note.GNU-stack,"",@progbits

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

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

Bug ID: 92256
   Summary: [10 regression] error in gcc.dg/unroll-and-jam.c after
r277501
   Product: gcc
   Version: 10.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: other
  Assignee: unassigned at gcc dot gnu.org
  Reporter: seurer at gcc dot gnu.org
  Target Milestone: ---

Tried 277501
make -k check-gcc RUNTESTFLAGS=dg.exp=gcc.dg/unroll-and-jam.c

FAIL: gcc.dg/unroll-and-jam.c scan-tree-dump-times unrolljam "applying unroll
and jam" 6

# of expected passes2
# of unexpected failures1


Executing on host: /home/seurer/gcc/build/gcc-test2/gcc/xgcc
-B/home/seurer/gcc/build/gcc-test2/gcc/
/home/seurer/gcc/gcc-test2/gcc/testsuite/gcc.dg/unroll-and-jam.c   
-fno-diagnostics-show-caret -fno-diagnostics-show-line-numbers
-fdiagnostics-color=never  -fdiagnostics-urls=never   -O3 -floop-unroll-and-jam
--param unroll-jam-min-percent=0 -fdump-tree-unrolljam-details  -lm  -o
./unroll-and-jam.exe(timeout = 300)
spawn -ignore SIGHUP /home/seurer/gcc/build/gcc-test2/gcc/xgcc
-B/home/seurer/gcc/build/gcc-test2/gcc/
/home/seurer/gcc/gcc-test2/gcc/testsuite/gcc.dg/unroll-and-jam.c
-fno-diagnostics-show-caret -fno-diagnostics-show-line-numbers
-fdiagnostics-color=never -fdiagnostics-urls=never -O3 -floop-unroll-and-jam
--param unroll-jam-min-percent=0 -fdump-tree-unrolljam-details -lm -o
./unroll-and-jam.exe
PASS: gcc.dg/unroll-and-jam.c (test for excess errors)
Setting LD_LIBRARY_PATH to
:/home/seurer/gcc/build/gcc-test2/gcc::/home/seurer/gcc/build/gcc-test2/gcc:/home/seurer/gcc/build/gcc-test2/./gmp/.libs:/home/seurer/gcc/build/gcc-test2/./prev-gmp/.libs:/home/seurer/gcc/build/gcc-test2/./mpfr/src/.libs:/home/seurer/gcc/build/gcc-test2/./prev-mpfr/src/.libs:/home/seurer/gcc/build/gcc-test2/./mpc/src/.libs:/home/seurer/gcc/build/gcc-test2/./prev-mpc/src/.libs:/home/seurer/gcc/build/gcc-test2/./isl/.libs:/home/seurer/gcc/build/gcc-test2/./prev-isl/.libs:/home/seurer/gcc/install/gcc-7.2.0/lib64
Execution timeout is: 300
spawn [open ...]
 foo1
ok foo1
 foo2
ok foo2
 foo3
ok foo3
 foo4
ok foo4
 foo5
ok foo5
 foo6
ok foo6
 foo61
ok foo61
 foo62
ok foo62
 foo63
ok foo63
 foo7
ok foo7
 foo8
ok foo8
 foo9
ok foo9
 foo10
ok foo10
 foo11
ok foo11
PASS: gcc.dg/unroll-and-jam.c execution test
gcc.dg/unroll-and-jam.c: pattern found 5 times
FAIL: gcc.dg/unroll-and-jam.c scan-tree-dump-times unrolljam "applying unroll
and jam" 6
testcase /home/seurer/gcc/gcc-test2/gcc/testsuite/gcc.dg/dg.exp completed in 2
seconds

=== gcc Summary ===

# of expected passes2
# of unexpected failures1

[Bug fortran/92178] Segmentation fault after passing allocatable array as intent(out) and its element as value into the same subroutine

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

Tobias Burnus  changed:

   What|Removed |Added

 CC||burnus at gcc dot gnu.org

--- Comment #11 from Tobias Burnus  ---
See also patch submitted at
https://gcc.gnu.org/ml/gcc-patches/2019-10/msg01686.html

And patch review showing some additional issues,
https://gcc.gnu.org/ml/gcc-patches/2019-10/msg01970.html

[Bug tree-optimization/92163] [10 Regression] ICE: Segmentation fault (in bitmap_set_bit)

2019-10-28 Thread prathamesh3492 at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92163

--- Comment #7 from prathamesh3492 at gcc dot gnu.org ---
Author: prathamesh3492
Date: Mon Oct 28 15:01:24 2019
New Revision: 277525

URL: https://gcc.gnu.org/viewcvs?rev=277525=gcc=rev
Log:
2019-10-28  Prathamesh Kulkarni  

PR tree-optimization/92163
* tree-ssa-dse.c (delete_dead_or_redundant_assignment): New param
need_eh_cleanup with default value NULL. Gate on need_eh_cleanup
before calling bitmap_set_bit.
(dse_optimize_redundant_stores): Pass global need_eh_cleanup to
delete_dead_or_redundant_assignment.
(dse_dom_walker::dse_optimize_stmt): Likewise.
* tree-ssa-dse.h (delete_dead_or_redundant_assignment): Adjust
prototype.

testsuite/
* gcc.dg/tree-ssa/pr92163.c: New test.

Added:
trunk/gcc/testsuite/gcc.dg/tree-ssa/pr92163.c
Modified:
trunk/gcc/ChangeLog
trunk/gcc/testsuite/ChangeLog
trunk/gcc/tree-ssa-dse.c
trunk/gcc/tree-ssa-dse.h

[Bug c++/92255] New: No "did you mean" hint for specialization of unrecognised variable template

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

Bug ID: 92255
   Summary: No "did you mean" hint for specialization of
unrecognised variable template
   Product: gcc
   Version: 10.0
Status: UNCONFIRMED
  Keywords: diagnostic
  Severity: normal
  Priority: P3
 Component: c++
  Assignee: unassigned at gcc dot gnu.org
  Reporter: redi at gcc dot gnu.org
  Target Milestone: ---

namespace X::Y {
  template inline constexpr bool foo = false;
}

struct A { };

template<>
constexpr bool X::foo = true;


Compiled with -std=gnu++17 this says:

v.cc:8:22: error: expected initializer before '<' token
8 | constexpr bool X::foo = true;
  |  ^


It would be useful to suggest X::Y::foo.

I spent an embarrassingly long time trying to figure out why my specialization
wasn't compiling.

[Bug target/77882] [Aarch64] Add 'naked' function attribute

2019-10-28 Thread e2lahav at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77882

--- Comment #8 from Elad Lahav  ---
(In reply to Andrew Pinski from comment #7)
> The problem with the naked attribute is usually it is not well defined.  For
> things like interrupts functions and interrupt returns, there is always
> plain .s files. Interrupts usually save/restore all registers including the
> floating point ones.  So they are large.  The float point ones can get
> complex now with SVE too.

I am actually using this facility to write kernel entry and exit routines. As I
said, the advantage over pure assembly files is that you can use offsetof() and
_Static_assert() when storing and loading registers to and from kernel data
structures. You can also break up large chunks (such as storing and loading FPU
registers) into inline functions.

So far it looks like the compiler is doing the right thing with a combination
of naked functions and inline functions: the code I get is exactly the inline
assembly in these functions without any modifications or additions. If that is
not guaranteed then it is indeed a problem.

[Bug middle-end/91272] [SVE] Use fully-masked loops for CLASTB reductions

2019-10-28 Thread prathamesh3492 at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91272

--- Comment #1 from prathamesh3492 at gcc dot gnu.org ---
Author: prathamesh3492
Date: Mon Oct 28 14:50:58 2019
New Revision: 277524

URL: https://gcc.gnu.org/viewcvs?rev=277524=gcc=rev
Log:
2019-10-28  Prathamesh Kulkarni  

PR middle-end/91272
* tree-vect-stmts.c (vectorizable_condition): Support
EXTRACT_LAST_REDUCTION with fully-masked loops.

testsuite/
* gcc.target/aarch64/sve/clastb_1.c: Add dg-scan.
* gcc.target/aarch64/sve/clastb_2.c: Likewise.
* gcc.target/aarch64/sve/clastb_3.c: Likewise.
* gcc.target/aarch64/sve/clastb_4.c: Likewise.
* gcc.target/aarch64/sve/clastb_5.c: Likewise.
* gcc.target/aarch64/sve/clastb_6.c: Likewise.
* gcc.target/aarch64/sve/clastb_7.c: Likewise.
* gcc.target/aarch64/sve/clastb_8.c: Likewise.

Modified:
trunk/gcc/ChangeLog
trunk/gcc/testsuite/ChangeLog
trunk/gcc/testsuite/gcc.target/aarch64/sve/clastb_1.c
trunk/gcc/testsuite/gcc.target/aarch64/sve/clastb_2.c
trunk/gcc/testsuite/gcc.target/aarch64/sve/clastb_3.c
trunk/gcc/testsuite/gcc.target/aarch64/sve/clastb_4.c
trunk/gcc/testsuite/gcc.target/aarch64/sve/clastb_5.c
trunk/gcc/testsuite/gcc.target/aarch64/sve/clastb_6.c
trunk/gcc/testsuite/gcc.target/aarch64/sve/clastb_7.c
trunk/gcc/testsuite/gcc.target/aarch64/sve/clastb_8.c
trunk/gcc/tree-vect-stmts.c

[Bug fortran/91863] [9/10 Regression] ICE in wide_int_to_tree_1, at tree.c:156

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

--- Comment #6 from Tobias Burnus  ---
(In reply to paul.richard.tho...@gmail.com from comment #5)
> It was my intention to commit the patch for PR91926 to 9-branch
> tonight. I take it that there was no problem with yours?

Yes, fine with me.

(I think that was not meant for Bugzilla – still, I also reply on Bugzilla for
completeness.)

[Bug target/77882] [Aarch64] Add 'naked' function attribute

2019-10-28 Thread pinskia at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77882

--- Comment #7 from Andrew Pinski  ---
The problem with the naked attribute is usually it is not well defined.  For
things like interrupts functions and interrupt returns, there is always plain
.s files. Interrupts usually save/restore all registers including the floating
point ones.  So they are large.  The float point ones can get complex now with
SVE too.

[Bug c/23577] spurious warnings about unhandled cases in switches (need VRP and control flow in front-end)

2019-10-28 Thread amacleod at redhat dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=23577

Andrew Macleod  changed:

   What|Removed |Added

 CC||amacleod at redhat dot com

--- Comment #4 from Andrew Macleod  ---
We do hope to be able to do better switch analysis eventually.  Not so much
because of the on-demand nature, but rather through the new range class where
we can represent more subranges and produce more accurate results.

[Bug target/77882] [Aarch64] Add 'naked' function attribute

2019-10-28 Thread e2lahav at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77882

--- Comment #6 from Elad Lahav  ---
(In reply to Richard Earnshaw from comment #5)
> Patches need to be sent to gcc-patc...@gcc.gnu.org.  Note, if you've not
> contributed to gcc before you'll also need to sort out a copyright
> assignment for the change (this is a non-trivial change).

Yes, I figured there is more process to submitting a change. At this point I
just wanted to point out that it is a simple enough fix.

[Bug target/70010] powerpc: -flto forgets 'no-vsx' function attributes

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

--- Comment #12 from Jiu Fu Guo  ---
Author: guojiufu
Date: Mon Oct 28 14:30:05 2019
New Revision: 277523

URL: https://gcc.gnu.org/viewcvs?rev=277523=gcc=rev
Log:
Backport from mainline

PR target/70010
* gcc.target/powerpc/pr70010.c: Add -Wno-psabi and -mvsx.

Modified:
branches/gcc-8-branch/gcc/testsuite/ChangeLog
branches/gcc-8-branch/gcc/testsuite/gcc.target/powerpc/pr70010.c

[Bug fortran/91863] [9/10 Regression] ICE in wide_int_to_tree_1, at tree.c:156

2019-10-28 Thread paul.richard.thomas at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91863

--- Comment #5 from paul.richard.thomas at gmail dot com  ---
Hi Tobias,

It was my intention to commit the patch for PR91926 to 9-branch
tonight. I take it that there was no problem with yours?

Cheers

Paul


On Mon, 28 Oct 2019 at 07:34, burnus at gcc dot gnu.org
 wrote:
>
> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91863
>
> --- Comment #2 from Tobias Burnus  ---
> Author: burnus
> Date: Mon Oct 28 07:33:29 2019
> New Revision: 277502
>
> URL: https://gcc.gnu.org/viewcvs?rev=277502=gcc=rev
> Log:
> Fortran] PR91863 - fix call to bind(C) with array descriptor
>
> PR fortran/91863
> * trans-expr.c (gfc_conv_gfc_desc_to_cfi_desc): Don't free data
> memory as that's done on the Fortran side.
> (gfc_conv_procedure_call): Handle void* pointers from
> gfc_conv_gfc_desc_to_cfi_desc.
>
> PR fortran/91863
> * gfortran.dg/bind-c-intent-out.f90: New.
>
>
> Added:
> trunk/gcc/testsuite/gfortran.dg/bind-c-intent-out.f90
> Modified:
> trunk/gcc/fortran/ChangeLog
> trunk/gcc/fortran/trans-expr.c
> trunk/gcc/testsuite/ChangeLog
>
> --
> You are receiving this mail because:
> You are on the CC list for the bug.



--
"If you can't explain it simply, you don't understand it well enough"
- Albert Einstein

[Bug target/70010] powerpc: -flto forgets 'no-vsx' function attributes

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

--- Comment #11 from Jiu Fu Guo  ---
Author: guojiufu
Date: Mon Oct 28 14:23:26 2019
New Revision: 277521

URL: https://gcc.gnu.org/viewcvs?rev=277521=gcc=rev
Log:
Backport from mainline

PR target/70010
* gcc.target/powerpc/pr70010.c: Add -Wno-psabi.
* gcc.target/powerpc/pr70010-1.c: Require LTO.
* gcc.target/powerpc/pr70010-2.c: Require LTO.

Modified:
branches/gcc-9-branch/gcc/testsuite/ChangeLog
branches/gcc-9-branch/gcc/testsuite/gcc.target/powerpc/pr70010-1.c
branches/gcc-9-branch/gcc/testsuite/gcc.target/powerpc/pr70010-2.c
branches/gcc-9-branch/gcc/testsuite/gcc.target/powerpc/pr70010.c

[Bug target/92225] ice in gen_smaxv2di3, at config/i386/sse.md:12225

2019-10-28 Thread ubizjak at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92225

Uroš Bizjak  changed:

   What|Removed |Added

 CC|uros at gcc dot gnu.org|
   Assignee|unassigned at gcc dot gnu.org  |ubizjak at gmail dot com
   Target Milestone|--- |9.3

--- Comment #13 from Uroš Bizjak  ---
Fixed for 9.3+.

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

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

Richard Biener  changed:

   What|Removed |Added

   Target Milestone|--- |10.0

[Bug target/92225] ice in gen_smaxv2di3, at config/i386/sse.md:12225

2019-10-28 Thread uros at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92225

--- Comment #12 from uros at gcc dot gnu.org ---
Author: uros
Date: Mon Oct 28 14:16:50 2019
New Revision: 277520

URL: https://gcc.gnu.org/viewcvs?rev=277520=gcc=rev
Log:
PR target/92225
* config/i386/sse.md (REDUC_SSE_SMINMAX_MODE): Use TARGET_SSE4_2
condition for V2DImode.

testsuite/ChangeLog:

PR target/92225
* gcc.target/i386/pr92225.c: New test.


Added:
branches/gcc-9-branch/gcc/testsuite/gcc.target/i386/pr92225.c
Modified:
branches/gcc-9-branch/gcc/ChangeLog
branches/gcc-9-branch/gcc/config/i386/sse.md
branches/gcc-9-branch/gcc/testsuite/ChangeLog

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

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

Jan Hubicka  changed:

   What|Removed |Added

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

--- Comment #5 from Jan Hubicka  ---
Thanks for confirmation (and testcase). Sadly I am not sure how to put it into
testsuite but given that other tests also broke I hope this patch is tested
sufficiently.

Honza

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

2019-10-28 Thread dimhen at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92254

Bug ID: 92254
   Summary: [10 regression] ICE LTO in inline_small_functions, at
ipa-inline.c:2000
   Product: gcc
   Version: 10.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: ipa
  Assignee: unassigned at gcc dot gnu.org
  Reporter: dimhen at gmail dot com
CC: marxin at gcc dot gnu.org
  Target Milestone: ---

r277460 PASS
r277504 FAIL

Fedora 31 x86_64

gcc -shared -fPIC -DPIC -flto [40+ files] -Wl,-version-script -Wl,ver.file -o
...

during IPA pass: inline
lto1: internal compiler error: in inline_small_functions, at ipa-inline.c:2000
0x900b07 inline_small_functions
/home/dimhen/src/gcc_current/gcc/ipa-inline.c:2000
0x900b07 ipa_inline
/home/dimhen/src/gcc_current/gcc/ipa-inline.c:2615
0x900b07 execute
/home/dimhen/src/gcc_current/gcc/ipa-inline.c:3023
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See  for instructions.
lto-wrapper: fatal error: gcc returned 1 exit status
compilation terminated.
/usr/local/binutils_current/bin/ld: error: lto-wrapper failed
collect2: error: ld returned 1 exit status

[Bug target/70010] powerpc: -flto forgets 'no-vsx' function attributes

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

--- Comment #10 from Jiu Fu Guo  ---
Author: guojiufu
Date: Mon Oct 28 13:55:41 2019
New Revision: 277518

URL: https://gcc.gnu.org/viewcvs?rev=277518=gcc=rev
Log:
[rs6000] PR70010, avoid no-vsx function to be inlined to vsx function

In PR70010, a function is marked with target(no-vsx) to disable VSX code
generation.  To avoid VSX code generation, this function should not be
inlined into VSX function.  To fix the bug, in the current logic when
checking whether the caller's ISA flags supports the callee's ISA flags, we
just need to add a test that enforces that the caller's ISA flags match
exactly the callee's flags, for those flags that were explicitly set in the
callee.  If caller without target attribute then using options from command
line.

Jiufu
BR


gcc/
2019-10-16  Peter Bergner 
Jiufu Guo  

PR target/70010
* config/rs6000/rs6000.c (rs6000_can_inline_p): Prohibit inlining if
the callee explicitly disables some isa_flags the caller is using.

gcc.testsuite/
2019-10-16  Peter Bergner 
Jiufu Guo  

PR target/70010
* gcc.target/powerpc/pr70010.c: New test.
* gcc.target/powerpc/pr70010-1.c: New test.
* gcc.target/powerpc/pr70010-3.c: New test.
* gcc.target/powerpc/pr70010-4.c: New test.



Added:
branches/gcc-8-branch/gcc/testsuite/gcc.target/powerpc/pr70010-1.c
branches/gcc-8-branch/gcc/testsuite/gcc.target/powerpc/pr70010-3.c
branches/gcc-8-branch/gcc/testsuite/gcc.target/powerpc/pr70010-4.c
branches/gcc-8-branch/gcc/testsuite/gcc.target/powerpc/pr70010.c
Modified:
branches/gcc-8-branch/gcc/ChangeLog
branches/gcc-8-branch/gcc/config/rs6000/rs6000.c
branches/gcc-8-branch/gcc/testsuite/ChangeLog

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

2019-10-28 Thread dimhen at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92242

--- Comment #4 from Dmitry G. Dyachenko  ---
r277504 PASS for me.
Thank you

[Bug target/77882] [Aarch64] Add 'naked' function attribute

2019-10-28 Thread rearnsha at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77882

--- Comment #5 from Richard Earnshaw  ---
(In reply to Elad Lahav from comment #4)
> Created attachment 47119 [details]
> Proposed implementation of naked functions for aarch64
> 
> The change is quite simple (see the proposed patch). I hope it can be made,
> as I find naked functions quite useful, especially by allowing the use of
> certain C features in otherwise pure assembly code (e.g., offsetof,
> _Static_assert). Aesthetically, naked functions provide proper prototypes
> that are easier to follow, document and test.

Patches need to be sent to gcc-patc...@gcc.gnu.org.  Note, if you've not
contributed to gcc before you'll also need to sort out a copyright assignment
for the change (this is a non-trivial change).

[Bug tree-optimization/92252] [10 Regression] ICE: Segmentation fault (in vect_stmt_to_vectorize)

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

--- Comment #3 from Richard Biener  ---
Author: rguenth
Date: Mon Oct 28 13:43:49 2019
New Revision: 277517

URL: https://gcc.gnu.org/viewcvs?rev=277517=gcc=rev
Log:
2019-10-28  Richard Biener  

PR tree-optimization/92252
* tree-vect-slp.c (vect_get_and_check_slp_defs): Adjust
STMT_VINFO_REDUC_IDX when swapping operands.

* gcc.dg/torture/pr92252.c: New testcase.

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

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

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

--- Comment #3 from Richard Biener  ---
Fixed, but leaving open for a possibly new testcase.

[Bug tree-optimization/92252] [10 Regression] ICE: Segmentation fault (in vect_stmt_to_vectorize)

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

Richard Biener  changed:

   What|Removed |Added

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

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

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

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

--- Comment #5 from Richard Biener  ---
Author: rguenth
Date: Mon Oct 28 13:42:03 2019
New Revision: 277516

URL: https://gcc.gnu.org/viewcvs?rev=277516=gcc=rev
Log:
2019-10-28  Richard Biener  

PR tree-optimization/92241
* tree-vect-loop.c (vect_fixup_scalar_cycles_with_patterns): When
we failed to update the reduction index do not use the pattern
stmts for the reduction chain.
(vectorizable_reduction): When the reduction chain is corrupt,
fail.
* tree-vect-patterns.c (vect_mark_pattern_stmts): Stop when we
fail to update the reduction chain.

* gcc.dg/torture/pr92241.c: New testcase.

Added:
trunk/gcc/testsuite/gcc.dg/torture/pr92241.c
Modified:
trunk/gcc/ChangeLog
trunk/gcc/testsuite/ChangeLog
trunk/gcc/tree-vect-loop.c
trunk/gcc/tree-vect-patterns.c

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

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

Richard Biener  changed:

   What|Removed |Added

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

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

[Bug rtl-optimization/92007] [9/10 Regression] ICE: verify_flow_info failed (error: EH edge crosses section boundary in bb 7)

2019-10-28 Thread iii at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92007

--- Comment #18 from iii at gcc dot gnu.org ---
Author: iii
Date: Mon Oct 28 13:09:54 2019
New Revision: 277515

URL: https://gcc.gnu.org/viewcvs?rev=277515=gcc=rev
Log:
Move jump threading before reload

r266734 has introduced a new instance of jump threading pass in order to
take advantage of opportunities that combine opens up.  It was perceived
back then that it was beneficial to delay it after reload, since that
might produce even more such opportunities.

Unfortunately jump threading interferes with hot/cold partitioning.  In
the code from PR92007, it converts the following

  +-- 2/HOT +
  | |
  v v
3/HOT --> 5/HOT --> 8/HOT --> 11/COLD --> 6/HOT --EH--> 16/HOT
|   ^
|   |
+---+

into the following:

  +-- 2/HOT --+
  |   |
  v   v
3/HOT --> 8/HOT --> 11/COLD --> 6/COLD --EH--> 16/HOT

This makes hot bb 6 dominated by cold bb 11, and because of this
fixup_partitions makes bb 6 cold as well, which in turn makes EH edge
6->16 a crossing one.  Not only can't we have crossing EH edges, we are
also not allowed to introduce new crossing edges after reload in
general, since it might require extra registers on some targets.

Therefore, move the jump threading pass between combine and hot/cold
partitioning.  Building SPEC 2006 and SPEC 2017 with the old and the new
code indicates that:

* When doing jump threading right after reload, 3889 edges are threaded.
* When doing jump threading right after combine, 3918 edges are
  threaded.

This means this change will not introduce performance regressions.

gcc/ChangeLog:

2019-10-28  Ilya Leoshkevich  

Backport from mainline
PR rtl-optimization/92007
* cfgcleanup.c (thread_jump): Add an assertion that we don't
call it after reload if hot/cold partitioning has been done.
(class pass_postreload_jump): Rename to
pass_jump_after_combine.
(make_pass_postreload_jump): Rename to
make_pass_jump_after_combine.
* passes.def(pass_postreload_jump): Move before reload, rename
to pass_jump_after_combine.
* tree-pass.h (make_pass_postreload_jump): Rename to
make_pass_jump_after_combine.

gcc/testsuite/ChangeLog:

2019-10-28  Ilya Leoshkevich  

Backport from mainline
PR rtl-optimization/92007
* g++.dg/opt/pr92007.C: New test (from Arseny Solokha).

Added:
branches/gcc-9-branch/gcc/testsuite/g++.dg/opt/pr92007.C
Modified:
branches/gcc-9-branch/gcc/ChangeLog
branches/gcc-9-branch/gcc/cfgcleanup.c
branches/gcc-9-branch/gcc/passes.def
branches/gcc-9-branch/gcc/testsuite/ChangeLog
branches/gcc-9-branch/gcc/tree-pass.h

[Bug ipa/92253] [10 Regression] 25% regression in 465.tonto with LTO

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

Richard Biener  changed:

   What|Removed |Added

   Keywords||missed-optimization,
   ||needs-bisection
 CC||hubicka at gcc dot gnu.org
 Blocks||26163
   Target Milestone|--- |10.0


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/92253] New: [10 Regression] 25% regression in 465.tonto with LTO

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

Bug ID: 92253
   Summary: [10 Regression] 25% regression in 465.tonto with LTO
   Product: gcc
   Version: 10.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: ipa
  Assignee: unassigned at gcc dot gnu.org
  Reporter: rguenth at gcc dot gnu.org
CC: marxin at gcc dot gnu.org
  Target Milestone: ---

Between r277365 (good) and r277433 (bad) czerny observes a big regression for
465.tonto, but only with -flto (-Ofast -march=haswell otherwise).

Suspicious revs include the IPA reference refactoring in r277403.

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

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

Richard Biener  changed:

   What|Removed |Added

 CC||marxin at gcc dot gnu.org

--- Comment #2 from Richard Biener  ---
The testcase will be fixed with the patch for PR92241, still a reduced testcase
would be nice.

[Bug target/92225] ice in gen_smaxv2di3, at config/i386/sse.md:12225

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

Richard Biener  changed:

   What|Removed |Added

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

--- Comment #11 from Richard Biener  ---
Fixed.  Thanks Uros.

[Bug c/92249] ICE in c_parser_gimple_compound_statement w/ GIMPLE testcases

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

Richard Biener  changed:

   What|Removed |Added

   Keywords||error-recovery
 Status|ASSIGNED|NEW
   Assignee|rguenth at gcc dot gnu.org |unassigned at gcc dot 
gnu.org

--- Comment #6 from Richard Biener  ---
ICE in build2 w/o -fgimple remains.

[Bug c/92249] ICE in c_parser_gimple_compound_statement w/ GIMPLE testcases

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

--- Comment #5 from Richard Biener  ---
Author: rguenth
Date: Mon Oct 28 12:25:09 2019
New Revision: 277512

URL: https://gcc.gnu.org/viewcvs?rev=277512=gcc=rev
Log:
2019-10-28  Richard Biener  

PR c/92249
* gimple-parser.c (c_parser_parse_gimple_body): Make
current_bb the entry block initially to easier recover
from errors.
(c_parser_gimple_compound_statement): Adjust.

Modified:
trunk/gcc/c/ChangeLog
trunk/gcc/c/gimple-parser.c

[Bug c++/88165] error: default member initializer for 'A::B::m' required before the end of its enclosing class

2019-10-28 Thread mpolacek at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88165

--- Comment #4 from Marek Polacek  ---
Maybe we need more delayed parsing here.

[Bug sanitizer/92154] new glibc breaks arm bootstrap due to libsanitizer

2019-10-28 Thread tnfchris at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92154

Tamar Christina  changed:

   What|Removed |Added

 Status|UNCONFIRMED |ASSIGNED
   Last reconfirmed||2019-10-28
 Ever confirmed|0   |1

--- Comment #3 from Tamar Christina  ---
Fixed on trunk. Should I backport the patch?

[Bug c++/88165] error: default member initializer for 'A::B::m' required before the end of its enclosing class

2019-10-28 Thread mpolacek at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88165

Marek Polacek  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2019-10-28
 CC||mpolacek at gcc dot gnu.org
 Ever confirmed|0   |1

--- Comment #3 from Marek Polacek  ---
As of now, this code is still rejected.

[Bug c++/88165] error: default member initializer for 'A::B::m' required before the end of its enclosing class

2019-10-28 Thread lutztonineubert at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88165

Toni Neubert  changed:

   What|Removed |Added

 CC||lutztonineubert at gmail dot 
com

--- Comment #2 from Toni Neubert  ---
Any update on this?

[Bug target/92225] ice in gen_smaxv2di3, at config/i386/sse.md:12225

2019-10-28 Thread uros at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92225

--- Comment #10 from uros at gcc dot gnu.org ---
Author: uros
Date: Mon Oct 28 11:29:43 2019
New Revision: 277510

URL: https://gcc.gnu.org/viewcvs?rev=277510=gcc=rev
Log:
PR target/92225
* config/i386/sse.md (REDUC_SSE_SMINMAX_MODE): Use TARGET_SSE4_2
condition for V2DImode.

testsuite/ChangeLog:

PR target/92225
* gcc.target/i386/pr92225.c: New test.


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

[Bug target/77882] [Aarch64] Add 'naked' function attribute

2019-10-28 Thread e2lahav at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77882

Elad Lahav  changed:

   What|Removed |Added

 CC||e2lahav at gmail dot com

--- Comment #4 from Elad Lahav  ---
Created attachment 47119
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=47119=edit
Proposed implementation of naked functions for aarch64

The change is quite simple (see the proposed patch). I hope it can be made, as
I find naked functions quite useful, especially by allowing the use of certain
C features in otherwise pure assembly code (e.g., offsetof, _Static_assert).
Aesthetically, naked functions provide proper prototypes that are easier to
follow, document and test.

[Bug middle-end/92250] valgrind: ira_traverse_loop_tree – Conditional jump or move depends on uninitialised value

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

Richard Biener  changed:

   What|Removed |Added

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

--- Comment #2 from Richard Biener  ---
.

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

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

Richard Biener  changed:

   What|Removed |Added

   Target Milestone|--- |10.0

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

2019-10-28 Thread dimhen at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92251

Dmitry G. Dyachenko  changed:

   What|Removed |Added

 CC||dimhen at gmail dot com

--- Comment #1 from Dmitry G. Dyachenko  ---
PR92242 dup?

[Bug target/92225] ice in gen_smaxv2di3, at config/i386/sse.md:12225

2019-10-28 Thread ubizjak at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92225

--- Comment #9 from Uroš Bizjak  ---
(In reply to rguent...@suse.de from comment #8)

> Will you do the fix?

I have it in testing.

[Bug tree-optimization/92252] [10 Regression] ICE: Segmentation fault (in vect_stmt_to_vectorize)

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

Richard Biener  changed:

   What|Removed |Added

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

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

[Bug target/92225] ice in gen_smaxv2di3, at config/i386/sse.md:12225

2019-10-28 Thread rguenther at suse dot de
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92225

--- Comment #8 from rguenther at suse dot de  ---
On Fri, 25 Oct 2019, ubizjak at gmail dot com wrote:

> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92225
> 
> --- Comment #7 from Uroš Bizjak  ---
> (In reply to Uroš Bizjak from comment #6)
> > This. V2DImode of REDUC_SSE_SMINMAX_MODE should be conditional on
> > TARGET_SSE4_2.
> 
> --cut here--
> diff --git a/gcc/config/i386/sse.md b/gcc/config/i386/sse.md
> index 403e91d4b176..245cb522321c 100644
> --- a/gcc/config/i386/sse.md
> +++ b/gcc/config/i386/sse.md
> @@ -2771,7 +2771,7 @@
>  ;; Modes handled by reduc_sm{in,ax}* patterns.
>  (define_mode_iterator REDUC_SSE_SMINMAX_MODE
>[(V4SF "TARGET_SSE") (V2DF "TARGET_SSE")
> -   (V2DI "TARGET_SSE") (V4SI "TARGET_SSE") (V8HI "TARGET_SSE")
> +   (V2DI "TARGET_SSE4_2") (V4SI "TARGET_SSE") (V8HI "TARGET_SSE")
> (V16QI "TARGET_SSE")])
> 
>  (define_expand "reduc__scal_"
> --cut here--

Will you do the fix?

[Bug c/92249] ICE in c_parser_gimple_compound_statement w/ GIMPLE testcases

2019-10-28 Thread rguenther at suse dot de
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92249

--- Comment #4 from rguenther at suse dot de  ---
On Mon, 28 Oct 2019, asolokha at gmx dot com wrote:

> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92249
> 
> --- Comment #3 from Arseny Solokha  ---
> OK, I'll finally blacklist all GIMPLE testcases altogether as I already do w/
> RTL ones.
> 
> It didn't seem right to me that some GIMPLE testcases yield ICE when compiled
> w/ -fno-gimple, but if that's by design, OK then...

It's true that this ice-on-invalid (with error-recovery) is bad.  The

  if (code == POINTER_PLUS_EXPR && arg0 && arg1 && tt)
gcc_assert (POINTER_TYPE_P (tt) && POINTER_TYPE_P (TREE_TYPE (arg0))
&& ptrofftype_p (TREE_TYPE (arg1)));

assert likely doens't like ERROR_MARK ops (OTOH the FE might want to
elide building of expressions with ERROR_MARK).

I'll leave the PR open for this part after committing the GIMPLE FE
fix.

So yes - GIMPLE testcases shouldn't ICE with -fno-gimple.

[Bug tree-optimization/85947] gcc.dg/vect/bb-slp-div-1.c XPASSes

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

Richard Biener  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |FIXED

--- Comment #7 from Richard Biener  ---
We used to vectorize only the store on SPARC but now we probably fail to do
that because we now reliably detect that patterns are in use and refuse
to do the scalar build.  This might improve if we can relax the restriction
for pattern roots again.

Let's just close this as fixed.

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

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

Richard Biener  changed:

   What|Removed |Added

 CC||rsandifo at gcc dot gnu.org

--- Comment #3 from Richard Biener  ---
So in this case pattern recog destroyed an earlier discovered reduction chain.
From

  # a_lsm.10_28 = PHI 
  _23 = c[b.5_13];
  _24 = _23 != 0;
  _25 = (int) _24;
  _27 = _25 & a_lsm.10_28;
  _35 = b.5_13 + 1;
  _36 = c[_35];
  _37 = _36 != 0;
  _38 = (int) _37;
  _40 = _27 & _38;

we go to

  _23 = c[b.5_13];
  _24 = _23 != 0;
  patt_51 = _24 ? 1 : 0;
  patt_49 = (int) patt_51;   // _25
  patt_48 = (unsigned char) a_lsm.10_28;
  patt_47 = patt_51 & patt_48;
  patt_46 = (int) patt_47;   // _27
  _35 = b.5_13 + 1;
  _36 = c[_35];
  _37 = _36 != 0;
  patt_45 = _37 ? 1 : 0;
  patt_44 = (int) patt_45;  // _38
  patt_43 = patt_47 & patt_45;
  patt_42 = (int) patt_43;  // _40

on the last replacing _40 we fail to identify where the link to the original
_27 continues since we've elided some conversions in the pattern chain.  The
reduction now looks like

  # a_lsm.10_28 = PHI 
  _23 = c[b.5_13];
  _24 = _23 != 0;
  patt_51 = _24 ? 1 : 0;
  patt_48 = (unsigned char) a_lsm.10_28;
  patt_47 = patt_51 & patt_48;
  _35 = b.5_13 + 1;
  _36 = c[_35];
  _37 = _36 != 0;
  patt_45 = _37 ? 1 : 0;
  patt_43 = patt_47 & patt_45;
  patt_42 = (int) patt_43;  // _40

which isn't a reduction chain anymore (nor a handled reduction).

Since patterns are not first-class citizens it's not as easly as re-running
reduction analysis to rediscover the cycle.  What we can of course do is
whenever we fail to update STMT_VINFO_REDUC_IDX, try to scrap the reduction
somehow in pattern analysis, or alternatively, when vectorizable_reduction
cannot verify the reduction path, fail reduction vectorization
(I've put in place the assert in pattern recog and reduction vectorization
to see cases we run into such issue).  When we transfer
reduction chain meta to the pattern stmts in
vect_fixup_scalar_cycles_with_patterns that should already handle this case
(but might need to additionally see if the reduc-idx wasn't set).

Testing such a patch.

[Bug rtl-optimization/92007] [9/10 Regression] ICE: verify_flow_info failed (error: EH edge crosses section boundary in bb 7)

2019-10-28 Thread iii at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92007

--- Comment #17 from iii at gcc dot gnu.org ---
Author: iii
Date: Mon Oct 28 10:04:31 2019
New Revision: 277507

URL: https://gcc.gnu.org/viewcvs?rev=277507=gcc=rev
Log:
Move jump threading before reload

r266734 has introduced a new instance of jump threading pass in order to
take advantage of opportunities that combine opens up.  It was perceived
back then that it was beneficial to delay it after reload, since that
might produce even more such opportunities.

Unfortunately jump threading interferes with hot/cold partitioning.  In
the code from PR92007, it converts the following

  +-- 2/HOT +
  | |
  v v
3/HOT --> 5/HOT --> 8/HOT --> 11/COLD --> 6/HOT --EH--> 16/HOT
|   ^
|   |
+---+

into the following:

  +-- 2/HOT --+
  |   |
  v   v
3/HOT --> 8/HOT --> 11/COLD --> 6/COLD --EH--> 16/HOT

This makes hot bb 6 dominated by cold bb 11, and because of this
fixup_partitions makes bb 6 cold as well, which in turn makes EH edge
6->16 a crossing one.  Not only can't we have crossing EH edges, we are
also not allowed to introduce new crossing edges after reload in
general, since it might require extra registers on some targets.

Therefore, move the jump threading pass between combine and hot/cold
partitioning.  Building SPEC 2006 and SPEC 2017 with the old and the new
code indicates that:

* When doing jump threading right after reload, 3889 edges are threaded.
* When doing jump threading right after combine, 3918 edges are
  threaded.

This means this change will not introduce performance regressions.

gcc/ChangeLog:

2019-10-28  Ilya Leoshkevich  

PR rtl-optimization/92007
* cfgcleanup.c (thread_jump): Add an assertion that we don't
call it after reload if hot/cold partitioning has been done.
(class pass_postreload_jump): Rename to
pass_jump_after_combine.
(make_pass_postreload_jump): Rename to
make_pass_jump_after_combine.
* passes.def(pass_postreload_jump): Move before reload, rename
to pass_jump_after_combine.
* tree-pass.h (make_pass_postreload_jump): Rename to
make_pass_jump_after_combine.

gcc/testsuite/ChangeLog:

2019-10-28  Ilya Leoshkevich  

PR rtl-optimization/92007
* g++.dg/opt/pr92007.C: New test (from Arseny Solokha).

Added:
trunk/gcc/testsuite/g++.dg/opt/pr92007.C
Modified:
trunk/gcc/ChangeLog
trunk/gcc/cfgcleanup.c
trunk/gcc/passes.def
trunk/gcc/testsuite/ChangeLog
trunk/gcc/tree-pass.h

[Bug tree-optimization/92252] New: [10 Regression] ICE: Segmentation fault (in vect_stmt_to_vectorize)

2019-10-28 Thread asolokha at gmx dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92252

Bug ID: 92252
   Summary: [10 Regression] ICE: Segmentation fault (in
vect_stmt_to_vectorize)
   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: asolokha at gmx dot com
  Target Milestone: ---

gcc-10.0.0-alpha20191027 snapshot (r277495) ICEs when compiling the following
testcase w/ -O3:

long int ar;
int dt;

long int
pc (unsigned long int q3, int zw)
{
  long int em = 0;

  while (zw < 1)
{
  q3 = zw * 2ul;
  if (q3 != 0)
for (ar = 0; ar < 2; ++ar)
  em = dt;

  ++zw;
}

  return em;
}

% gcc-10.0.0-alpha20191027 -O3 -c fjubgloo.c
during GIMPLE pass: vect
fjubgloo.c: In function 'pc':
fjubgloo.c:5:1: internal compiler error: Segmentation fault
5 | pc (unsigned long int q3, int zw)
  | ^~
0xc71516 crash_signal
   
/var/tmp/portage/sys-devel/gcc-10.0.0_alpha20191027/work/gcc-10-20191027/gcc/toplev.c:326
0xe84700 vect_stmt_to_vectorize(_stmt_vec_info*)
   
/var/tmp/portage/sys-devel/gcc-10.0.0_alpha20191027/work/gcc-10-20191027/gcc/tree-vectorizer.h:1258
0xe84700 vectorizable_reduction(_stmt_vec_info*, _slp_tree*, _slp_instance*,
vec*)
   
/var/tmp/portage/sys-devel/gcc-10.0.0_alpha20191027/work/gcc-10-20191027/gcc/tree-vect-loop.c:5729
0xe8bed9 vect_analyze_loop_operations
   
/var/tmp/portage/sys-devel/gcc-10.0.0_alpha20191027/work/gcc-10-20191027/gcc/tree-vect-loop.c:1560
0xe8bed9 vect_analyze_loop_2
   
/var/tmp/portage/sys-devel/gcc-10.0.0_alpha20191027/work/gcc-10-20191027/gcc/tree-vect-loop.c:2079
0xe8bed9 vect_analyze_loop(loop*, _loop_vec_info*, vec_info_shared*)
   
/var/tmp/portage/sys-devel/gcc-10.0.0_alpha20191027/work/gcc-10-20191027/gcc/tree-vect-loop.c:2367
0xea47d4 try_vectorize_loop_1
   
/var/tmp/portage/sys-devel/gcc-10.0.0_alpha20191027/work/gcc-10-20191027/gcc/tree-vectorizer.c:886
0xea55f4 vectorize_loops()
   
/var/tmp/portage/sys-devel/gcc-10.0.0_alpha20191027/work/gcc-10-20191027/gcc/tree-vectorizer.c:1114

[Bug libstdc++/92224] Set: Can't be created a set with const template parameter

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

--- Comment #4 from Jonathan Wakely  ---
It's undefined, so the implementation is not required to give an error. To
quote the standard:

Undefined behavior may be expected when this document omits any explicit
definition of behavior or when a program uses an erroneous construct or
erroneous data. Permissible undefined behavior ranges from ignoring the
situation completely with unpredictable results, to behaving during translation
or program execution in a documented manner characteristic of the environment
(with or without the issuance of a diagnostic message), to terminating a
translation or execution (with the issuance of a diagnostic message).

[Bug target/70010] powerpc: -flto forgets 'no-vsx' function attributes

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

--- Comment #9 from Jiu Fu Guo  ---
Author: guojiufu
Date: Mon Oct 28 09:46:15 2019
New Revision: 277506

URL: https://gcc.gnu.org/viewcvs?rev=277506=gcc=rev
Log:
[rs6000] PR70010, avoid no-vsx function to be inlined to vsx function

In PR70010, a function is marked with target(no-vsx) to disable VSX code
generation.  To avoid VSX code generation, this function should not be
inlined into VSX function.  To fix the bug, in the current logic when
checking whether the caller's ISA flags supports the callee's ISA flags, we
just need to add a test that enforces that the caller's ISA flags match
exactly the callee's flags, for those flags that were explicitly set in the
callee.  If caller without target attribute then using options from command
line.

Jiufu
BR


gcc/
2019-10-16  Peter Bergner 
Jiufu Guo  

PR target/70010
* config/rs6000/rs6000.c (rs6000_can_inline_p): Prohibit inlining if
the callee explicitly disables some isa_flags the caller is using.

gcc.testsuite/
2019-10-16  Peter Bergner 
Jiufu Guo  

PR target/70010
* gcc.target/powerpc/pr70010.c: New test.
* gcc.target/powerpc/pr70010-1.c: New test.
* gcc.target/powerpc/pr70010-2.c: New test.
* gcc.target/powerpc/pr70010-3.c: New test.
* gcc.target/powerpc/pr70010-4.c: New test.



Added:
branches/gcc-9-branch/gcc/testsuite/gcc.target/powerpc/pr70010-1.c
branches/gcc-9-branch/gcc/testsuite/gcc.target/powerpc/pr70010-2.c
branches/gcc-9-branch/gcc/testsuite/gcc.target/powerpc/pr70010-3.c
branches/gcc-9-branch/gcc/testsuite/gcc.target/powerpc/pr70010-4.c
branches/gcc-9-branch/gcc/testsuite/gcc.target/powerpc/pr70010.c
Modified:
branches/gcc-9-branch/gcc/ChangeLog
branches/gcc-9-branch/gcc/config/rs6000/rs6000.c
branches/gcc-9-branch/gcc/testsuite/ChangeLog

[Bug fortran/92189] Fortran-written bind(C) function with allocatable argument does not update C descriptor on exit

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

--- Comment #1 from Tobias Burnus  ---
The attached test case is gcc/testsuite/gfortran.dg/bind-c-intent-out.f90 which
is part of the committed to fix PR 91863.

Due to this PR, the committed test case uses 'dg-do compile' instead of 'dg-do
run'.

[Bug fortran/91863] [9/10 Regression] ICE in wide_int_to_tree_1, at tree.c:156

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

Tobias Burnus  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 CC||burnus at gcc dot gnu.org
 Resolution|--- |FIXED

--- Comment #4 from Tobias Burnus  ---
FIXED in GCC 9 + 10.

Thanks for the report!

When fixing this issue, I found another issue – if the bind(C) function is
written in Fortran. That's tracked in PR fortran/92189.

[Bug fortran/91863] [9/10 Regression] ICE in wide_int_to_tree_1, at tree.c:156

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

--- Comment #3 from Tobias Burnus  ---
Author: burnus
Date: Mon Oct 28 09:36:27 2019
New Revision: 277505

URL: https://gcc.gnu.org/viewcvs?rev=277505=gcc=rev
Log:
Fortran] PR91863 - fix call to bind(C) with array descriptor

Backport from mainline
2019-10-28  Tobias Burnus  

PR fortran/91863
* trans-expr.c (gfc_conv_gfc_desc_to_cfi_desc): Don't free data
memory as that's done on the Fortran side.
(gfc_conv_procedure_call): Handle void* pointers from
gfc_conv_gfc_desc_to_cfi_desc.

Backport from mainline
2019-10-28  Tobias Burnus  

PR fortran/91863
* gfortran.dg/bind-c-intent-out.f90: New.


Added:
branches/gcc-9-branch/gcc/testsuite/gfortran.dg/bind-c-intent-out.f90
Modified:
branches/gcc-9-branch/gcc/fortran/ChangeLog
branches/gcc-9-branch/gcc/fortran/trans-expr.c
branches/gcc-9-branch/gcc/testsuite/ChangeLog

[Bug middle-end/92250] valgrind: ira_traverse_loop_tree – Conditional jump or move depends on uninitialised value

2019-10-28 Thread amonakov at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92250

Alexander Monakov  changed:

   What|Removed |Added

 CC||amonakov at gcc dot gnu.org

--- Comment #1 from Alexander Monakov  ---
Be sure to enable Valgrind annotations (configure with
--enable-valgrind-annotations), otherwise false positives on sparseset
functions are expected: sparse set algorithm accesses uninitialized memory by
design (an explanation is available at e.g. https://research.swtch.com/sparse
).

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

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

Bug ID: 92251
   Summary: [10 regression] SEGV in ipa_get_cs_argument_count
   Product: gcc
   Version: 10.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: ipa
  Assignee: unassigned at gcc dot gnu.org
  Reporter: ro at gcc dot gnu.org
CC: hubicka at gcc dot gnu.org, marxin at gcc dot gnu.org
  Target Milestone: ---
Target: i?86-*-*, sparc-*-*, ia64-*-*, powerpc64le-*-*,
s390x-*-*,  x86_64-*-*

Between 20191026 (r277475) and 20191027 (r277487), a Go test regressed
(I'm seeing it on both 32 and 64-bit Solaris/SPARC and x86, with several more
reports on Linux/x86_64 and several others):

+FAIL: go.test/test/fixedbugs/bug407.dir/one.go  -O (internal compiler error)
+FAIL: go.test/test/fixedbugs/bug407.dir/one.go  -O (test for excess errors)

Excess errors:
during IPA pass: inline
go1: internal compiler error: Segmentation Fault
0x90d91fc crash_signal
/vol/gcc/src/hg/trunk/local/gcc/toplev.c:326
0x8ebf100 ipa_get_cs_argument_count
/vol/gcc/src/hg/trunk/local/gcc/ipa-prop.h:598
0x8ebf100 ipa_merge_fn_summary_after_inlining(cgraph_edge*)
/vol/gcc/src/hg/trunk/local/gcc/ipa-fnsummary.c:3318
0x99d3ce1 inline_call(cgraph_edge*, bool, vec*,
int*, bool, bool*)
/vol/gcc/src/hg/trunk/local/gcc/ipa-inline-transform.c:484
0x99c8da3 inline_to_all_callers_1
/vol/gcc/src/hg/trunk/local/gcc/ipa-inline.c:2338
0x99c8da3 inline_to_all_callers
/vol/gcc/src/hg/trunk/local/gcc/ipa-inline.c:2363
0x99cb4e1 cgraph_node::call_for_symbol_and_aliases(bool (*)(cgraph_node*,
void*), void*, bool)
/vol/gcc/src/hg/trunk/local/gcc/cgraph.h:3319
0x99cb4e1 ipa_inline
/vol/gcc/src/hg/trunk/local/gcc/ipa-inline.c:2684
0x99cb4e1 execute
/vol/gcc/src/hg/trunk/local/gcc/ipa-inline.c:3023

+FAIL: go.test/test/fixedbugs/bug407.dir/two.go  -O (test for excess errors)

Excess errors:
/vol/gcc/src/hg/trunk/local/gcc/testsuite/go.test/test/fixedbugs/bug407.dir/two.go:10:13:
error: import file './one' not found
/vol/gcc/src/hg/trunk/local/gcc/testsuite/go.test/test/fixedbugs/bug407.dir/two.go:13:11:
error: expected package

This is almost certainly due to one of the IPA patches in that range.

[Bug c/92249] ICE in c_parser_gimple_compound_statement w/ GIMPLE testcases

2019-10-28 Thread asolokha at gmx dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92249

--- Comment #3 from Arseny Solokha  ---
OK, I'll finally blacklist all GIMPLE testcases altogether as I already do w/
RTL ones.

It didn't seem right to me that some GIMPLE testcases yield ICE when compiled
w/ -fno-gimple, but if that's by design, OK then...

[Bug tree-optimization/85947] gcc.dg/vect/bb-slp-div-1.c XPASSes

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

Rainer Orth  changed:

   What|Removed |Added

 CC||rguenth at gcc dot gnu.org

--- Comment #6 from Rainer Orth  ---
Between 20191025 (r277438) and 20191026 (r277475), the XPASS went away.
Most likely due to one of Richard's SLP pathes in that range.

[Bug middle-end/92250] New: valgrind: ira_traverse_loop_tree – Conditional jump or move depends on uninitialised value

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

Bug ID: 92250
   Summary: valgrind: ira_traverse_loop_tree – Conditional jump or
move depends on uninitialised value
   Product: gcc
   Version: 10.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: middle-end
  Assignee: unassigned at gcc dot gnu.org
  Reporter: burnus at gcc dot gnu.org
  Target Milestone: ---

When looking at PR 92191.

If I compile the example there (attachment 47091) using valgrind as wrapper, I
get

valgrind …/gcc-trunk/lib/gcc/x86_64-pc-linux-gnu/10.0.0/f951 fosyan.f
…
Analyzing compilation unit

Performing interprocedural optimizations
 <*free_lang_data>   
  Streaming LTO
 
Assembling functions:
   fosyan

==111983== Conditional jump or move depends on uninitialised value(s)
==111983==at 0xC91BC8: sparseset_bit_p (sparseset.h:147)
==111983==by 0xC91BC8: mark_pseudo_regno_live(int) (ira-lives.c:326)
==111983==by 0xC93638: process_bb_node_lives(ira_loop_tree_node*)
(ira-lives.c:1377)
==111983==by 0xC76D31: ira_traverse_loop_tree(bool, ira_loop_tree_node*,
void (*)(ira_loop_tree_node*), void (*)(ira_loop_tree_node*))
(ira-build.c:1804)
==111983==by 0xC93F31: ira_create_allocno_live_ranges() (ira-lives.c:1677)
==111983==by 0xC786CC: ira_build() (ira-build.c:3435)
==111983==by 0xC6F5E5: ira (ira.c:5341)
==111983==by 0xC6F5E5: (anonymous namespace)::pass_ira::execute(function*)
(ira.c:5654)
==111983==by 0xD63BA9: execute_one_pass(opt_pass*) (passes.c:2494)
==111983==by 0xD642FF: execute_pass_list_1(opt_pass*) (passes.c:2580)
==111983==by 0xD64311: execute_pass_list_1(opt_pass*) (passes.c:2581)

(and 55 more nearly identical lines, all 'at … sparseset_bit_p
(sparseset.h:147)')

  1   2   >