[Bug target/86798] nds32 port needs updating for CVE-2017-5753

2018-08-02 Thread jasonwucj at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86798

Chung-Ju Wu  changed:

   What|Removed |Added

 Status|UNCONFIRMED |ASSIGNED
   Last reconfirmed||2018-08-03
   Assignee|unassigned at gcc dot gnu.org  |jasonwucj at gcc dot 
gnu.org
 Ever confirmed|0   |1

--- Comment #1 from Chung-Ju Wu  ---
(In reply to Richard Earnshaw from comment #0)
> The nds32 port needs updating for this CVE.  See the linked meta bug for
> details of possible actions required.

Thanks for the reminder.
I will check bug 86772 and then update nds32 port soon. :)

[Bug c/84919] [8/9 Regression] error: passing argument 1 to restrict-qualified parameter aliases with argument 5 [-Werror=restrict]

2018-08-02 Thread egallager at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84919

--- Comment #14 from Eric Gallager  ---
(In reply to Jeffrey A. Law from comment #13)
> I think this needs to defer to gcc-9.

It's gcc-9 now.

[Bug c++/81932] Template arguments of type unsigned generate incorrect debugging information

2018-08-02 Thread egallager at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81932

--- Comment #28 from Eric Gallager  ---
(In reply to Xi Ruoyao from comment #27)
> (In reply to Jonathan Wakely from comment #26)
> > The demangled names are not in a canonical/standardized format, or
> > unambiguous, or portable between different compilers, so that isn't a
> > complete solution.
> 
> Yes.  Could GDB search the symbol with linkage name?

Maybe ask on the gdb lists...

[Bug c/79959] -Wimplicit-fallthrough doesn't recognize some more complex exit cases

2018-08-02 Thread egallager at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79959

--- Comment #3 from Eric Gallager  ---
(In reply to Marek Polacek from comment #2)
> Should be possible to fix this.  Mine.

For gcc 9?

[Bug fortran/86837] New: Optimization breaks an unformatted read with implicit loop on Mac OS X

2018-08-02 Thread tmp147 at neuf dot fr
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86837

Bug ID: 86837
   Summary: Optimization breaks an unformatted read with implicit
loop on Mac OS X
   Product: gcc
   Version: 8.2.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: fortran
  Assignee: unassigned at gcc dot gnu.org
  Reporter: tmp147 at neuf dot fr
  Target Milestone: ---

Created attachment 44497
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=44497=edit
minimal standalone program showing the problem

The attached code compiles and runs fine with -O0, but gives an inappropriate
warning and crashes at least with -O1 and -O2. In close variants, I've also had
no message when compiling, no error at runtime, but no read either.

OS : Mac OS X High Sierra 10.13.6
Version: gfortran 8.2.0 installed by an up-to-date brew
 same problem with gcc@5, gcc@6, gcc@7

The results are ok at least on some linux, tested on
   - CentOS 6.5 / gcc 4.4.7 20120313 (Red Hat 4.4.7-4)
   - Mageia 4   / gcc 4.8.2
   - Mageia 6   / gcc 5.4 (or 5.5, not at work anymore...)


 Run ok
gfortran -O0 -Wall -Wextra -fcheck=all read_loop.f90 -o read_loop &&
./read_loop
  1.
 11. 12.
 21. 22. 23. 24.

 Full array two_d:
  1. 11. 21.
 -9. 12. 22.
 -9. -9. 23.
 -9. -9. 24.


 Run ko (only changed -O0 to -O1)
gfortran -O1 -Wall -Wextra -fcheck=all read_loop.f90 -o read_loop &&
./read_loop
read_loop.f90:40:0:

 read(10) ((two_d(i,j), i=1,nvalues(j)), j=1,3)

Warning: 'j' may be used uninitialized in this function [-Wmaybe-uninitialized]
At line 40 of file read_loop.f90
Fortran runtime error: Index '0' of dimension 1 of array 'nvalues' below lower
bound of 1

Error termination. Backtrace:
#0  0x1006e61ac
#1  0x1006e6e45
#2  0x1006e71ea
#3  0x1006debfe
#4  0x1006dec1d

[Bug target/86770] UNRESOLVED: 30_threads/call_once/call_once1.cc compilation failed to produce executable

2018-08-02 Thread wilson at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86770

Jim Wilson  changed:

   What|Removed |Added

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

--- Comment #2 from Jim Wilson  ---
Fixed in binutils.
https://sourceware.org/ml/binutils/2018-08/msg00057.html

[Bug c++/86836] internal compiler error on structured bindings with shadow parameter on templated function

2018-08-02 Thread mpolacek at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86836

--- Comment #4 from Marek Polacek  ---
commit 357b96452a5fc70011df4f27b5d4dffc5e2f2603
Author: jason 
Date:   Tue Nov 15 05:22:28 2016 +

Various C++17 decomposition fixes.

* tree.c (bitfield_p): New.
* cp-tree.h: Declare it.
* typeck.c (cxx_sizeof_expr, cxx_alignof_expr)
(cp_build_addr_expr_1): Use it instead of DECL_C_BIT_FIELD.
* decl.c (cp_finish_decomp): Look through reference.  Always
SET_DECL_DECOMPOSITION_P.
* semantics.c (finish_decltype_type): Adjust decomposition
handling.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@242408
138bc75d-0d04-0410-961f-82ee72b054a4

[Bug c++/86836] internal compiler error on structured bindings with shadow parameter on templated function

2018-08-02 Thread mpolacek at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86836

Marek Polacek  changed:

   What|Removed |Added

   Keywords||ice-on-invalid-code

--- Comment #3 from Marek Polacek  ---
struct A {
  int operator*();
  void operator++();
  bool operator!=(A);
};
template  class map {
public:
  A begin();
  A end();
};

template  void mergemap(map orig, map toadd) {
  for (auto p : toadd)
auto [orig] = orig;
}

int
main() {
  map x, y;
  mergemap(x, y);
}

[Bug tree-optimization/86732] Potential nullptr dereference does not propagate knowledge about the pointer

2018-08-02 Thread law at redhat dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86732

Jeffrey A. Law  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |INVALID

--- Comment #6 from Jeffrey A. Law  ---
Code is working as designed AFAICT.

[Bug tree-optimization/86732] Potential nullptr dereference does not propagate knowledge about the pointer

2018-08-02 Thread law at redhat dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86732

Jeffrey A. Law  changed:

   What|Removed |Added

 CC||law at redhat dot com

--- Comment #5 from Jeffrey A. Law  ---
The code is working as designed.  As noted, we want the dereference to occur so
that programs can catch the signal that occurs as a result of the dereference.

Using __builtin_trap is definitely better from a security standpoint because
the program halts after the undefined behavior -- consider an mmu-less system
that doesn't trap on *0.  If you use __builtin_unreachable you'll just start
executing random code which would be a wonderful attack vector.

And FWIW, I think we should be using __builtin_trap rather than
__builtin_unreachable in many more places because of the security concerns.

[Bug middle-end/86705] [7/8/9 Regression] pr45678-2.c ICE with msp430-elf -mlarge

2018-08-02 Thread jozef.l at mittosystems dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86705

Jozef Lawrynowicz  changed:

   What|Removed |Added

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

--- Comment #5 from Jozef Lawrynowicz  ---
Fixed on gcc-7-branch, gcc-8-branch and trunk.

[Bug c++/86836] internal compiler error on structured bindings with shadow parameter on templated function

2018-08-02 Thread mpolacek at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86836

Marek Polacek  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2018-08-02
 CC||mpolacek at gcc dot gnu.org
 Ever confirmed|0   |1

--- Comment #2 from Marek Polacek  ---
Confirmed, will reduce.

[Bug c++/86836] internal compiler error on structured bindings with shadow parameter on templated function

2018-08-02 Thread christian.r.shelton at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86836

--- Comment #1 from Christian Shelton  ---
Created attachment 44496
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=44496=edit
preprocessed source

[Bug c++/86836] New: internal compiler error on structured bindings with shadow parameter on templated function

2018-08-02 Thread christian.r.shelton at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86836

Bug ID: 86836
   Summary: internal compiler error on structured bindings with
shadow parameter on templated function
   Product: gcc
   Version: 8.1.1
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c++
  Assignee: unassigned at gcc dot gnu.org
  Reporter: christian.r.shelton at gmail dot com
  Target Milestone: ---

Created attachment 44495
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=44495=edit
code that produces internal compiler error

This is the minimally working example I can get (removing the templates removes
the internal compiler error).  Note that the code does have an error, but
should not give an internal compiler error.

Compiled on 8.1.1 with command line "g++ --std=c++17 t2.cpp -o t2"

[Bug middle-end/86705] [7/8/9 Regression] pr45678-2.c ICE with msp430-elf -mlarge

2018-08-02 Thread jozefl at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86705

--- Comment #4 from jozefl at gcc dot gnu.org ---
Author: jozefl
Date: Thu Aug  2 20:54:02 2018
New Revision: 263279

URL: https://gcc.gnu.org/viewcvs?rev=263279=gcc=rev
Log:
2018-08-02  Jozef Lawrynowicz  

Backport from mainline
2018-07-31  Jozef Lawrynowicz  

PR middle-end/86705
* gcc/cfgexpand.c (set_parm_rtl): Use the alignment of Pmode when
MAX_SUPPORTED_STACK_ALIGNMENT would otherwise be exceeded by the
requested variable alignment.
(expand_one_ssa_partition): Likewise.
(expand_one_var): Likewise.


Modified:
branches/gcc-8-branch/gcc/ChangeLog
branches/gcc-8-branch/gcc/cfgexpand.c

[Bug target/86448] GCC 9 compiler generates slower code for spec 2006 milc on a power9 using -mcpu=power9 than using -mcpu=power8

2018-08-02 Thread kelvin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86448

--- Comment #4 from kelvin at gcc dot gnu.org ---

There are aspects of Michael's recent comment that I may not fully understand.

I checked the source for milc, and it is C, so I added -fgnu89-inline to the
list of OPTIMIZE options.  Then I reran my tests with gcc8 (svn version 262483)
on a DD2.2 power9 machine.


OPTIMIZE= -O3 -fpeel-loops -funroll-loops -ftree-vectorize
-fvect-cost-\
model -fno-strict-aliasing -msave-toc-indirect
-mno-pointers-to-nested-function\
s -fno-aggressive-loop-optimizations -ffast-math -mveclibabi=mass
-mrecip=rsqrt\
 -fgnu89-inline -mcpu=power9 (vs. -mcpu=power8)
LDOPT   = -m64 -Wl,-q  -Wl,-rpath=%{BASE_DIR}/lib64

I'm still not seeing the performance degradation Michael saw.  Here are my most
recent results:

gcc8gcc9

28.79   28.14   
29.01   28.84   
28.51   28.5
28.55   28.39   
29.02   29.07   
29.128.51   
delta   % delta
average 28.83   28.575  0.255   0.88%

Does anyone see anything I may be doing wrong?

[Bug target/86828] [6/7 Regression] wrong-code bug with "-march=knl -Ofast" (invalid memory reference)

2018-08-02 Thread janus at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86828

--- Comment #5 from janus at gcc dot gnu.org ---
(In reply to Richard Biener from comment #1)
> Would be nice to know what fixed this (or maybe know if it just went latent).

Bisection indicates that the segfault disappeared at r254526.

[Bug middle-end/86705] [7/8/9 Regression] pr45678-2.c ICE with msp430-elf -mlarge

2018-08-02 Thread jozefl at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86705

--- Comment #3 from jozefl at gcc dot gnu.org ---
Author: jozefl
Date: Thu Aug  2 20:36:14 2018
New Revision: 263277

URL: https://gcc.gnu.org/viewcvs?rev=263277=gcc=rev
Log:
2018-08-02  Jozef Lawrynowicz  

Backport from mainline
2018-07-31  Jozef Lawrynowicz  

PR middle-end/86705
* gcc/cfgexpand.c (set_parm_rtl): Use the alignment of Pmode when
MAX_SUPPORTED_STACK_ALIGNMENT would otherwise be exceeded by the
requested variable alignment.
(expand_one_ssa_partition): Likewise.
(expand_one_var): Likewise.


Modified:
branches/gcc-7-branch/gcc/ChangeLog
branches/gcc-7-branch/gcc/cfgexpand.c

[Bug tree-optimization/86835] [8/9 Regression] Bogus "is used uninitialized" warning with -ffast-math

2018-08-02 Thread glisse at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86835

Marc Glisse  changed:

   What|Removed |Added

   Keywords||wrong-code
 Status|UNCONFIRMED |NEW
   Last reconfirmed||2018-08-02
  Component|c   |tree-optimization
 Ever confirmed|0   |1

--- Comment #1 from Marc Glisse  ---
The recip pass messes up introducing the inverses:

  powmult_reciptmp.7_5 = reciptmp.6_89(D) * reciptmp.6_89(D);
  b_59 = MEM[(double *)params_57(D) + 8B];
  reciptmp.6_6 = 1.0e+0 / b_59;

The first line should be last and use reciptmp.6_6.

[Bug c/86835] New: [8/9 Regression] Bogus "is used uninitialized" warning with -ffast-math

2018-08-02 Thread bunk at stusta dot de
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86835

Bug ID: 86835
   Summary: [8/9 Regression] Bogus "is used uninitialized" warning
with -ffast-math
   Product: gcc
   Version: 8.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c
  Assignee: unassigned at gcc dot gnu.org
  Reporter: bunk at stusta dot de
  Target Milestone: ---

From https://bugs.debian.org/897876

$ cat test.c
#include 

void
evallogisticML(const double *x, const int n,
   double *params, double *fvec, double **fjac)
{
inti;
double a, b, amxb, /* exp_xmab,*/ cosh_amxb, nd, xi, diff;

a = params[0];
b = params[1];
nd = (double) n;

fvec[0] = fvec[1] = fjac[0][0] = fjac[1][0] = fjac[0][1] = fjac[1][1] =
0.0;
for (i = 0; i < n; ++i)
{
xi = x[i];
/* xmab = (x[i] - a) / b; */
diff = a - xi;
amxb = diff / b;
cosh_amxb = cosh(amxb);

fvec[0] += tanh(amxb/2.0); /* good */
fvec[1] += diff * tanh(amxb/2.0); /* good */

fjac[0][0] += (1.0 / (1.0 + cosh(amxb))); /* good */
fjac[0][1] += (diff / (1.0 + cosh_amxb)); /* good */
fjac[1][0] += (diff + b * sinh(amxb)) / (1.0 + cosh_amxb); /* good */
fjac[1][1] += diff * diff / (1.0 + cosh_amxb); /* good */
}

fvec[0] = fvec[0]; /* good */
fvec[1] -= (b * nd); /* good */

fjac[0][0] /= b; /* good */
fjac[0][1] /= b*b; /* good */
fjac[1][0] /= b; /* good */
fjac[1][1] = -fjac[1][1]/(b*b) - nd; /* good */
}
$ gcc-7 -O1 -ffast-math -Wall -c test.c
$ gcc-8 -O1 -ffast-math -Wall -c test.c
test.c: In function 'evallogisticML':
test.c:4:1: warning: 'reciptmp.6' is used uninitialized in this function
[-Wuninitialized]
 evallogisticML(const double *x, const int n,
 ^~
$ /usr/lib/gcc-snapshot/bin/gcc -O1 -ffast-math -Wall -c test.c
test.c: In function 'evallogisticML':
test.c:4:1: warning: 'reciptmp.6' is used uninitialized in this function
[-Wuninitialized]
 evallogisticML(const double *x, const int n,
 ^~
$ gcc-8 --version
gcc-8 (Debian 8.2.0-2) 8.2.0
...
$ /usr/lib/gcc-snapshot/bin/gcc --version
gcc (Debian 20180721-1) 9.0.0 20180721 (experimental) [trunk revision 262917]


8.2.0-2 is r263045 from the gcc-8-branch.

[Bug libstdc++/55815] switch hash function of libstdc++ hash tables to siphash

2018-08-02 Thread blog at landave dot io
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=55815

--- Comment #9 from landave  ---
I am on Fedora with gcc 8.1.1, and it seems this issue has not been resolved
yet.

I have attached an example for a multicollision, as well as a small program
that inserts the strings into an std::unordered_set. The program
is compiled as follows

$ g++ -O3 multicollision.cpp -o multicollision

and executed without arguments

$ ./multicollision 
reading input file... done.
generating some random input of same size... done.
inserting 32768 randomly generated strings of length 240... done (8ms). the
first string is in a bucket of size 1.
inserting 32768 maliciously generated strings of length 240... done (7854ms).
the first string is in a bucket of size 32768.

[Bug target/86386] [8/9 Regression] unaligned load from stack with -Os -fno-tree-dce -mstringop-strategy=vector_loop -mavx512bw

2018-08-02 Thread hjl.tools at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86386

--- Comment #6 from H.J. Lu  ---
I am testing this patch

diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c
index ee409cfe7e4..9971b369f45 100644
--- a/gcc/config/i386/i386.c
+++ b/gcc/config/i386/i386.c
@@ -13281,8 +13281,7 @@ ix86_finalize_stack_frame_flags (void)
 recompute_frame_layout_p = true;
   }
 }
-  else if (crtl->max_used_stack_slot_alignment
- > crtl->preferred_stack_boundary)
+  else if (crtl->max_used_stack_slot_alignment)
 {
   /* We don't need to realign stack.  But we still need to keep
stack frame properly aligned to satisfy the largest alignment

[Bug tree-optimization/86571] AIX NaNQ and NaNS output format conflicts with __builtin_sprintf

2018-08-02 Thread msebor at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86571

Martin Sebor  changed:

   What|Removed |Added

   Keywords||patch

--- Comment #3 from Martin Sebor  ---
Patch: https://gcc.gnu.org/ml/gcc-patches/2018-08/msg00234.html

[Bug libstdc++/55815] switch hash function of libstdc++ hash tables to siphash

2018-08-02 Thread blog at landave dot io
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=55815

landave  changed:

   What|Removed |Added

 CC||blog at landave dot io

--- Comment #8 from landave  ---
Created attachment 44494
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=44494=edit
multicollision example (32768 240-byte strings)

[Bug other/86834] New: [9 regression] several tests fail with ICE starting with r263245

2018-08-02 Thread seurer at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86834

Bug ID: 86834
   Summary: [9 regression] several tests fail with ICE starting
with r263245
   Product: gcc
   Version: 9.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: ---

These failures occur on powerpc64 BE but not on LE.  The ICEs occur in two
different spots.

FAIL: g++.dg/pr84264.C  -std=gnu++11 (internal compiler error)
FAIL: g++.dg/pr84264.C  -std=gnu++11 (test for excess errors)
FAIL: g++.dg/pr84264.C  -std=gnu++14 (internal compiler error)
FAIL: g++.dg/pr84264.C  -std=gnu++14 (test for excess errors)
FAIL: g++.dg/pr84264.C  -std=gnu++98 (internal compiler error)
FAIL: g++.dg/pr84264.C  -std=gnu++98 (test for excess errors)
FAIL: g++.dg/pr84279.C  -std=gnu++11 (internal compiler error)
FAIL: g++.dg/pr84279.C  -std=gnu++11 (test for excess errors)
FAIL: g++.dg/pr84279.C  -std=gnu++14 (internal compiler error)
FAIL: g++.dg/pr84279.C  -std=gnu++14 (test for excess errors)
FAIL: g++.dg/pr84279.C  -std=gnu++98 (internal compiler error)
FAIL: g++.dg/pr84279.C  -std=gnu++98 (test for excess errors)
FAIL: gcc.target/powerpc/ssp-1.c (internal compiler error)
FAIL: gcc.target/powerpc/ssp-1.c (test for excess errors)
FAIL: gcc.target/powerpc/ssp-2.c (internal compiler error)
FAIL: gcc.target/powerpc/ssp-2.c (test for excess errors)
UNRESOLVED: gcc.target/powerpc/ssp-1.c scan-assembler __stack_chk_guard
UNRESOLVED: gcc.target/powerpc/ssp-2.c scan-assembler m12344(r?18)


make -k check-gcc RUNTESTFLAGS=powerpc.exp=gcc.target/powerpc/ssp-1.c
. . .
# of unexpected failures2
FAIL: gcc.target/powerpc/ssp-1.c (internal compiler error)
FAIL: gcc.target/powerpc/ssp-1.c (test for excess errors)

spawn -ignore SIGHUP /home/seurer/gcc/build/gcc-trunk-p6/gcc/xgcc
-B/home/seurer/gcc/build/gcc-trunk-p6/gcc/
/home/seurer/gcc/gcc-trunk-p6/gcc/testsuite/gcc.target/powerpc/ssp-1.c
-fno-diagnostics-show-caret -fdiagnostics-color=never -O2 -fstack-protector-all
-mstack-protector-guard=global -ffat-lto-objects -S -o ssp-1.s
during RTL pass: expand
/home/seurer/gcc/gcc-trunk-p6/gcc/testsuite/gcc.target/powerpc/ssp-1.c: In
function 'f':
/home/seurer/gcc/gcc-trunk-p6/gcc/testsuite/gcc.target/powerpc/ssp-1.c:6:6:
internal compiler error: in maybe_gen_insn, at optabs.c:7307
0x10887edb maybe_gen_insn(insn_code, unsigned int, expand_operand*)
/home/seurer/gcc/gcc-trunk-p6/gcc/optabs.c:7307
0x1088b74f maybe_expand_insn(insn_code, unsigned int, expand_operand*)
/home/seurer/gcc/gcc-trunk-p6/gcc/optabs.c:7351
0x103e8c6b stack_protect_prologue
/home/seurer/gcc/gcc-trunk-p6/gcc/cfgexpand.c:6117
0x103e8c6b execute
/home/seurer/gcc/gcc-trunk-p6/gcc/cfgexpand.c:6357


spawn -ignore SIGHUP
/home/seurer/gcc/build/gcc-trunk-p6/gcc/testsuite/g++/../../xg++
-B/home/seurer/gcc/build/gcc-trunk-p6/gcc/testsuite/g++/../../
/home/seurer/gcc/gcc-trunk-p6/gcc/testsuite/g++.dg/pr84264.C
-fno-diagnostics-show-caret -fdiagnostics-color=never -nostdinc++
-I/home/seurer/gcc/build/gcc-trunk-p6/powerpc64-unknown-linux-gnu/libstdc++-v3/include/powerpc64-unknown-linux-gnu
-I/home/seurer/gcc/build/gcc-trunk-p6/powerpc64-unknown-linux-gnu/libstdc++-v3/include
-I/home/seurer/gcc/gcc-trunk-p6/libstdc++-v3/libsupc++
-I/home/seurer/gcc/gcc-trunk-p6/libstdc++-v3/include/backward
-I/home/seurer/gcc/gcc-trunk-p6/libstdc++-v3/testsuite/util -fmessage-length=0
-std=gnu++98 -w -O1 -fstack-protector-strong -S -o pr84264.s
during RTL pass: expand
/home/seurer/gcc/gcc-trunk-p6/gcc/testsuite/g++.dg/pr84264.C: In function 'void
b()':
/home/seurer/gcc/gcc-trunk-p6/gcc/testsuite/g++.dg/pr84264.C:7:1: internal
compiler error: Segmentation fault
0x10c9e04b crash_signal
/home/seurer/gcc/gcc-trunk-p6/gcc/toplev.c:325
0x106a1988 contains_struct_check(tree_node*, tree_node_structure_enum, char
const*, int, char const*)
/home/seurer/gcc/gcc-trunk-p6/gcc/tree.h:3227
0x106a1988 stack_protect_prologue
/home/seurer/gcc/gcc-trunk-p6/gcc/cfgexpand.c:6112
0x106a1988 execute
/home/seurer/gcc/gcc-trunk-p6/gcc/cfgexpand.c:6357
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See  for instructions.
compiler exited with status 1
FAIL: g++.dg/pr84264.C  -std=gnu++98 (internal compiler error)
FAIL: g++.dg/pr84264.C  -std=gnu++98 (test for excess errors)

[Bug c/86833] New: No Warning for uninitilized array unless optimization on

2018-08-02 Thread wladislav.artsimovich at iws dot fraunhofer.de
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86833

Bug ID: 86833
   Summary: No Warning for uninitilized array unless optimization
on
   Product: gcc
   Version: unknown
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c
  Assignee: unassigned at gcc dot gnu.org
  Reporter: wladislav.artsimovich at iws dot fraunhofer.de
  Target Milestone: ---

As asked on stackoverflow.com/questions/51659180,

The following code causes a Segmentation fault:

int main()
{
double array[2]={0, 0};
printf("%f\n", array[999]);

return 0;
}

Compiling with "gcc -Wall -O1" throws:

main.c: In function 'main':
main.c:6:5: warning: 'array[999]' is used uninitialized in this function
[-Wuninitialized]
 printf("%f\n", array[999]);
 ^~

While compiling with "gcc -Wall" or equivalent "gcc -Wall -O0" throws no error
at all.
I got told, that this is typical, because unless O1 is set GCC performs no
checks related to such memory management.
It was also mentioned, that clang throws an error in all cases. 
Usually Linters use no Optimization and will miss that.

[Bug target/86790] m68k port needs updating for CVE-2017-5753

2018-08-02 Thread law at redhat dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86790

Jeffrey A. Law  changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 CC||law at redhat dot com
 Resolution|--- |FIXED

--- Comment #2 from Jeffrey A. Law  ---
Fixed on the trunk.

[Bug target/86772] [meta-bug] tracking port status for CVE-2017-5753

2018-08-02 Thread law at redhat dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86772
Bug 86772 depends on bug 86790, which changed state.

Bug 86790 Summary: m68k port needs updating for CVE-2017-5753
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86790

   What|Removed |Added

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

[Bug target/86832] GCC v8.2.0 tries to use native TLS with -fstack-protector-strong on Windows (mingw-w64)

2018-08-02 Thread pinskia at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86832

Andrew Pinski  changed:

   What|Removed |Added

 Target||x86_64-w64-mingw32

--- Comment #1 from Andrew Pinski  ---
Related to bug 85644.

[Bug target/85644] -fstack-protector generates invalid read to %fs:0x0 on mac

2018-08-02 Thread pinskia at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85644

Andrew Pinski  changed:

   What|Removed |Added

 CC||shane at isara dot com

--- Comment #1 from Andrew Pinski  ---
*** Bug 86762 has been marked as a duplicate of this bug. ***

[Bug target/86762] Using -fstack-protector-all causes SIGSEV with gcc-8

2018-08-02 Thread pinskia at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86762

Andrew Pinski  changed:

   What|Removed |Added

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

--- Comment #1 from Andrew Pinski  ---
Dup of bug 85644.

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

[Bug target/86790] m68k port needs updating for CVE-2017-5753

2018-08-02 Thread law at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86790

--- Comment #1 from Jeffrey A. Law  ---
Author: law
Date: Thu Aug  2 17:50:16 2018
New Revision: 263272

URL: https://gcc.gnu.org/viewcvs?rev=263272=gcc=rev
Log:
PR target/86790
* config/m68k/m68k.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
Define to speculation_safe_value_not_needed.

Modified:
trunk/gcc/ChangeLog
trunk/gcc/config/m68k/m68k.c

[Bug c/30552] gcc crashes when compiling examples with GNU statement expressions in VLAs (also involved: nested functions declared K)

2018-08-02 Thread dave.pagan at oracle dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=30552

Dave Pagan  changed:

   What|Removed |Added

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

--- Comment #13 from Dave Pagan  ---
Fixed with patch noted in comments:

https://gcc.gnu.org/ml/gcc-patches/2018-03/msg00621.html

[Bug c/30552] gcc crashes when compiling examples with GNU statement expressions in VLAs (also involved: nested functions declared K)

2018-08-02 Thread dave.pagan at oracle dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=30552

--- Comment #12 from Dave Pagan  ---
Yes, it did. I had assumed the bug status would get updated, but it wasn't.
I'll set it to resolved.

[Bug target/86784] H8 port needs updating for CVE-2017-5753

2018-08-02 Thread law at redhat dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86784

Jeffrey A. Law  changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 CC||law at redhat dot com
 Resolution|--- |FIXED

--- Comment #2 from Jeffrey A. Law  ---
Fixed on the trunk.

[Bug target/86772] [meta-bug] tracking port status for CVE-2017-5753

2018-08-02 Thread law at redhat dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86772
Bug 86772 depends on bug 86784, which changed state.

Bug 86784 Summary: H8 port needs updating for CVE-2017-5753
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86784

   What|Removed |Added

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

[Bug target/86784] H8 port needs updating for CVE-2017-5753

2018-08-02 Thread law at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86784

--- Comment #1 from Jeffrey A. Law  ---
Author: law
Date: Thu Aug  2 17:24:59 2018
New Revision: 263270

URL: https://gcc.gnu.org/viewcvs?rev=263270=gcc=rev
Log:
PR target/86784
* config/h8300/h8300.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
Define to speculation_safe_value_not_needed.

Modified:
trunk/gcc/ChangeLog
trunk/gcc/config/h8300/h8300.c

[Bug target/86820] [8 regression] gcc-8 miscompiles binutils on m68k

2018-08-02 Thread sch...@linux-m68k.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86820

Andreas Schwab  changed:

   What|Removed |Added

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

--- Comment #6 from Andreas Schwab  ---
Fixed.

[Bug target/86820] [8 regression] gcc-8 miscompiles binutils on m68k

2018-08-02 Thread schwab at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86820

--- Comment #5 from Andreas Schwab  ---
Author: schwab
Date: Thu Aug  2 17:23:13 2018
New Revision: 263269

URL: https://gcc.gnu.org/viewcvs?rev=263269=gcc=rev
Log:
Fix invalid cc_status after [const_][us]mulsi3_highpart

Backport from mainline
PR target/86820
* config/m68k/m68k.md (umulsi3_highpart+1, const_umulsi3_highpart)
(smulsi3_highpart+1, const_smulsi3_highpart): Add CC_STATUS_INIT.

testsuite/:
PR target/86820
* gcc.target/m68k/mulsi_highpart.c: New test.

Added:
branches/gcc-8-branch/gcc/testsuite/gcc.target/m68k/mulsi_highpart.c
Modified:
branches/gcc-8-branch/gcc/ChangeLog
branches/gcc-8-branch/gcc/config/m68k/m68k.md
branches/gcc-8-branch/gcc/testsuite/ChangeLog

[Bug c++/80744] Detect Divide By Zero and give a warning in C/C++

2018-08-02 Thread jg at jguk dot org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80744

--- Comment #5 from Jonny Grant  ---
Created attachment 44493
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=44493=edit
Better test case

[Bug c++/81239] std::__cxx11::string& visible in gcc warning output

2018-08-02 Thread jg at jguk dot org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81239

--- Comment #3 from Jonny Grant  ---
(In reply to Jonny Grant from comment #2)
> Created attachment 44492 [details]
> Better test case

wrong ticket. please ignore

[Bug c++/81239] std::__cxx11::string& visible in gcc warning output

2018-08-02 Thread jg at jguk dot org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81239

--- Comment #2 from Jonny Grant  ---
Created attachment 44492
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=44492=edit
Better test case

[Bug c++/80744] Detect Divide By Zero and give a warning in C/C++

2018-08-02 Thread jg at jguk dot org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80744

--- Comment #4 from Jonny Grant  ---
Hi Martin
Thank you for your reply.

I appreciate that GCC isn't a static analyser


But I think (C) is probably easier to follow though if GCC was extended, and
(A) std::string harder, as needs knowledge of that container... the static
instrumented code would need to call mystring.size() and see what the value
would be?

int main()
{
std::string empty;
test_func(0, empty)
}

I've attached a test case where (B) is not detected, because "const" is
removed.

[Bug libgcc/86512] Incorrect sub result for float subnormal inputs in armv7(with -msoft-float).

2018-08-02 Thread rearnsha at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86512

Richard Earnshaw  changed:

   What|Removed |Added

   Target Milestone|--- |9.0

[Bug libgcc/86512] Incorrect sub result for float subnormal inputs in armv7(with -msoft-float).

2018-08-02 Thread rearnsha at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86512

Richard Earnshaw  changed:

   What|Removed |Added

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

--- Comment #2 from Richard Earnshaw  ---
fixed on trunk.

[Bug libgcc/86512] Incorrect sub result for float subnormal inputs in armv7(with -msoft-float).

2018-08-02 Thread rearnsha at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86512

--- Comment #1 from Richard Earnshaw  ---
Author: rearnsha
Date: Thu Aug  2 16:50:07 2018
New Revision: 263267

URL: https://gcc.gnu.org/viewcvs?rev=263267=gcc=rev
Log:
arm - correctly handle denormal results during softfp subtraction

2018-08-02  Nicolas Pitre 

PR libgcc/86512
* config/arm/ieee754-df.S (adddf3): Don't shortcut denormal handling
when exponent goes negative. Update my email address.
* config/arm/ieee754-sf.S (addsf3): Likewise.


Modified:
trunk/libgcc/ChangeLog
trunk/libgcc/config/arm/ieee754-df.S
trunk/libgcc/config/arm/ieee754-sf.S

[Bug target/86828] [6/7 Regression] wrong-code bug with "-march=knl -Ofast" (invalid memory reference)

2018-08-02 Thread janus at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86828

--- Comment #4 from janus at gcc dot gnu.org ---
(In reply to H.J. Lu from comment #3)
> I can't reproduce it with gcc version 7.3.1 20180609.

Just made a fresh build off today's 7-branch:

gcc version 7.3.1 20180802 [gcc-7-branch revision 263263] (GCC)

With this I see the same segfault as with the 7.3.0 version provided by Ubuntu
18.04.

Both '-march=knl' and '-march=skylake-avx512' trigger the error in my tests
(when combined with -Ofast).


CPU is Core(TM) i9-7980XE, OS is Ubuntu 18.04. What's yours H.J.?

[Bug c++/80744] Detect Divide By Zero and give a warning in C/C++

2018-08-02 Thread msebor at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80744

Martin Sebor  changed:

   What|Removed |Added

 CC||msebor at gcc dot gnu.org

--- Comment #3 from Martin Sebor  ---
I agree that diagnosing (A) or (C) under -Wdiv-by-zero would not be appropriate
because the option controls compile-time division by zero and there is none
here.

Extending -Wdiv-by-zero to diagnose possible division by zero would undoubtedly
make the option exceedingly noisy.  Introducing a new option such as
-Wmaybe-div-by-zero analogous to -Wmaybe-uninitialized would be fine but the
option wouldn't diagnose ether (A) or (C) because there is no evidence of
overflow.  -Wmaybe-uninitialized triggers under very restrictive conditions,
when there is some evidence that an uninitialized variable is used.  To avoid
excessive noise from -Wmaybe-div-by-zero some similar approach would need to
used.  Such as:

  int f (int i)
  {
int j;

if (i == 0) // because of this test
  j = 7;
else
  j = 13;

return j / i;   // i may be assumed to be zero here
  }

[Bug c/86832] New: GCC v8.2.0 tries to use native TLS with -fstack-protector-strong on Windows (mingw-w64)

2018-08-02 Thread johannes.schindelin at gmx dot de
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86832

Bug ID: 86832
   Summary: GCC v8.2.0 tries to use native TLS with
-fstack-protector-strong on Windows (mingw-w64)
   Product: gcc
   Version: lto
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c
  Assignee: unassigned at gcc dot gnu.org
  Reporter: johannes.schindelin at gmx dot de
  Target Milestone: ---

When I try to compile this program:

-- snip --
static void a1(void *p) { }

int main(int argc, char **argv) {
int i;
a1();
return 0;
}
-- snap --

using

gcc -o a1.o -c -fstack-protector-strong a1.c
gcc -fstack-protector-strong -o a1.exe a1.o

the resulting a1.exe causes a segmentation fault in `main()`. The offending
assembler instruction is this:

0x40156f : mov %fs:0x0,%rax

The good mingw-w64 people pointed out that this looks like native TLS, but
mingw-w64 only supports emulated TLS.

When compiling without -fstack-protector-strong, everything works.

Output of `gcc -v`:

Using built-in specs.
COLLECT_GCC=C:\git-sdk-64-ci\mingw64\bin\gcc.exe
COLLECT_LTO_WRAPPER=C:/git-sdk-64-ci/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.2.0/lto-wrapper.exe
Target: x86_64-w64-mingw32
Configured with: ../gcc-8.2.0/configure --prefix=/mingw64
--with-local-prefix=/mingw64/local --build=x86_64-w64-mingw32
--host=x86_64-w64-mingw32 --target=x86_64-w64-mingw32
--with-native-system-header-dir=/mingw64/x86_64-w64-mingw32/include
--libexecdir=/mingw64/lib --enable-bootstrap --with-arch=x86-64
--with-tune=generic --enable-languages=ada,c,lto,c++,objc,obj-c++,fortran
--enable-shared --enable-static --enable-libatomic --enable-threads=posix
--enable-graphite --enable-fully-dynamic-string
--enable-libstdcxx-filesystem-ts=yes --enable-libstdcxx-time=yes
--disable-libstdcxx-pch --disable-libstdcxx-debug --disable-isl-version-check
--enable-lto --enable-libgomp --disable-multilib --enable-checking=release
--disable-rpath --disable-win32-registry --disable-nls --disable-werror
--disable-symvers --with-libiconv --with-system-zlib --with-gmp=/mingw64
--with-mpfr=/mingw64 --with-mpc=/mingw64 --with-isl=/mingw64
--with-pkgversion='Rev1, Built by MSYS2 project'
--with-bugurl=https://sourceforge.net/projects/msys2 --with-gnu-as
--with-gnu-ld
Thread model: posix
gcc version 8.2.0 (Rev1, Built by MSYS2 project)

[Bug tree-optimization/86552] missing warning for reading past the end of non-string arrays

2018-08-02 Thread msebor at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86552

--- Comment #5 from Martin Sebor  ---
Yes, that's also (partly) why I submitted a solution for pr71625 comment 15:

  https://gcc.gnu.org/ml/gcc-patches/2018-07/msg01884.html

With that patch applied as well the strlen call is diagnosed.

[Bug tree-optimization/86702] [9 Regression] SPEC CPU2006 400.perlbench, CPU2017 500.perlbench_r ~3% performance drop after r262247

2018-08-02 Thread alexander.nesterovskiy at intel dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86702

--- Comment #4 from Alexander Nesterovskiy  ---
I've noticed performance regressions on different targets and with different
compilation options, not only highly optimized like "-march=skylake-avx512
-Ofast -flto -funroll-loops" but with "-O2" too.
The simplest case is 500.perlbench_r with "-O2" on Broadwell executed in one
copy.

Performance drop is not in a particular place but "spread" over whole
S_regmatch function which is really big.
My guess was that loosing of these probabilities affects passes that follows
tree-switchlower1.
And it is what I see in generated assembly - some different spilling/filling
and different order of blocks.

[Bug target/86772] [meta-bug] tracking port status for CVE-2017-5753

2018-08-02 Thread nickc at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86772
Bug 86772 depends on bug 86813, which changed state.

Bug 86813 Summary: xstormy16 port needs updating for CVE-2017-5753
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86813

   What|Removed |Added

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

[Bug target/86813] xstormy16 port needs updating for CVE-2017-5753

2018-08-02 Thread nickc at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86813

Nick Clifton  changed:

   What|Removed |Added

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

--- Comment #2 from Nick Clifton  ---
I have defined TARGET_HAVE_SPECULATION_SAFE_VALUE as
speculation_safe_value_not_needed.

[Bug target/86813] xstormy16 port needs updating for CVE-2017-5753

2018-08-02 Thread nickc at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86813

--- Comment #1 from Nick Clifton  ---
Author: nickc
Date: Thu Aug  2 16:13:32 2018
New Revision: 263266

URL: https://gcc.gnu.org/viewcvs?rev=263266=gcc=rev
Log:
PR target/86813
* config/stormy16/stormy16.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
Define to speculation_safe_value_not_needed.

Modified:
trunk/gcc/ChangeLog
trunk/gcc/config/stormy16/stormy16.c

[Bug target/86772] [meta-bug] tracking port status for CVE-2017-5753

2018-08-02 Thread nickc at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86772
Bug 86772 depends on bug 86810, which changed state.

Bug 86810 Summary: v850 port needs updating for CVE-2017-5753
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86810

   What|Removed |Added

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

[Bug target/86810] v850 port needs updating for CVE-2017-5753

2018-08-02 Thread nickc at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86810

Nick Clifton  changed:

   What|Removed |Added

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

--- Comment #2 from Nick Clifton  ---
I have defined TARGET_HAVE_SPECULATION_SAFE_VALUE as
speculation_safe_value_not_needed.

[Bug middle-end/86660] libgomp.c++/for-15.C ICEs with nvptx offloading

2018-08-02 Thread vries at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86660

--- Comment #16 from Tom de Vries  ---
Author: vries
Date: Thu Aug  2 15:59:01 2018
New Revision: 263265

URL: https://gcc.gnu.org/viewcvs?rev=263265=gcc=rev
Log:
[nvptx] Ignore c++ exceptions

The nvptx port can't support exceptions using sjlj, because ptx does not
support sjlj.  However, default_except_unwind_info still returns UI_SJLJ, even
even if we configure with --disable-sjlj-exceptions, because UI_SJLJ is the
fallback option.

The reason default_except_unwind_info doesn't return UI_DWARF2 is because
DWARF2_UNWIND_INFO is not defined in defaults.h, because
INCOMING_RETURN_ADDR_RTX is not defined, because there's no ptx equivalent.

Testcase libgomp.c++/for-15.C currently doesn't compile unless fno-exceptions
is added because:
- it tries to generate sjlj exception handling code, and
- it tries to generate exception tables using label-addressed .byte sequence.
  Ptx doesn't support generating random data at a label, nor being able to
  load/write data relative to a label.

This patch fixes the first problem by using UI_TARGET for nvptx.

The second problem is worked around by generating all .byte sequences commented
out.  It would be better to have a narrower workaround, and define
TARGET_ASM_BYTE_OP to "error: .byte unsupported " or some such.

This patch does not enable exceptions for nvptx, it merely allows c++ programs
to run correctly if they do no use exception handling.

Build and reg-tested on x86_64 with nvptx accelerator.

2018-08-02  Tom de Vries  

PR target/86660
* common/config/nvptx/nvptx-common.c (nvptx_except_unwind_info): New
function.  Return UI_TARGET unconditionally.
(TARGET_EXCEPT_UNWIND_INFO): Redefine to nvptx_except_unwind_info.
* config/nvptx/nvptx.c (TARGET_ASM_BYTE_OP): Emit commented out
'.byte'.

* testsuite/libgomp.oacc-c++/routine-1-auto.C: Remove -fno-exceptions.
* testsuite/libgomp.oacc-c++/routine-1-template-auto.C: Same.
* testsuite/libgomp.oacc-c++/routine-1-template-trailing-return-type.C:
Same.
* testsuite/libgomp.oacc-c++/routine-1-template.C: Same.
* testsuite/libgomp.oacc-c++/routine-1-trailing-return-type.C: Same.
* testsuite/libgomp.oacc-c-c++-common/routine-1.c: Same.

Modified:
trunk/gcc/ChangeLog
trunk/gcc/common/config/nvptx/nvptx-common.c
trunk/gcc/config/nvptx/nvptx.c
trunk/libgomp/ChangeLog
trunk/libgomp/testsuite/libgomp.oacc-c++/routine-1-auto.C
trunk/libgomp/testsuite/libgomp.oacc-c++/routine-1-template-auto.C
   
trunk/libgomp/testsuite/libgomp.oacc-c++/routine-1-template-trailing-return-type.C
trunk/libgomp/testsuite/libgomp.oacc-c++/routine-1-template.C
trunk/libgomp/testsuite/libgomp.oacc-c++/routine-1-trailing-return-type.C
trunk/libgomp/testsuite/libgomp.oacc-c-c++-common/routine-1.c

[Bug target/86810] v850 port needs updating for CVE-2017-5753

2018-08-02 Thread nickc at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86810

--- Comment #1 from Nick Clifton  ---
Author: nickc
Date: Thu Aug  2 15:57:06 2018
New Revision: 263264

URL: https://gcc.gnu.org/viewcvs?rev=263264=gcc=rev
Log:
PR target/86810
* config/v850/v850.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
Define to speculation_safe_value_not_needed.

Modified:
trunk/gcc/ChangeLog
trunk/gcc/config/v850/v850.c

[Bug c++/86190] [6/7 Regression] -Wsign-conversion ignores explicit conversion in some cases

2018-08-02 Thread mpolacek at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86190

--- Comment #13 from Marek Polacek  ---
Thanks for taking the time to report the bug!

[Bug middle-end/86827] [8/9 Regression] -Warray-bounds produces negative indicies

2018-08-02 Thread msebor at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86827

Martin Sebor  changed:

   What|Removed |Added

 Status|UNCONFIRMED |ASSIGNED
   Last reconfirmed||2018-08-02
 Ever confirmed|0   |1

--- Comment #2 from Martin Sebor  ---
Confirmed (gcc-help thread:
https://gcc.gnu.org/ml/gcc-help/2018-08/msg6.html).

[Bug target/86803] rx port needs updating for CVE-2017-5753

2018-08-02 Thread nickc at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86803

Nick Clifton  changed:

   What|Removed |Added

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

--- Comment #2 from Nick Clifton  ---
I have defined TARGET_HAVE_SPECULATION_SAFE_VALUE as
speculation_safe_value_not_needed.

[Bug target/86772] [meta-bug] tracking port status for CVE-2017-5753

2018-08-02 Thread nickc at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86772
Bug 86772 depends on bug 86803, which changed state.

Bug 86803 Summary: rx port needs updating for CVE-2017-5753
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86803

   What|Removed |Added

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

[Bug c++/86190] [6/7 Regression] -Wsign-conversion ignores explicit conversion in some cases

2018-08-02 Thread TonyELewis at hotmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86190

--- Comment #12 from Tony E Lewis  ---
I confirm that Godbolt's GCC trunk now handles my testcase correctly.

Thanks very much for all work on this.

[Bug target/86735] [8/9 Regression] Bad wrong-code bug with "-march=skylake-avx512 -Ofast"

2018-08-02 Thread janus at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86735

--- Comment #13 from janus at gcc dot gnu.org ---
gfortran.fortran-torture/execute/in-pack.f90 in the testsuite exhibits the same
problem as comment 0, I think. It also contains Fortran array operations and
fails with "-march=skylake-avx512 -Ofast". See PR 86831 comment 5.

[Bug target/86831] three failures in gfortran.fortran-torture with "-Ofast -march=native" on skylake-avx512

2018-08-02 Thread janus at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86831

--- Comment #5 from janus at gcc dot gnu.org ---
(In reply to Richard Biener from comment #4)
> "nan_inf_fmt" suggests that the 'fast' part in -Ofast might be the issue. 
> So try -O3 -march=native instead?

All three tests pass with those flags.

As just mentioned, 'intrinsic_nearest' and 'nan_inf_fmt' fail with -Ofast alone
(and with basically all recent gfortran versions, at least 5 to trunk). I'm not
so much worried about these.


However, in-pack.f90 is the only one that is made to fail by the combination of
-Ofast and -march=skylake-avx512. I think it's the same problem as PR 86735 (at
least it behaves in the same way).

Here is a reduction that shows the failure:

program main
  implicit none
  complex(kind=8) :: a8(5),b8(5)
  integer :: i

  a8 = (/(cmplx(i,-i,kind=8),i=1,5)/)
  b8 = (/(2*cmplx(i,-i,kind=8),i=1,5)/)
  call csub8(a8(5:1:-1),b8(5:1:-1),5)
end program main

subroutine csub8(a,b,n)
  implicit none
  complex(kind=8), dimension(n) :: a,b
  complex(kind=8), dimension(n) :: aa, bb
  integer :: n, i
  aa = (/(cmplx(n-i+1,i-n-1,kind=8),i=1,n)/)
  if (any(aa /= a)) STOP 9
  bb = (/(2*cmplx(n-i+1,i-n-1,kind=8),i=1,5)/)
  if (any(bb /= b)) STOP 10
end subroutine csub8

[Bug target/86803] rx port needs updating for CVE-2017-5753

2018-08-02 Thread nickc at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86803

--- Comment #1 from Nick Clifton  ---
Author: nickc
Date: Thu Aug  2 14:35:10 2018
New Revision: 263263

URL: https://gcc.gnu.org/viewcvs?rev=263263=gcc=rev
Log:
PR target/86803
* config/rx/rx.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
Define to speculation_safe_value_not_needed.


Modified:
trunk/gcc/ChangeLog
trunk/gcc/config/rx/rx.c

[Bug target/86797] msp430 port needs updating for CVE-2017-5753

2018-08-02 Thread nickc at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86797

Nick Clifton  changed:

   What|Removed |Added

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

--- Comment #2 from Nick Clifton  ---
I have defined TARGET_HAVE_SPECULATION_SAFE_VALUE as 
speculation_safe_value_not_needed.

[Bug target/86772] [meta-bug] tracking port status for CVE-2017-5753

2018-08-02 Thread nickc at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86772
Bug 86772 depends on bug 86797, which changed state.

Bug 86797 Summary: msp430 port needs updating for CVE-2017-5753
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86797

   What|Removed |Added

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

[Bug target/86831] three failures in gfortran.fortran-torture with "-Ofast -march=native" on skylake-avx512

2018-08-02 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86831

--- Comment #4 from Richard Biener  ---
"nan_inf_fmt" suggests that the 'fast' part in -Ofast might be the issue.  So
try -O3 -march=native instead?

[Bug c++/86763] [7/8 Regression] Wrong code comparing member of copy of a 237 byte object with nontrivial default constructor on x86-64 arch

2018-08-02 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86763

Richard Biener  changed:

   What|Removed |Added

  Known to work||9.0
Summary|[7/8/9 Regression] Wrong|[7/8 Regression] Wrong code
   |code comparing member of|comparing member of copy of
   |copy of a 237 byte object   |a 237 byte object with
   |with nontrivial default |nontrivial default
   |constructor on x86-64 arch  |constructor on x86-64 arch

--- Comment #11 from Richard Biener  ---
Fixed on trunk sofar.

[Bug c++/86763] [7/8/9 Regression] Wrong code comparing member of copy of a 237 byte object with nontrivial default constructor on x86-64 arch

2018-08-02 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86763

--- Comment #10 from Richard Biener  ---
Author: rguenth
Date: Thu Aug  2 14:25:57 2018
New Revision: 263261

URL: https://gcc.gnu.org/viewcvs?rev=263261=gcc=rev
Log:
2018-08-02  Richard Biener  

PR c++/86763
* class.c (layout_class_type): Copy TYPE_TYPELESS_STORAGE
to the CLASSTYPE_AS_BASE.

* g++.dg/torture/pr86763.C: New testcase.

Added:
trunk/gcc/testsuite/g++.dg/torture/pr86763.C
Modified:
trunk/gcc/ChangeLog
trunk/gcc/cp/class.c
trunk/gcc/testsuite/ChangeLog

[Bug middle-end/86505] [6/7/8/9 Regression] __builtin_va_arg_pack_len() computes the number of arguments wrongly

2018-08-02 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86505

Richard Biener  changed:

   What|Removed |Added

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

--- Comment #3 from Richard Biener  ---
Created attachment 44491
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=44491=edit
candidate patch

I am testing this patch which fixes the testcase.  Test coverage is low though.

[Bug target/86831] three failures in gfortran.fortran-torture with "-Ofast -march=native" on skylake-avx512

2018-08-02 Thread janus at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86831

--- Comment #3 from janus at gcc dot gnu.org ---
(In reply to janus from comment #0)
> FAIL: gfortran.fortran-torture/execute/intrinsic_nearest.f90 execution, 
> -Ofast -march=native 
> FAIL: gfortran.fortran-torture/execute/nan_inf_fmt.f90 execution,  -Ofast
> -march=native

Those two fail already with -Ofast alone.

[Bug target/86831] three failures in gfortran.fortran-torture with "-Ofast -march=native" on skylake-avx512

2018-08-02 Thread janus at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86831

--- Comment #2 from janus at gcc dot gnu.org ---
(In reply to janus from comment #0)
> Running "make check-fortran" with this mod on a skylake-avx512 CPU yields
> the following failures:

None of them fails with -march=native alone.

[Bug target/86797] msp430 port needs updating for CVE-2017-5753

2018-08-02 Thread nickc at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86797

--- Comment #1 from Nick Clifton  ---
Author: nickc
Date: Thu Aug  2 14:02:32 2018
New Revision: 263259

URL: https://gcc.gnu.org/viewcvs?rev=263259=gcc=rev
Log:
PR target/86797
* config/msp430/msp430.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
Define to speculation_safe_value_not_needed.

Modified:
trunk/gcc/ChangeLog
trunk/gcc/config/msp430/msp430.c

[Bug target/86831] three failures in gfortran.fortran-torture with "-Ofast -march=native" on skylake-avx512

2018-08-02 Thread janus at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86831

--- Comment #1 from janus at gcc dot gnu.org ---
(In reply to janus from comment #0)
> Running "make check-fortran" with this mod on a skylake-avx512 CPU yields
> the following failures:
> 
> FAIL: gfortran.fortran-torture/execute/in-pack.f90 execution,  -Ofast
> -march=native 

this one fails with "STOP 10"

> FAIL: gfortran.fortran-torture/execute/intrinsic_nearest.f90 execution, 
> -Ofast -march=native 

"STOP 1"


> FAIL: gfortran.fortran-torture/execute/nan_inf_fmt.f90 execution,  -Ofast
> -march=native

"STOP 3"

[Bug target/86772] [meta-bug] tracking port status for CVE-2017-5753

2018-08-02 Thread nickc at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86772
Bug 86772 depends on bug 86791, which changed state.

Bug 86791 Summary: mcore port needs updating for CVE-2017-5753
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86791

   What|Removed |Added

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

[Bug target/86791] mcore port needs updating for CVE-2017-5753

2018-08-02 Thread nickc at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86791

Nick Clifton  changed:

   What|Removed |Added

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

--- Comment #2 from Nick Clifton  ---
I have defined TARGET_HAVE_SPECULATION_SAFE_VALUE as
speculation_safe_value_not_needed.

[Bug target/86791] mcore port needs updating for CVE-2017-5753

2018-08-02 Thread nickc at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86791

--- Comment #1 from Nick Clifton  ---
Author: nickc
Date: Thu Aug  2 13:30:40 2018
New Revision: 263258

URL: https://gcc.gnu.org/viewcvs?rev=263258=gcc=rev
Log:
PR target/86791
* config/mcore/mcore.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
Define to speculation_safe_value_not_needed.

Modified:
trunk/gcc/ChangeLog
trunk/gcc/config/mcore/mcore.c

[Bug target/86831] New: three failures in gfortran.fortran-torture with "-Ofast -march=native" on skylake-avx512

2018-08-02 Thread janus at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86831

Bug ID: 86831
   Summary: three failures in gfortran.fortran-torture with
"-Ofast -march=native" on skylake-avx512
   Product: gcc
   Version: 9.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: target
  Assignee: unassigned at gcc dot gnu.org
  Reporter: janus at gcc dot gnu.org
  Target Milestone: ---

Triggered by two recent avx512 bugs with Fortran code (PR 86735 and PR 86828),
I just tried the following:


Index: gcc/testsuite/lib/fortran-torture.exp
===
--- gcc/testsuite/lib/fortran-torture.exp   (revision 263255)
+++ gcc/testsuite/lib/fortran-torture.exp   (working copy)
@@ -81,6 +81,7 @@
{ -O2 -fomit-frame-pointer -finline-functions -funroll-loops } \
{ -O2 -fbounds-check } \
{ -O3 -g } \
+   { -Ofast -march=native } \
{ -Os }
 if { $test_tree_vectorize } {
lappend options $vectorizer_options


Running "make check-fortran" with this mod on a skylake-avx512 CPU yields the
following failures:

FAIL: gfortran.fortran-torture/execute/in-pack.f90 execution,  -Ofast
-march=native 
FAIL: gfortran.fortran-torture/execute/intrinsic_nearest.f90 execution,  -Ofast
-march=native 
FAIL: gfortran.fortran-torture/execute/nan_inf_fmt.f90 execution,  -Ofast
-march=native

[Bug target/86828] [6/7 Regression] wrong-code bug with "-march=knl -Ofast" (invalid memory reference)

2018-08-02 Thread hjl.tools at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86828

H.J. Lu  changed:

   What|Removed |Added

 CC||hjl.tools at gmail dot com

--- Comment #3 from H.J. Lu  ---
I can't reproduce it with gcc version 7.3.1 20180609.

[Bug tree-optimization/86816] [8 Regression] ICE: SIGSEGV in tree-ssa-pre / tail_merge_optimize

2018-08-02 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86816

Richard Biener  changed:

   What|Removed |Added

   Priority|P3  |P2
  Known to work||9.0
Summary|[8/9 Regression] ICE:   |[8 Regression] ICE: SIGSEGV
   |SIGSEGV in tree-ssa-pre /   |in tree-ssa-pre /
   |tail_merge_optimize |tail_merge_optimize
  Known to fail|9.0 |

--- Comment #3 from Richard Biener  ---
Fixed on trunk sofar.

[Bug tree-optimization/86816] [8/9 Regression] ICE: SIGSEGV in tree-ssa-pre / tail_merge_optimize

2018-08-02 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86816

--- Comment #2 from Richard Biener  ---
Author: rguenth
Date: Thu Aug  2 13:19:50 2018
New Revision: 263257

URL: https://gcc.gnu.org/viewcvs?rev=263257=gcc=rev
Log:
2018-08-02  Richard Biener  

PR tree-optimization/86816
* tree-ssa-tail-merge.c (tail_merge_valueize): New function
which checks for value availability before querying it.
(gvn_uses_equal): Use it.
(same_succ_hash): Likewise.
(gimple_equal_p): Likewise.

* g++.dg/torture/pr86816.C: New testcase.

Added:
trunk/gcc/testsuite/g++.dg/torture/pr86816.C
Modified:
trunk/gcc/ChangeLog
trunk/gcc/testsuite/ChangeLog
trunk/gcc/tree-ssa-tail-merge.c

[Bug fortran/86830] New: Contiguous array pointer function result not recognized as contiguous

2018-08-02 Thread only_for_nouse at gmx dot de
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86830

Bug ID: 86830
   Summary: Contiguous array pointer function result not
recognized as contiguous
   Product: gcc
   Version: 8.1.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: fortran
  Assignee: unassigned at gcc dot gnu.org
  Reporter: only_for_nouse at gmx dot de
  Target Milestone: ---

Created attachment 44490
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=44490=edit
REproducer of the error

Compiling the attached code given the error:
   loc_g => petsc_o%g_dv%get_ptr()
   1
Error: Assignment to contiguous pointer from non-contiguous target at (1)

although the get_ptr function of the dist_func_t datatype returns a contiguous
pointer. 

Remark: Using a polymorphic variable petsc_o instead of a static type, the
error does not occur. The same is true if one omits one level of nesting of
types.

[Bug tree-optimization/86829] Missing sin(atan(x)) and cos(atan(x)) optimizations

2018-08-02 Thread giuliano.belinassi at usp dot br
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86829

--- Comment #3 from Giuliano Belinassi  ---
(In reply to Marc Glisse from comment #1)
> 
> Do you have a copyright assignment (https://gcc.gnu.org/contribute.html) ?

No. Sorry, but I think I may need help getting this right. Are there any tips?

(In reply to Richard Biener from comment #2)
> likely happens because you use float_type_node instead of 'type' for
> build_one_cst.  I think that if the atan intermediate result has additional
> uses then the substitution may not be beneficial?  Thus you should
> write (atans:s @0) in both places.
> 
> Otherwise this looks OK.  Can you please post the patch to gcc-patches
> and add testcases?

I will fix these issues and add some test cases. I appreciate your help!

[Bug target/86789] m32r port needs updating for CVE-2017-5753

2018-08-02 Thread nickc at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86789

Nick Clifton  changed:

   What|Removed |Added

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

--- Comment #2 from Nick Clifton  ---
I have defined TARGET_HAVE_SPECULATION_SAFE_VALUE as
speculation_safe_value_not_needed.

[Bug target/86772] [meta-bug] tracking port status for CVE-2017-5753

2018-08-02 Thread nickc at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86772
Bug 86772 depends on bug 86789, which changed state.

Bug 86789 Summary: m32r port needs updating for CVE-2017-5753
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86789

   What|Removed |Added

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

[Bug target/86789] m32r port needs updating for CVE-2017-5753

2018-08-02 Thread nickc at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86789

--- Comment #1 from Nick Clifton  ---
Author: nickc
Date: Thu Aug  2 12:31:29 2018
New Revision: 263256

URL: https://gcc.gnu.org/viewcvs?rev=263256=gcc=rev
Log:
PR target/86789
* config/m32r/m32r.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
Define to speculation_safe_value_not_needed.

Modified:
trunk/gcc/ChangeLog
trunk/gcc/config/m32r/m32r.c

[Bug target/85434] Address of stack protector guard spilled to stack on ARM

2018-08-02 Thread thopre01 at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85434

--- Comment #20 from Thomas Preud'homme  ---
(In reply to Christophe Lyon from comment #19)
> Created attachment 44489 [details]
> Source file causing ICE on aarch64
> 
> With your patch, GCC crashes with target aarch64-none-linux-gnu
> aarch64-none-linux-gnu-gcc gethnamaddr.i -fstack-protector  
> 
> during RTL pass: expand
> gethnamaddr.c: In function 'getanswer':
> gethnamaddr.c:179:1: internal compiler error: in maybe_gen_insn, at
> optabs.c:7307
>  getanswer (const querybuf *answer, int anslen, const char *qname, int qtype)
>  ^
> 0xafcef2 maybe_gen_insn(insn_code, unsigned int, expand_operand*)
> /home/christophe.lyon/src/GCC/sources/gcc-fsf/trunk/gcc/optabs.c:7307
> 0xaffb88 maybe_expand_insn(insn_code, unsigned int, expand_operand*)
> /home/christophe.lyon/src/GCC/sources/gcc-fsf/trunk/gcc/optabs.c:7351
> 0x7748a0 stack_protect_prologue
>
> /home/christophe.lyon/src/GCC/sources/gcc-fsf/trunk/gcc/cfgexpand.c:6117
> 0x7748a0 execute
>
> /home/christophe.lyon/src/GCC/sources/gcc-fsf/trunk/gcc/cfgexpand.c:6357
> Please submit a full bug report,

Thanks Christophe,

It seems to have impacted x86 as well. I'll look at all those and respin the
patch. I've reverted it in the meantime.

[Bug target/85434] Address of stack protector guard spilled to stack on ARM

2018-08-02 Thread clyon at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85434

Christophe Lyon  changed:

   What|Removed |Added

 CC||clyon at gcc dot gnu.org

--- Comment #19 from Christophe Lyon  ---
Created attachment 44489
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=44489=edit
Source file causing ICE on aarch64

With your patch, GCC crashes with target aarch64-none-linux-gnu
aarch64-none-linux-gnu-gcc gethnamaddr.i -fstack-protector  
during RTL pass: expand
gethnamaddr.c: In function 'getanswer':
gethnamaddr.c:179:1: internal compiler error: in maybe_gen_insn, at
optabs.c:7307
 getanswer (const querybuf *answer, int anslen, const char *qname, int qtype)
 ^
0xafcef2 maybe_gen_insn(insn_code, unsigned int, expand_operand*)
/home/christophe.lyon/src/GCC/sources/gcc-fsf/trunk/gcc/optabs.c:7307
0xaffb88 maybe_expand_insn(insn_code, unsigned int, expand_operand*)
/home/christophe.lyon/src/GCC/sources/gcc-fsf/trunk/gcc/optabs.c:7351
0x7748a0 stack_protect_prologue
   
/home/christophe.lyon/src/GCC/sources/gcc-fsf/trunk/gcc/cfgexpand.c:6117
0x7748a0 execute
   
/home/christophe.lyon/src/GCC/sources/gcc-fsf/trunk/gcc/cfgexpand.c:6357
Please submit a full bug report,

[Bug target/86828] [6/7 Regression] wrong-code bug with "-march=knl -Ofast" (invalid memory reference)

2018-08-02 Thread janus at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86828

--- Comment #2 from janus at gcc dot gnu.org ---
(In reply to Richard Biener from comment #1)
> Would be nice to know what fixed this (or maybe know if it just went latent).

I think I remember having some intermediate versions during the reduction that
failed also with 8 and trunk. So I'd guess it just went dormant, or the
segfault depends on memory layout or something.

Wanted to try valgrind on the exe, but it seems it doesn't support AVX-512 yet
(at least the version I have).

[Bug target/86787] iq2000 port needs updating for CVE-2017-5753

2018-08-02 Thread nickc at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86787

--- Comment #2 from Nick Clifton  ---
Author: nickc
Date: Thu Aug  2 12:14:52 2018
New Revision: 263255

URL: https://gcc.gnu.org/viewcvs?rev=263255=gcc=rev
Log:
PR target/86787
* config/iq2000/iq2000.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
Define to speculation_safe_value_not_needed.

Modified:
trunk/gcc/ChangeLog
trunk/gcc/config/iq2000/iq2000.c

[Bug target/86771] [9 Regression] gfortran.dg/actual_array_constructor_1.f90 fails on arm after combine 2 insns to 2 insns patch

2018-08-02 Thread clyon at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86771

--- Comment #5 from Christophe Lyon  ---
I think in the "ok" version we have:
add ip, sp, #60
...
ldm ip, {r0, r1}
...
add r2, sp, #72
ldm r2, {r0, r1}

in the "ko" version we have:
ldr r1, [sp, #64]
...
ldr r1, [sp, #76]

So in the "ko" version we do not load r0

[Bug target/86771] [9 Regression] gfortran.dg/actual_array_constructor_1.f90 fails on arm after combine 2 insns to 2 insns patch

2018-08-02 Thread clyon at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86771

--- Comment #4 from Christophe Lyon  ---
Created attachment 44488
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=44488=edit
Good code

This is with r263197 and r263067 (your patch) reverted

[Bug target/86828] [6/7 Regression] wrong-code bug with "-march=knl -Ofast" (invalid memory reference)

2018-08-02 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86828

Richard Biener  changed:

   What|Removed |Added

   Keywords||needs-bisection
 Target||x86_64-*-*, i?86-*-*

--- Comment #1 from Richard Biener  ---
Would be nice to know what fixed this (or maybe know if it just went latent).

[Bug target/86771] [9 Regression] gfortran.dg/actual_array_constructor_1.f90 fails on arm after combine 2 insns to 2 insns patch

2018-08-02 Thread clyon at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86771

--- Comment #3 from Christophe Lyon  ---
Created attachment 44487
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=44487=edit
Wrong code generated

This is with trunk @r263197

[Bug tree-optimization/86829] Missing sin(atan(x)) and cos(atan(x)) optimizations

2018-08-02 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86829

Richard Biener  changed:

   What|Removed |Added

   Keywords||missed-optimization, patch
 Status|UNCONFIRMED |NEW
   Last reconfirmed||2018-08-02
 CC||rguenth at gcc dot gnu.org
Version|unknown |9.0
 Ever confirmed|0   |1

--- Comment #2 from Richard Biener  ---
+ /* Simplify sin(atan(x)) -> x / sqrt(x*x + 1). */
+ (for sins (SIN)
+  atans (ATAN)
+  sqrts (SQRT)
+  (simplify
+   (sins (atans @0))
+   (rdiv @0 ( sqrts (plus (mult @0 @0) 
+   { build_one_cst (float_type_node);})
+ 
+ 
+ /* Simplify cos(atan(x)) -> 1 / sqrt(x*x + 1). */
+ (for coss (COS)
+  atans (ATAN)
+  sqrts (SQRT)
+  (simplify
+   (coss (atans @0))
+   (rdiv { build_one_cst (float_type_node);} 
+   ( sqrts (plus (mult @0 @0) { build_one_cst (float_type_node);})


likely happens because you use float_type_node instead of 'type' for
build_one_cst.  I think that if the atan intermediate result has additional
uses then the substitution may not be beneficial?  Thus you should
write (atans:s @0) in both places.

Otherwise this looks OK.  Can you please post the patch to gcc-patches
and add testcases?

[Bug target/86772] [meta-bug] tracking port status for CVE-2017-5753

2018-08-02 Thread nickc at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86772
Bug 86772 depends on bug 86782, which changed state.

Bug 86782 Summary: frv port needs updating for CVE-2017-5753
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86782

   What|Removed |Added

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

[Bug target/86782] frv port needs updating for CVE-2017-5753

2018-08-02 Thread nickc at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86782

Nick Clifton  changed:

   What|Removed |Added

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

--- Comment #2 from Nick Clifton  ---
I have defined TARGET_HAVE_SPECULATION_SAFE_VALUE
speculation_safe_value_not_needed

[Bug tree-optimization/86829] Missing sin(atan(x)) and cos(atan(x)) optimizations

2018-08-02 Thread glisse at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86829

--- Comment #1 from Marc Glisse  ---
You shouldn't use float_type_node directly, since the operations might be on
double or long double.

Do you have a copyright assignment (https://gcc.gnu.org/contribute.html) ?

  1   2   >