[Bug tree-optimization/89570] [9 Regression] ICE in prepare_cmp_insn, at optabs.c:4001

2019-03-04 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89570

Jakub Jelinek  changed:

   What|Removed |Added

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

--- Comment #4 from Jakub Jelinek  ---
Created attachment 45880
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=45880&action=edit
gcc9-pr89570.patch

Untested fix.  No way to test on aarch64 with SVE though (nor experience with
that in cross-testing).

[Bug libstdc++/88322] Implement C++20 library features.

2019-03-04 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88322
Bug 88322 depends on bug 88340, which changed state.

Bug 88340 Summary: Implement P0019R8, C++20 std::atomic_ref.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88340

   What|Removed |Added

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

[Bug libstdc++/88340] Implement P0019R8, C++20 std::atomic_ref.

2019-03-04 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88340

Jonathan Wakely  changed:

   What|Removed |Added

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

--- Comment #1 from Jonathan Wakely  ---
.

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

[Bug libstdc++/88305] Implement P0019R8, C++20 std::atomic_ref

2019-03-04 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88305

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

[Bug c++/88334] Implement P0482R6, C++20 char8_t.

2019-03-04 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88334

Jonathan Wakely  changed:

   What|Removed |Added

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

--- Comment #4 from Jonathan Wakely  ---
This is done now.

[Bug c++/88323] implement C++20 language features.

2019-03-04 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88323
Bug 88323 depends on bug 88334, which changed state.

Bug 88334 Summary: Implement P0482R6, C++20 char8_t.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88334

   What|Removed |Added

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

[Bug libstdc++/88322] Implement C++20 library features.

2019-03-04 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88322
Bug 88322 depends on bug 88334, which changed state.

Bug 88334 Summary: Implement P0482R6, C++20 char8_t.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88334

   What|Removed |Added

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

[Bug sanitizer/86899] [8/9 regression] TSAN incorrect warning: control reaches end of non-void function

2019-03-04 Thread Predelnik at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86899

Sergey Semushin  changed:

   What|Removed |Added

 CC||Predelnik at gmail dot com

--- Comment #5 from Sergey Semushin  ---
Had the same issue where the only dead code was leftover break in a switch case
after return. Reasons are probably exactly the same but maybe in this form this
issue will arise more often.

[Bug rtl-optimization/14504] Missed Bit Twiddling Optimization

2019-03-04 Thread steven at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=14504

Steven Bosscher  changed:

   What|Removed |Added

   Last reconfirmed|2009-04-22 23:02:33 |2019-3-4

--- Comment #9 from Steven Bosscher  ---
// -O3 -m32 -fomit-frame-pointer
unsigned long cond_mask_1(bool flag, unsigned long mask, unsigned long target)
{
return flag ? target | mask : target & ~mask;
}

unsigned long cond_mask_2(bool flag, unsigned long mask, unsigned long target)
{
return (mask | target ^ 0xUL + flag) ^ 0xUL + flag;
}


GCC trunk:
cond_mask_1(bool, unsigned long, unsigned long):
movl12(%esp), %eax
movl8(%esp), %edx
movl%eax, %ecx
orl %edx, %ecx
notl%edx
andl%eax, %edx
cmpb$0, 4(%esp)
movl%ecx, %eax
cmove   %edx, %eax
ret
cond_mask_2(bool, unsigned long, unsigned long):
movzbl  4(%esp), %eax
leal-1(%eax), %edx
movl12(%esp), %eax
xorl%edx, %eax
orl 8(%esp), %eax
xorl%edx, %eax
ret

[Bug target/89570] [9 Regression] ICE in prepare_cmp_insn, at optabs.c:4001

2019-03-04 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89570

--- Comment #3 from Jakub Jelinek  ---
At the minimum guarding those simplifications with something like
expand_vec_cmp_expr_p test for @0 if we can figure out mask type somehow (what
would IFN_COND_* need), and a check whether IFN_COND_* is supported at all.

[Bug c++/71425] GCC does not implement C++/WG21 DR 1399/1388

2019-03-04 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71425

Jonathan Wakely  changed:

   What|Removed |Added

   Keywords||accepts-invalid
 Status|UNCONFIRMED |NEW
   Last reconfirmed||2019-03-04
 Ever confirmed|0   |1

[Bug c++/87603] [C++17] noexcept isn't special cased for constant expressions anymore

2019-03-04 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87603

Jonathan Wakely  changed:

   What|Removed |Added

 CC||barry.revzin at gmail dot com

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

[Bug c++/89568] constexpr functions are implicitly noexcept

2019-03-04 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89568

Jonathan Wakely  changed:

   What|Removed |Added

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

--- Comment #1 from Jonathan Wakely  ---
Actually in C++11 and C++14 they are required to be noexcept. That changed for
C++17. See PR 87603 for more info.

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

[Bug target/89570] [9 Regression] ICE in prepare_cmp_insn, at optabs.c:4001

2019-03-04 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89570

--- Comment #2 from Jakub Jelinek  ---
Or perhaps as an alternative, we shouldn't use the match.pd code here to tweak
the conditions of VEC_COND_EXPRs exactly because the conditions themselves
might be valid solely in VEC_COND_EXPR's first argument and not as standalone
stmt, and just use some C helper from the match.pd rule or something to deal
with that instead.

[Bug target/89570] [9 Regression] ICE in prepare_cmp_insn, at optabs.c:4001

2019-03-04 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89570

Jakub Jelinek  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2019-03-04
 CC||jakub at gcc dot gnu.org,
   ||rguenth at gcc dot gnu.org,
   ||rsandifo at gcc dot gnu.org
 Ever confirmed|0   |1

--- Comment #1 from Jakub Jelinek  ---
-fno-tree-dce considered harmful (as in many cases).
Seems in this case match.pd invoked during forwprop4 (after generic vector
lowering) creates statements that don't have hw support.

 (simplify
  (vec_cond @0 @1 (view_convert? (uncond_op@4 @2 @3)))
  (with { tree op_type = TREE_TYPE (@4); }
   (if (element_precision (type) == element_precision (op_type))
(view_convert (cond_op (bit_not @0) @2 @3 (view_convert:op_type @1)))
and are dead.
The dse3 to forwprop4 changes are:
-  vect_iftmp.20_108 = vect__6.19_106 * vect_cst__107;
+  vect_iftmp.20_108 = vect__6.19_106 * { 5.0e-1, 5.0e-1 };
   iftmp.5_28 = _14 * 5.0e-1;
-  vect_iftmp.21_110 = VEC_COND_EXPR ;
+  _34 = vect__4.16_103 == { 0.0, 0.0 };
+  _1 = vect__4.16_103 != { 0.0, 0.0 };
+  vect_iftmp.21_110 = VEC_COND_EXPR ;

No target other than aarch64 has the IFN_COND_* support so far (though I bet
AVX512F could be a good candidate for that), so for the other targets the above
match.pd pattern just creates garbage that with -fno-tree-dce isn't even
removed.
Shouldn't that match.pd simplification be a) restricted to targets that
actually have some IFN_COND_*, so that it doesn't do useless work elsewhere b)
even if it fails, clean up the temporaries it created while processing the
(bit_not @0) if it fails?

Guess this has been introduced with r260710.

[Bug target/44532] x86-64 unnecessary parameter extension

2019-03-04 Thread steven at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=44532

Steven Bosscher  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
   Last reconfirmed|2010-06-14 11:30:39 |2019-3-4
 CC||steven at gcc dot gnu.org
 Resolution|--- |WONTFIX

--- Comment #4 from Steven Bosscher  ---
GCC trunk today:"

f1(short, int):
movswl  %di, %eax
imull   %esi, %eax
ret
f2(unsigned short, int):
movzwl  %di, %eax
imull   %esi, %eax
ret


clang trunk:
f1(short, int):# @f1(short, int)
movl%edi, %eax
imull   %esi, %eax
retq
f2(unsigned short, int):# @f2(unsigned short,
int)
movl%edi, %eax
imull   %esi, %eax
retq


icc 19.0.1:
f1(short, int):
movswq%di, %rax #3.12
imull %esi, %eax#3.16
ret #3.16
f2(unsigned short, int):
movzwl%di, %eax #7.1
imull %esi, %eax#8.16
ret  


Given the comments from H.J. and the icc output, let's WONTFIX this one.

[Bug tree-optimization/19792] Missed optimizations due to signedness in the way

2019-03-04 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=19792

--- Comment #8 from Richard Biener  ---
I think for foo the "solution" is to only consider indices with well-defined
behavior, that is, for size_lookup[] indices in [0,257] which means we
should be safely able to truncate the index to unsigned char (for the
purpose of analysis only!).

Note we're not value-numbering (int) t the same as t but even
size_lookup[(short) t] should result in the same value to be loaded
unless undefined behavior is invoked.

Of course extern unsigned char size_lookup[257]; might be considered
extern unsigned char size_lookup[]; for QOI reasons and existing broken
code, so...  but just change the testcase to non-extern size_lookup.

The solution might ly in value-numbering which could, when value-numbering
the two loads lookup (and insert!) VNs of (shortest-allowed-type)index.
The danger is of course that the shortest-allowed-type might differ
depentent on the shape of the lookup where otherwise we'd compute the
same VN.

I'm quite sure we can't simply trust TYPE_DOMAIN of TREE_TYPE of
TREE_OPERAND (array-ref, 0) when constraining operand 1.

[Bug testsuite/19095] testsuite/gcc.dg/vect/vect.exp is not precise enough on x86

2019-03-04 Thread steven at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=19095

Steven Bosscher  changed:

   What|Removed |Added

   Last reconfirmed|2006-03-05 03:54:36 |2019-3-4

--- Comment #7 from Steven Bosscher  ---
Still an issue, and add avx to the list now.

[Bug rtl-optimization/45026] struct passed as argument in memory compiles to dead stores

2019-03-04 Thread steven at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=45026

Steven Bosscher  changed:

   What|Removed |Added

 Target|ia64-unknown-linux-gnu  |
   Last reconfirmed|2011-02-25 23:15:12 |2019-3-4
  Component|target  |rtl-optimization
Summary|Empty function compiles to  |struct passed as argument
   |many loads and stores   |in memory compiles to dead
   ||stores

--- Comment #2 from Steven Bosscher  ---
Still an issue on ia64, but actually a generic issue (per comment #1).

[Bug tree-optimization/55629] Missed value numbering to a constant

2019-03-04 Thread steven at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=55629

Steven Bosscher  changed:

   What|Removed |Added

   Last reconfirmed|2012-12-09 00:00:00 |2019-3-4

--- Comment #2 from Steven Bosscher  ---
Trunk today with -O2:
foo(int):
cmpl$1, %edi
sbbl%eax, %eax
notl%eax
cmpl$1, %edi
sbbl%edx, %edx
leal6(%rdx,%rax), %eax
ret

and with -O2:
foo(int):
movl$5, %eax
ret

[Bug c/89573] -fexcess-precision=standard doesn't work for conversion to integer of multiplication

2019-03-04 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89573

Richard Biener  changed:

   What|Removed |Added

 CC||jsm28 at gcc dot gnu.org

--- Comment #1 from Richard Biener  ---
The FE correctly builds

<<< Unknown tree: excess_precision_expr
  (long double) __builtin_log (p) * (long double) inv_log_of_base >>>

but then convert_for_assignment seems to elide via convert_to_real_1:

/* Convert (outertype)((innertype0)a+(innertype1)b)
   into ((newtype)a+(newtype)b) where newtype
   is the widest mode from all of these.  */
304 case PLUS_EXPR:
305 case MINUS_EXPR:
306 case MULT_EXPR:
307 case RDIV_EXPR:
308{
309  tree arg0 = strip_float_extensions (TREE_OPERAND (expr,
0));
310  tree arg1 = strip_float_extensions (TREE_OPERAND (expr,
1));

where strip_float_extensions makes the comment not true (because we ignore
the casts to long double).

Maybe the code in convert_and_check

1627  if (TREE_CODE (expr) == EXCESS_PRECISION_EXPR)
1628{
1629  tree orig_type = TREE_TYPE (expr);
1630  expr = TREE_OPERAND (expr, 0);
1631  expr_for_warning = convert (orig_type, expr);
1632  if (orig_type == type)
1633return expr_for_warning;

shouldn't use convert here but convert_to_real_1 with fold_p = false?
But then other code may simply elide the conversions (can we really
ignore the extra rounding performed by the outer truncating conversion, ever?)

[Bug middle-end/56770] Partial sums loop optimization

2019-03-04 Thread steven at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=56770

Steven Bosscher  changed:

   What|Removed |Added

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

[Bug fortran/89574] New: internal compiler error: in conv_function_val, at fortran/trans-expr.c:3792

2019-03-04 Thread dmitrievdv242 at yandex dot ru
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89574

Bug ID: 89574
   Summary: internal compiler error: in conv_function_val, at
fortran/trans-expr.c:3792
   Product: gcc
   Version: 8.1.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: fortran
  Assignee: unassigned at gcc dot gnu.org
  Reporter: dmitrievdv242 at yandex dot ru
  Target Milestone: ---

Created attachment 45879
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=45879&action=edit
A source file to reproduce the bug

The bug occurs when you have a module with some name (lets name it init) and it
uses a module with an aliased subroutine or function with the same name (init)
- see the attached source file. 

-The command command line that triggers the bug (with -v and -save-temps
flags):

gfortran-8 -v -save-temps -o test test.f90

-The the compiler output:

Driving: gfortran-8 -v -save-temps -o test test.f90 -l gfortran -l m
-shared-libgcc
Using built-in specs.
COLLECT_GCC=gfortran-8
COLLECT_LTO_WRAPPER=/usr/lib/gcc/i686-linux-gnu/8/lto-wrapper
Target: i686-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Ubuntu
8.1.0-5ubuntu1~16.04' --with-bugurl=file:///usr/share/doc/gcc-8/README.Bugs
--enable-languages=c,ada,c++,go,brig,d,fortran,objc,obj-c++ --prefix=/usr
--with-gcc-major-version-only --program-suffix=-8
--program-prefix=i686-linux-gnu- --enable-shared --enable-linker-build-id
--libexecdir=/usr/lib --without-included-gettext --enable-threads=posix
--libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu
--enable-libstdcxx-debug --enable-libstdcxx-time=yes
--with-default-libstdcxx-abi=new --enable-gnu-unique-object
--disable-vtable-verify --enable-libmpx --enable-plugin --with-system-zlib
--with-target-system-zlib --enable-objc-gc=auto --enable-targets=all
--enable-multiarch --disable-werror --with-arch-32=i686
--with-multilib-list=m32,m64,mx32 --enable-multilib --with-tune=generic
--enable-checking=release --build=i686-linux-gnu --host=i686-linux-gnu
--target=i686-linux-gnu
Thread model: posix
gcc version 8.1.0 (Ubuntu 8.1.0-5ubuntu1~16.04) 
COLLECT_GCC_OPTIONS='-v' '-save-temps' '-o' 'test' '-shared-libgcc'
'-mtune=generic' '-march=i686'
 /usr/lib/gcc/i686-linux-gnu/8/f951 test.f90 -quiet -dumpbase test.f90
-mtune=generic -march=i686 -auxbase test -version -fintrinsic-modules-path
/usr/lib/gcc/i686-linux-gnu/8/finclude -o test.s
GNU Fortran (Ubuntu 8.1.0-5ubuntu1~16.04) version 8.1.0 (i686-linux-gnu)
compiled by GNU C version 8.1.0, GMP version 6.1.0, MPFR version 3.1.4,
MPC version 1.0.3, isl version isl-0.16.1-GMP

GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
GNU Fortran2008 (Ubuntu 8.1.0-5ubuntu1~16.04) version 8.1.0 (i686-linux-gnu)
compiled by GNU C version 8.1.0, GMP version 6.1.0, MPFR version 3.1.4,
MPC version 1.0.3, isl version isl-0.16.1-GMP

GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
test.f90:23:0:

 call test_init

internal compiler error: in conv_function_val, at fortran/trans-expr.c:3792
Please submit a full bug report,
with preprocessed source if appropriate.
See  for instructions.


The flag -save-temps doesn't produce any *.i files, only one *.s file.

[Bug tree-optimization/19792] Missed optimizations due to signedness in the way

2019-03-04 Thread steven at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=19792

Steven Bosscher  changed:

   What|Removed |Added

   Last reconfirmed|2016-08-06 00:00:00 |2019-3-4
 CC||rguenth at gcc dot gnu.org

--- Comment #7 from Steven Bosscher  ---
Still an issue as of "g++ (Compiler-Explorer-Build) 9.0.1 20190303
(experimental)" on x86-64 at -O2:

_Z3fooj:
movslq  %edi, %rax
movl%edi, %edi
movzbl  size_lookup(%rdi), %edx
cmpb%dl, size_lookup(%rax)
sete%al
movzbl  %al, %eax
ret
_Z3barj:
movl$1, %eax
ret



FWIW "clang version 7.0.0 (tags/RELEASE_700/final 342594)" at -O2:

_Z3fooj:# @_Z3fooj
movslq  %edi, %rax
movbsize_lookup(%rax), %cl
movl%eax, %edx
xorl%eax, %eax
cmpbsize_lookup(%rdx), %cl
sete%al
retq
_Z3barj:# @_Z3barj
movl$1, %eax
retq



and "icc (ICC) 19.0.1.144 20181018":

_Z3fooj:
xorl  %eax, %eax#6.36
movslq%edi, %rdi#6.11
movb  size_lookup(%rdi), %dl#6.11
movl  %edi, %edi#6.36
cmpb  size_lookup(%rdi), %dl#6.36
sete  %al   #6.36
ret #6.36
_Z3barj:
movl  $1, %eax  #13.15
ret

[Bug middle-end/89551] [9 regression] Test case gcc.dg/uninit-pred-8_b.c fails after r269302

2019-03-04 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89551

Richard Biener  changed:

   What|Removed |Added

 CC||law at gcc dot gnu.org

--- Comment #2 from Richard Biener  ---
The difference starts in DOM3 by the CFG cleanup change catching two more BB
merging opportunities which then in VRP2 causes(?) extra jump threadings to
happen (for whatever reason...).

On x86_64 we have different IL (branch-cost, logical-op-non-short-circuit)
so what happens is different.

The IL we hand off to the late uninit pass is not resembling the original
source in any way due to these threadings and the usual inabilities of
the uninit pass pop up.

--param logical-op-non-short-circuit=1 fixes the testcase on powerpc64le,
=0 makes it fail on x86_64.

I'll adjust the testcase, not sure if anybody wants to analyze why
jump threading goes berzerk here.

Note disabling DOM3 fixes the testcase as well - the effect is just
the extra forwarder and then in VRP2:

 Visiting statement:
 _2 = g.0_1 + 1;
- COPY m_19 = m_8(D)
-0>>> COPY m_20 = m_8(D)
+LKUP STMT n_7(D) le_expr 9
+FIND: 0
+LKUP STMT m_8(D) gt_expr 100
+FIND: 0
+  Registering jump thread: (6, 7) incoming edge;  (7, 8) joiner;  (8, 10)
normal; (10, 11) nocopy;
  COPY m_20 = m_8(D)
+LKUP STMT n_7(D) le_expr 9
+FIND: 0
+  Registering jump thread: (6, 7) incoming edge;  (7, 9) joiner;  (9, 11)
normal;

and more similar cases.

[Bug c++/88368] [7/8 Regression] Improper ``use of deleted function''

2019-03-04 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88368

--- Comment #6 from Jakub Jelinek  ---
The above change introduced PR89571.

[Bug c++/89571] [9 Regression] ICE in nothrow_spec_p, at cp/except.c:1238

2019-03-04 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89571

Jakub Jelinek  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2019-03-04
 CC||jakub at gcc dot gnu.org,
   ||jason at gcc dot gnu.org
 Ever confirmed|0   |1

--- Comment #1 from Jakub Jelinek  ---
Started with r269032 aka PR88368 fix.

[Bug tree-optimization/89572] [7/8/9 Regression] ICE in dyn_cast(gimple*) / get_loop_exit_condition(loop const*)

2019-03-04 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89572

Jakub Jelinek  changed:

   What|Removed |Added

 CC||jakub at gcc dot gnu.org
   Target Milestone|--- |7.5
Summary|ICE in dyn_cast(gimple*) /  |dyn_cast(gimple*) /
   |p const*)   |get_loop_exit_condition(loo
   ||p const*)

--- Comment #2 from Jakub Jelinek  ---
Started to ICE with r202185.

[Bug tree-optimization/89566] [9 Regression] ICE on compilable C++ code: in gimple_call_arg, at gimple.h:3166

2019-03-04 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89566

Jakub Jelinek  changed:

   What|Removed |Added

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

--- Comment #2 from Jakub Jelinek  ---
Created attachment 45878
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=45878&action=edit
gcc9-pr89566.patch

Untested fix.

[Bug c/89573] New: -fexcess-precision=standard doesn't work for conversion to integer of multiplication

2019-03-04 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89573

Bug ID: 89573
   Summary: -fexcess-precision=standard doesn't work for
conversion to integer of multiplication
   Product: gcc
   Version: 9.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c
  Assignee: unassigned at gcc dot gnu.org
  Reporter: rguenth at gcc dot gnu.org
  Target Milestone: ---

The following, built with -m32 -march=i586 -fexcess-precision=standard on
x86_64-linux outputs

a: -75345
b: -75346
c: -75346

where the first result is off.  The IL looks like

int r = (int) ((long double) log (p) * (long double) inv_log_of_base);

where possibly the missing cast to (double) is elided by bogus optimization
(didn't try to track down the issue yet).

-ffloat-store makes the testcase work as does any optimization (well, we
then get constant folding).

#include 
#include 

int main(int argc, char **argv)
{
  double p = 0.00053447623258905705;
  double inv_log_of_base = 1.41668185;

  int r = log(p) * inv_log_of_base;
  printf("a: %d\n", r);

  double gr = log(p) * inv_log_of_base;
  printf("b: %g\n", gr);

  double g = log(p);
  int c = g * inv_log_of_base;
  printf("c: %d\n", c);

  return 0;
}

[Bug ipa/89567] [missed-optimization] Should not be initializing unused struct parameter members

2019-03-04 Thread eyalroz at technion dot ac.il
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89567

--- Comment #2 from Eyal Rozenberg  ---
(In reply to Richard Biener from comment #1)
> You are looking for IPA DSE 

I'm not a compiler expert and don't know what this means. Even literally, I
don't know what these acronyms stand for.

> by marshalling through a struct you make GCCs job a lot harder...  

Well, first - yes, I suppose this could make things harder. However, as GCC
does its magic, I presume that at some point the struct abstraction is lost,
and we only have code which passes values to another function in registers, and
one of these values is unused. So at some point along the way this might be
easier than analyzing structs.

> "pro-active" IPA-SRA might help here,

Again, I have no idea what that is... could I trouble you to elaborate just a
bit more?

[Bug tree-optimization/89572] ICE in dyn_cast(gimple*) / get_loop_exit_condition(loop const*)

2019-03-04 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89572

Richard Biener  changed:

   What|Removed |Added

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

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

[Bug target/89570] [9 Regression] ICE in prepare_cmp_insn, at optabs.c:4001

2019-03-04 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89570

Richard Biener  changed:

   What|Removed |Added

   Priority|P3  |P1
  Component|middle-end  |target

[Bug c++/89571] [9 Regression] ICE in nothrow_spec_p, at cp/except.c:1238

2019-03-04 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89571

Richard Biener  changed:

   What|Removed |Added

   Priority|P3  |P4
   Target Milestone|--- |9.0

[Bug ipa/89567] [missed-optimization] Should not be initializing unused struct parameter members

2019-03-04 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89567

Richard Biener  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2019-03-04
 CC||marxin at gcc dot gnu.org,
   ||mjambor at suse dot cz
  Component|tree-optimization   |ipa
 Ever confirmed|0   |1

--- Comment #1 from Richard Biener  ---
You are looking for IPA DSE - by marshalling through a struct you make GCCs
job a lot harder...  "pro-active" IPA-SRA might help here, or making its
analysis stronger by looking for (partial) aggregate argument usage...

Don't hold your breath.

[Bug c++/89561] feature request: undefined behaviour compile-time configuration

2019-03-04 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89561

Richard Biener  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |WONTFIX

--- Comment #5 from Richard Biener  ---
Note that iff GCC could easily see "what you want" and see that some undefined
behavior rule contradicts this then from a QOI perspective GCC already tries
to do what you want.  The difficult thing is to detect what you want (from
inside generic analysis infrastructure).

For example GCC will not misoptimize

int i;

int main() { *(float *)&i = 0.0; return i; }

even if it could (because type-based alias rules make the code undefined)
because it sees the must-alias.

That is, -fundefined-behavior=XYZ is impossible besides making all undefined
behavior implementation-defined (there are many options to individually control
such thing already, like -fwrapv for example).

[Bug bootstrap/89560] [9 regression] ICE In function 'rtx_def* gen_vec_extract_lo_v64qi(rtx, rtx)'

2019-03-04 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89560

Richard Biener  changed:

   What|Removed |Added

 Target||x86_64-*-*, i?86-*-*
   Target Milestone|--- |9.0

[Bug preprocessor/66505] -Wno-error=pedantic does not reverse -Werror -Wpedantic

2019-03-04 Thread marxin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66505

Martin Liška  changed:

   What|Removed |Added

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

--- Comment #3 from Martin Liška  ---
I believe I'll fix it once patch for PR89051 will be merged.

[Bug target/89557] [7/8/9 regression] 4*movq to 2*movaps IPC performance regression on znver1 with -Og

2019-03-04 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89557

Richard Biener  changed:

   What|Removed |Added

 Target||x86_64-*-*, i?86-*-*
 Status|UNCONFIRMED |WAITING
   Keywords||missed-optimization
   Last reconfirmed||2019-03-04
  Component|c++ |target
 Ever confirmed|0   |1
Summary|[7/8 regression] 4*movq to  |[7/8/9 regression] 4*movq
   |2*movaps IPC performance|to 2*movaps IPC performance
   |regression on znver1 with   |regression on znver1 with
   |-Og |-Og
   Target Milestone|--- |7.5

--- Comment #5 from Richard Biener  ---
Please provide a compilable testcase.

[Bug c++/89550] [8/9 Regression] Spurious array-bounds warning when using __PRETTY_FUNCTION__ as a string_view

2019-03-04 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89550

Richard Biener  changed:

   What|Removed |Added

   Priority|P3  |P2
   Target Milestone|--- |8.4

[Bug middle-end/89551] [9 regression] Test case gcc.dg/uninit-pred-8_b.c fails after r269302

2019-03-04 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89551

Richard Biener  changed:

   What|Removed |Added

 Status|UNCONFIRMED |ASSIGNED
   Last reconfirmed||2019-03-04
   Assignee|unassigned at gcc dot gnu.org  |rguenth at gcc dot 
gnu.org
   Target Milestone|--- |9.0
 Ever confirmed|0   |1

--- Comment #1 from Richard Biener  ---
I will have a look.

[Bug c/89549] [7/8/9 Regression] -Wmisleading-indentation is disabled from this point onwards, since column-tracking was disabled due to the size of the code/headers

2019-03-04 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89549

Richard Biener  changed:

   What|Removed |Added

   Priority|P3  |P2
   Target Milestone|--- |7.5

[Bug target/86952] Avoid jump table for switch statement with -mindirect-branch=thunk

2019-03-04 Thread marxin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86952

--- Comment #17 from Martin Liška  ---
> I leave that up to you guys, but I would at min probably implement something
> like s390 folks did for gcc, commit db7a90aa0de5 ("S/390: Disable prediction
> of indirect branches"), see s390_case_values_threshold() which does:

Sure, that's probably the right approach. I would appreciate help with the
benchmark.
Can you please come up with a --param case-values-threshold value that will
show
when a jump table (w/ retpolines) is equally fast as a decision tree
(-fno-jump-tables)?

> 
> +unsigned int
> +s390_case_values_threshold (void)
> +{
> +  /* Disabling branch prediction for indirect jumps makes jump tables
> + much more expensive.  */
> +  if (TARGET_INDIRECT_BRANCH_NOBP_JUMP)
> +return 20;
> +
> +  return default_case_values_threshold ();
> +}
> 
> > For x86 something similar could be done. Anyway, H.J. Lu asked me
> > > to reopen this issue (but seems like I cannot make this change from my
> > > account).
> > 
> > Yep, I would need an account ending with @gcc.org to change a bug.

[Bug c/89549] [7/8/9 Regression] -Wmisleading-indentation is disabled from this point onwards, since column-tracking was disabled due to the size of the code/headers

2019-03-04 Thread marxin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89549

--- Comment #5 from Martin Liška  ---
Unreduced test-case:
https://drive.google.com/file/d/1Fp8OE7frCHNglDQ5CTGyBaQXHkeeD-vZ/view?usp=sharing

[Bug c/89549] [7/8/9 Regression] -Wmisleading-indentation is disabled from this point onwards, since column-tracking was disabled due to the size of the code/headers

2019-03-04 Thread marxin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89549

--- Comment #4 from Martin Liška  ---
Created attachment 45877
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=45877&action=edit
test-case

[Bug rtl-optimization/88652] sel-sched.c:1545:11: runtime error: index 2 out of bounds for type 'long unsigned int [2]'

2019-03-04 Thread marxin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88652

--- Comment #1 from Martin Liška  ---
Any progress on this please?

<    1   2