[Bug tree-optimization/85158] ubsan and -O3 finds a problem

2018-04-03 Thread dcb314 at hotmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85158

--- Comment #2 from David Binderman  ---
(In reply to Jakub Jelinek from comment #1)
> The above snippet isn't a self-contained program and contains UB, so it is
> unclear how you can get runtime diagnostics for it.

The short snippet of code is stored in file bug424.c

gcc trunk revision 259004 has been built with ubsan, as the configure line
should make clear.

06:51 is pretty early in the morning, isn't it ? ;->

[Bug c++/85148] [6/7/8 Regression] ICE with NSDMI and this pointer

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

Jakub Jelinek  changed:

   What|Removed |Added

   Priority|P3  |P2
 Status|UNCONFIRMED |NEW
   Last reconfirmed||2018-04-03
 CC||jakub at gcc dot gnu.org,
   ||jason at gcc dot gnu.org
   Target Milestone|--- |6.5
 Ever confirmed|0   |1

--- Comment #1 from Jakub Jelinek  ---
I get ICE already with r185596 when -std=c++1y option has been introduced:
pr85148.C:1:29: internal compiler error: tree check: expected tree that
contains ‘common’ structure, have ‘constructor’ in perform_member_init, at
cp/init.c:661
Then starting with r210653 it is rejected:
pr85148.C: In function ‘void foo()’:
pr85148.C:8:28: error: could not convert ‘(long int)this’ from ‘long int’ to
‘A’
   A> a{};
^
pr85148.C: In constructor ‘constexpr A >::A()’:
pr85148.C:1:29: error: could not convert ‘(long int)this’ from ‘long int’ to
‘A’
 template struct A
 ^
pr85148.C: In function ‘void foo()’:
pr85148.C:8:28: note: synthesized method ‘constexpr A >::A()’ first
required here 
   A> a{};
^
Then starting with r216750 it ICEs in tsubst_copy:
pr85148.C: In function ‘void foo()’:
pr85148.C:8:28: internal compiler error: in tsubst_copy, at cp/pt.c:12755
   A> a{};
^
0x71171b tsubst_copy
../../gcc/cp/pt.c:12755
0x720a9b tsubst_copy_and_build(tree_node*, tree_node*, int, tree_node*, bool,
bool)
../../gcc/cp/pt.c:15464
and finally starting with r234442 in replace_placeholders.

It hasn't been fixed by the r258593 changes, seems the PLACEHOLDER_EXPR refers
to the outer A when it should be refering to the inner A?  Or I'm totally
confused on what exactly it should do.

[Bug tree-optimization/85158] ubsan and -O3 finds a problem

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

Jakub Jelinek  changed:

   What|Removed |Added

 Status|WAITING |NEW
 CC||rguenth at gcc dot gnu.org

--- Comment #3 from Jakub Jelinek  ---
Oops, sorry, missed the UB is in the compiler, sorry.

I believe this and surrounding code has several such known issues, but can't
find a PR for that right now.

[Bug c++/85147] [6/7/8 Regression] ICE with invalid variadic template-template parameter

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

Jakub Jelinek  changed:

   What|Removed |Added

   Priority|P3  |P4
 Status|UNCONFIRMED |NEW
   Last reconfirmed||2018-04-03
 CC||jakub at gcc dot gnu.org,
   ||paolo at gcc dot gnu.org
   Target Milestone|--- |6.5
 Ever confirmed|0   |1

--- Comment #1 from Jakub Jelinek  ---
Started with r226054.

[Bug c++/85147] [6/7/8 Regression] ICE with invalid variadic template-template parameter

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

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

Untested fix.

[Bug c/85164] New: poly-int.h:845:5: runtime error: signed integer overflow

2018-04-03 Thread dcb314 at hotmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85164

Bug ID: 85164
   Summary: poly-int.h:845:5: runtime error: signed integer
overflow
   Product: gcc
   Version: 8.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c
  Assignee: unassigned at gcc dot gnu.org
  Reporter: dcb314 at hotmail dot com
  Target Milestone: ---

For the following C code, in file bug425b.c

a[];
b;
c() {
  unsigned long d;
  b = a[d - 1 >> 3];
}

Compiled by gcc trunk revision 259004, compiled with undefined behaviour
sanitizer, does this:

$ ~/gcc/results/bin/gcc -c -O2 -w bug425b.c
../../trunk/gcc/poly-int.h:845:5: runtime error: signed integer overflow:
9223372036854775804 + 4 cannot be represented in type 'long int'
$ ~/gcc/results/bin/gcc -v
Using built-in specs.
COLLECT_GCC=/home/dcb/gcc/results/bin/gcc
COLLECT_LTO_WRAPPER=/home/dcb/gcc/results.259004.ubsan/libexec/gcc/x86_64-pc-linux-gnu/8.0.1/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: ../trunk/configure --prefix=/home/dcb/gcc/results.259004.ubsan
--with-build-config=bootstrap-ubsan --disable-multilib --disable-werror
--enable-checking=df,extra,fold,rtl,yes --enable-languages=c,c++,fortran
Thread model: posix
gcc version 8.0.1 20180402 (experimental) (GCC) 
$

[Bug middle-end/64920] bootstrap-ubsan [build/gengtype -r gtype.state]: libiberty/regex.c:6970:11: runtime error: left shift of negative value -1

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

Martin Liška  changed:

   What|Removed |Added

 Status|WAITING |RESOLVED
 Resolution|--- |WORKSFORME

--- Comment #5 from Martin Liška  ---
Then closing..

[Bug other/63426] [meta-bug] Issues found with -fsanitize=undefined

2018-04-03 Thread marxin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63426
Bug 63426 depends on bug 64920, which changed state.

Bug 64920 Summary: bootstrap-ubsan [build/gengtype -r gtype.state]: 
libiberty/regex.c:6970:11: runtime error: left shift of negative value -1
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64920

   What|Removed |Added

 Status|WAITING |RESOLVED
 Resolution|--- |WORKSFORME

[Bug c/85164] poly-int.h:845:5: runtime error: signed integer overflow

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

Martin Liška  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2018-04-03
 CC||marxin at gcc dot gnu.org
 Blocks||63426
 Ever confirmed|0   |1


Referenced Bugs:

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63426
[Bug 63426] [meta-bug] Issues found with -fsanitize=undefined

[Bug c++/85156] [8 Regression] ICE with -O1 -g: gimplification failed

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

Martin Liška  changed:

   What|Removed |Added

   Priority|P3  |P1
 Status|UNCONFIRMED |NEW
   Last reconfirmed||2018-04-03
 CC||aoliva at gcc dot gnu.org,
   ||marxin at gcc dot gnu.org
  Known to work||7.3.0
   Target Milestone|--- |8.0
Summary|-O1 -g internal compiler|[8 Regression] ICE with -O1
   |error: gimplification   |-g: gimplification failed
   |failed  |
 Ever confirmed|0   |1
  Known to fail||8.0

--- Comment #1 from Martin Liška  ---
Confirmed, started with r255569.

[Bug c++/85146] ICE with __direct_bases for declared but not defined struct

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

Jakub Jelinek  changed:

   What|Removed |Added

 CC||jakub at gcc dot gnu.org

--- Comment #1 from Jakub Jelinek  ---
Created attachment 43813
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=43813&action=edit
gcc8-pr85146.patch

It isn't entirely clear to me if this is valid or not from N2965, if it is
valid, we can do something like this patch, if it is invalid, we should use
complete_type_or_else or similar.  __bases doesn't diagnose incomplete classes
either.

[Bug tree-optimization/82494] UBSAN in gcc/tree-data-ref.c:3427:16: runtime error: signed integer overflow: 131072 * -131072 cannot be represented in type 'int'

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

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

[Bug tree-optimization/85158] ubsan and -O3 finds a problem

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

Richard Biener  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |DUPLICATE

--- Comment #4 from Richard Biener  ---
There's related PR82494 about the lambda vector operations but yes, this code
hasn't
been fixed to avoid overflows and generally expects to operate with infinite
precision integers ... (you know, 64bits will be enough - really!).

Fixing requires overhauling all of the API and data structures in dependence
analysis and finding a suitable representation for "infinite precision
integers".
Note that most of the APIs do not have a well-defined failure mode so bailing
out isn't easy either.

Using GMP is very likely prohibitly expensive not only due to its lack of
optimizing the small-precision case.  OTOH we are using it from niter analysis
already.  Evaluating ISL ints (isl/val.h when configured to not use GMP) might
be worth, as well as maybe looking at including (patched?) mini-gmp.

Note the HWIs are less likely a problem than the ints currently used for
lambda vectors/matrices.

Note that simply silencing UBSAN by using unsigned arithmetic will simply
silence it, not avoiding wrong-code issues that might be latent there.

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

[Bug other/63426] [meta-bug] Issues found with -fsanitize=undefined

2018-04-03 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63426
Bug 63426 depends on bug 85158, which changed state.

Bug 85158 Summary: ubsan and -O3 finds a problem
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85158

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |DUPLICATE

[Bug c++/85141] [6/7/8 Regression] ICE with pointer arithmetic of static member function address

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

Jakub Jelinek  changed:

   What|Removed |Added

   Priority|P3  |P2
 Status|UNCONFIRMED |NEW
   Last reconfirmed||2018-04-03
 CC||jakub at gcc dot gnu.org
   Target Milestone|--- |6.5
 Ever confirmed|0   |1

--- Comment #1 from Jakub Jelinek  ---
Started with r176072.

[Bug tree-optimization/82494] UBSAN in gcc/tree-data-ref.c:3427:16: runtime error: signed integer overflow: 131072 * -131072 cannot be represented in type 'int'

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

--- Comment #4 from Richard Biener  ---
I commented in the dup:

This code hasn't been fixed to avoid overflows and generally expects to operate
with infinite precision integers ... (you know, 32/64bits will be enough -
really!).

Fixing requires overhauling all of the API and data structures in dependence
analysis and finding a suitable representation for "infinite precision
integers".
Note that most of the APIs do not have a well-defined failure mode so bailing
out isn't easy either.

Using GMP is very likely prohibitly expensive not only due to its lack of
optimizing the small-precision case.  OTOH we are using it from niter analysis
already.  Evaluating ISL ints (isl/val.h when configured to not use GMP) might
be worth, as well as maybe looking at including (patched?) mini-gmp (not sure
if that plays well with linking against real gmp, but eventually mpfr plays
well enough with mini-gmp and doesn't get too slow).

Note the HWIs are less likely a problem than the ints currently used for
lambda vectors/matrices.

Note that simply silencing UBSAN by using unsigned arithmetic will simply
silence it, not avoiding wrong-code issues that might be latent there.

[Bug c++/85165] New: gcc (and g++) not complaining about few unknown file extensions like *.CC, *.Cc, *.cC

2018-04-03 Thread kiran0802 at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85165

Bug ID: 85165
   Summary: gcc (and g++) not complaining about few unknown file
extensions like *.CC, *.Cc, *.cC
   Product: gcc
   Version: unknown
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c++
  Assignee: unassigned at gcc dot gnu.org
  Reporter: kiran0802 at gmail dot com
  Target Milestone: ---

When compiling the following test case i.e. test.CC, GCC (6.4.0 ver)
is not generating any warning and moreover respective object file is generated.
 I think this while compiling a file with any unknown file extension, GCC
should generate a warning i.e. "test.CC: file not recognized: File truncated". 

Steps to reproduce:
create a file with .CC extension and compile it with either gcc or g++ as shown
below.

with gcc-6.4.0 version:(compiler NOT generating any warnings for unknown file
extensions)
-
% touch test.CC
% gcc test.CC
/usr/lib/gcc/i686-pc-cygwin/6.4.0/../../../libcygwin.a(libcmain.o): In function
`main':
/usr/src/debug/cygwin-2.10.0-1/winsup/cygwin/lib/libcmain.c:37: undefined
reference to `WinMain@16'
collect2: error: ld returned 1 exit status

From above messages, it seems that the compiler has
recognized/considered/assumed .CC file extension as a valid extension and
further processing is done.

% gcc -c test.CC

There is no warning generated from the compiler and respective object file i.e.
test.o generated.

Note:
I had also tried with other file extensions such as .Cc and .cC and observed
the same behavior as above.
g++ is also behaving in the same way as gcc.

with gcc-4.8.0 version:(compiler is generated warnings as expected)
---
% gcc test.CC
test.CC: file not recognized: File truncated
collect2: ld returned 1 exit status

I had also tried to invoke only compiler i.e. with -c option
% gcc -c test.CC
gcc: test.CC: linker input file unused because linking not done

% gcc --version
gcc (GCC) 4.4.7 20120313 (Red Hat 4.4.7-18)
Copyright (C) 2010 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

From my understanding, gcc support following file extenstions:
.ada, .adb., .c, .C, .c++, .cc, .class, .cp, .cpp, .CPP, .cxx, etc.
As .CC, .Cc and .cC are not in the above list, compiler should generate
respective warning message.

[Bug gcov-profile/85163] [GCOV] A call statement with '==' , '||', and '&&' operators is wrongly marked as executed twice

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

Martin Liška  changed:

   What|Removed |Added

   Priority|P3  |P5
 Status|UNCONFIRMED |NEW
   Last reconfirmed||2018-04-03
   Assignee|unassigned at gcc dot gnu.org  |marxin at gcc dot 
gnu.org
 Ever confirmed|0   |1
   Severity|normal  |enhancement

--- Comment #1 from Martin Liška  ---
I can confirm it. However it's quite complex condition and I'm probably not
planning to fix that.

[Bug gcov-profile/85163] [GCOV] A call statement with '==' , '||', and '&&' operators is wrongly marked as executed twice

2018-04-03 Thread yangyibiao at nju dot edu.cn
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85163

--- Comment #2 from Yibiao Yang  ---
(In reply to Martin Liška from comment #1)
> I can confirm it. However it's quite complex condition and I'm probably not
> planning to fix that.

Ok. Thanks.

[Bug c++/85141] [6/7/8 Regression] ICE with pointer arithmetic of static member function address

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

Jakub Jelinek  changed:

   What|Removed |Added

 CC||jason at gcc dot gnu.org

--- Comment #2 from Jakub Jelinek  ---
Not really sure what can be done here, perhaps stabilize_expr could for these
FUNCTION_TYPE exp try to create a TARGET_EXPR for the address of
COMPONENT_REF's first operand and only keep the COMPONENT_REF with BASELINK and
optional NON_LVALUE_EXPR wrapping it in the returned expressio rather than also
in the TARGET_EXPR?

[Bug c++/85141] [6/7/8 Regression] ICE with pointer arithmetic of static member function address

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

--- Comment #3 from Jakub Jelinek  ---
Without -fpermissive it is error-recovery ICE.

[Bug c++/85140] [6/7/8 Regression] ICE with invalid use of alignas

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

Jakub Jelinek  changed:

   What|Removed |Added

   Priority|P3  |P4
 Status|UNCONFIRMED |NEW
   Last reconfirmed||2018-04-03
 CC||jakub at gcc dot gnu.org
   Target Milestone|--- |6.5
Summary|ICE with invalid use of |[6/7/8 Regression] ICE with
   |alignas |invalid use of alignas
 Ever confirmed|0   |1

--- Comment #1 from Jakub Jelinek  ---
Started with r192199.

[Bug tree-optimization/84969] [8 Regression] Wrong code with -ftree-loop-distribute-patterns

2018-04-03 Thread amker at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84969

amker at gcc dot gnu.org changed:

   What|Removed |Added

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

--- Comment #5 from amker at gcc dot gnu.org ---
(In reply to Jakub Jelinek from comment #4)
> So fixed?

Yes, I think so.

[Bug c++/85140] [6/7/8 Regression] ICE with invalid use of alignas

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

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

Untested fix.

[Bug target/85166] New: [ntptx, libgfortran] Libgomp fortran tests using stop in offloaded fns fail to compile

2018-04-03 Thread vries at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85166

Bug ID: 85166
   Summary: [ntptx, libgfortran] Libgomp fortran tests using stop
in offloaded fns fail to compile
   Product: gcc
   Version: 8.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: target
  Assignee: unassigned at gcc dot gnu.org
  Reporter: vries at gcc dot gnu.org
  Target Milestone: ---

Atm for nvptx offloading we have lots of fortran tests (both openmp and
openacc) fail like this:
...
unresolved symbol _gfortran_stop_numeric
FAIL: libgomp.fortran/examples-4/async_target-2.f90   -O0  (test for excess
errors)
UNRESOLVED: libgomp.fortran/examples-4/async_target-2.f90   -O0  compilation
failed to produce executable
...

Recently "[libgomp testsuite] Replace non-standard call abort by STOP n" was
committed.

In libgfortran/Makefile.in we have:
...
@LIBGFOR_MINIMAL_FALSE@runtime/stop.c
...
so the function _gfortran_stop_numeric contained in stop.c doesn't get build
for LIBGFOR_MINIMAL.

The LIBGFOR_MINIMAL setting is only active for nvptx:
...
 if test "x${target_cpu}" = xnvptx; then
  LIBGFOR_MINIMAL_TRUE=
  LIBGFOR_MINIMAL_FALSE='#'
else
  LIBGFOR_MINIMAL_TRUE='#'
  LIBGFOR_MINIMAL_FALSE=
fi
...

[Bug target/84762] GCC for PowerPC32 violates the SysV ABI spec for small struct returns

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

Richard Biener  changed:

   What|Removed |Added

 CC||rguenth at gcc dot gnu.org

--- Comment #7 from Richard Biener  ---
Isn't this two different bugs?  From the description it looks like all of 4.6+
behave like this?  But the bisect points to sth that would be a 8+ regression?
Also I fail to see how this expand patch can cause this ABI issue.

[Bug target/85126] [8 regression] gcc.target/powerpc/pr69946.c fails on powerpc64 BE starting with r254213

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

Richard Biener  changed:

   What|Removed |Added

 Target||powerpc64
   Target Milestone|--- |8.0

[Bug tree-optimization/85158] ubsan and -O3 finds a problem

2018-04-03 Thread dcb314 at hotmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85158

--- Comment #5 from David Binderman  ---
(In reply to Richard Biener from comment #4)
> There's related PR82494 about the lambda vector operations but yes, this
> code hasn't
> been fixed to avoid overflows and generally expects to operate with infinite
> precision integers ... (you know, 64bits will be enough - really!).

This code works 99% of the time. I'd be happy to see it bodged
until it works 99.9% of the time.

Can I suggest that for those parts of the code where int isn't
enough, then long gets used and for those parts where long isn't
enough, the 128 bit data type (__int128_t ?) gets used.

Going all the way to unlimited ints when plain ints aren't enough 
seems overkill to me, although I am not familiar with the code.

[Bug c++/85127] Members implementation outside class doesn't compile if class name is an alias from a using

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

Richard Biener  changed:

   What|Removed |Added

   Keywords||rejects-valid
 Status|UNCONFIRMED |NEW
   Last reconfirmed||2018-04-03
 Ever confirmed|0   |1

--- Comment #1 from Richard Biener  ---
G++ says

t.C:11:16: error: invalid use of incomplete type ‘class Base’
 void B::foo() {
^
t.C:2:7: note: declaration of ‘class Base’
 class Base {
   ^~~~

[Bug c/85167] New: shrink-wrap.c:333:15: runtime error with UBSAN

2018-04-03 Thread dcb314 at hotmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85167

Bug ID: 85167
   Summary: shrink-wrap.c:333:15: runtime error with UBSAN
   Product: gcc
   Version: 8.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c
  Assignee: unassigned at gcc dot gnu.org
  Reporter: dcb314 at hotmail dot com
  Target Milestone: ---

For the following C code stored in source code file bug426.c:

struct a {
  long b
};
c, d, e;
f() {
  long g;
  for (; g == c ? 0 : (e = 1); g = ((struct a *)g)->b)
if (h())
  return d;
}

$ ~/gcc/results/bin/gcc -c -w -O2 bug426.c
../../trunk/gcc/shrink-wrap.c:333:15: runtime error: member access within null
pointer of type 'struct df_lr_bb_info'
../../trunk/gcc/shrink-wrap.c:334:15: runtime error: member access within null
pointer of type 'struct df_lr_bb_info'
$ ~/gcc/results/bin/gcc -v
Using built-in specs.
COLLECT_GCC=/home/dcb/gcc/results/bin/gcc
COLLECT_LTO_WRAPPER=/home/dcb/gcc/results.259004.ubsan/libexec/gcc/x86_64-pc-linux-gnu/8.0.1/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: ../trunk/configure --prefix=/home/dcb/gcc/results.259004.ubsan
--with-build-config=bootstrap-ubsan --disable-multilib --disable-werror
--enable-checking=df,extra,fold,rtl,yes --enable-languages=c,c++,fortran
Thread model: posix
gcc version 8.0.1 20180402 (experimental) (GCC) 
$

[Bug c++/85133] [7/8 Regression] [concepts] ICE with invalid concept used in variadic template

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

Richard Biener  changed:

   What|Removed |Added

   Priority|P3  |P4
   Target Milestone|--- |7.4

[Bug c++/85134] [8 Regression] ICE with invalid constexpr in 'shared' OpenMP clause

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

Richard Biener  changed:

   What|Removed |Added

   Priority|P3  |P4
   Target Milestone|--- |8.0

[Bug c++/85135] [7/8 Regression] ICE with invalid late-specified return type

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

Richard Biener  changed:

   What|Removed |Added

   Priority|P3  |P2
   Target Milestone|--- |7.4

[Bug tree-optimization/85158] ubsan and -O3 finds a problem

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

--- Comment #6 from Jakub Jelinek  ---
As a middle-ground between ints, HOST_WIDE_INTs and unlimited precision we have
offset_int, widest_int etc.  But perhaps using even that would be too costly.

[Bug target/84762] GCC for PowerPC32 violates the SysV ABI spec for small struct returns

2018-04-03 Thread segher at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84762

--- Comment #8 from Segher Boessenkool  ---
It is.  This PR is about us not following the ABI.  On trunk this code
is miscompiled; there is at least one other PR for that.

[Bug c++/85135] [7/8 Regression] ICE with invalid late-specified return type

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

Jakub Jelinek  changed:

   What|Removed |Added

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

--- Comment #1 from Jakub Jelinek  ---
Started with r240756.

[Bug tree-optimization/85168] New: ICE in tree-ssa-coalesce.c: SSA corruption: Unable to coalesce ssa_names which are marked as MUST COALESCE when -O2 is used

2018-04-03 Thread ivo.raisr at oracle dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85168

Bug ID: 85168
   Summary: ICE in tree-ssa-coalesce.c: SSA corruption: Unable to
coalesce ssa_names which are marked as MUST COALESCE
when -O2 is used
   Product: gcc
   Version: 8.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: tree-optimization
  Assignee: unassigned at gcc dot gnu.org
  Reporter: ivo.raisr at oracle dot com
  Target Milestone: ---

Created attachment 43815
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=43815&action=edit
reproducer.c

With gcc 8.0.1 built recently from SVN, I receive internal compiler error: SSA
corruption when -O2 is used:


 void g(void) {
  ^
0xdcec2e fail_abnormal_edge_coalesce
../../src/gcc/tree-ssa-coalesce.c:1012
0xdcec2e coalesce_partitions
../../src/gcc/tree-ssa-coalesce.c:1401
0xdcec2e coalesce_ssa_name()
../../src/gcc/tree-ssa-coalesce.c:1888
0xd6450e remove_ssa_form
../../src/gcc/tree-outof-ssa.c:948
0xd6450e rewrite_out_of_ssa(ssaexpand*)
../../src/gcc/tree-outof-ssa.c:1174
0x8b2820 execute
../../src/gcc/cfgexpand.c:6227


The full source module is not publicly available. I have creduce'd it to the
following minimal form:

typedef struct {
  struct {
char a;
  } b;
} c;

int d, f;
c *e;

extern void i(void);

void g(void) {
  c *h = e;
  if (f) {
i();
h--;
if (d)
  if (h->b.a)
i();
  }
  if (h->b.a)
__builtin_setjmp(0);
  e = h;
}


The problem is reproducible with:
$ gcc -fdump-rtl-expand-details -O2 -c 
but not with:
$ gcc -fdump-rtl-expand-details -O1 -c 

[Bug middle-end/85139] [8 Regression] Spurious format truncation warning

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

Richard Biener  changed:

   What|Removed |Added

 Target|aarch64-bec-linux   |aarch64-bec-linux,
   ||x86_64-*-*
 Status|UNCONFIRMED |RESOLVED
 CC||msebor at gcc dot gnu.org
 Resolution|--- |INVALID

--- Comment #1 from Richard Biener  ---
Confirmed, but I think the warning is correct.  %04X will not truncate integer
values to 4 characters.

[Bug tree-optimization/85158] ubsan and -O3 finds a problem

2018-04-03 Thread rguenther at suse dot de
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85158

--- Comment #7 from rguenther at suse dot de  ---
On Tue, 3 Apr 2018, jakub at gcc dot gnu.org wrote:

> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85158
> 
> --- Comment #6 from Jakub Jelinek  ---
> As a middle-ground between ints, HOST_WIDE_INTs and unlimited precision we 
> have
> offset_int, widest_int etc.  But perhaps using even that would be too costly.

Not sure - we seem to get away with gmp in niter analysis just "fine".

What the current code misses if we don't go all the way to unlimited 
precision is a failure mode on overflow given overflow almost certainly
results in wrong-code with enough bad luck.

Anyway, IIRC we went to HWIs already to handle "most" cases, and yes,
the lambda_vector case is still "unfixed" at ints.  But what's still
missing is the failure mode...  (I fear that a hard assert will
trigger way too often...)

[Bug tree-optimization/85168] ICE in tree-ssa-coalesce.c: SSA corruption: Unable to coalesce ssa_names which are marked as MUST COALESCE when -O2 is used

2018-04-03 Thread ivo.raisr at oracle dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85168

Ivo Raisr  changed:

   What|Removed |Added

 CC||ivo.raisr at oracle dot com

--- Comment #1 from Ivo Raisr  ---
Debug output for rtl-expand shows:
...

Partition map 

Partition 0 (h_5(ab) - 5 )
Partition 1 (h_6(ab) - 6 )
Partition 2 (h_7 - 7 )
Partition 3 (h_12(ab) - 12 )
Partition 4 (h_14(ab) - 14 )
Partition 5 (h_20 - 20 )
Partition 6 (pretmp_21 - 21 )
Partition 7 (pretmp_22 - 22 )
Partition 8 (pretmp_23 - 23 )
Partition 9 (prephitmp_24 - 24 )


Conflict graph:
3: 4
4: 3

...

Abnormal coalesce: (6)h_6(ab) & (12)h_12(ab) [map: 1, 3] : Success -> 1
Abnormal coalesce: (6)h_6(ab) & (14)h_14(ab) [map: 1, 4] : Fail due to conflict


I am not sure if the conflict is because h_12 and h_14 are still live at the
same time or that h_7 and h_20 are not marked abnormal.

[Bug fortran/79854] diagnostics: gfc_conv_constant_to_tree should be gfc_internal_error

2018-04-03 Thread dominiq at lps dot ens.fr
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79854

--- Comment #4 from Dominique d'Humieres  ---
> Unless someone can trigger this error or can prove that gfc_internal_error
> is available when the error ought to trigger, then please leave the
> code as is.

Would not it be better to use

gcc_unreachable ();

as it is done in numerous places?

[Bug target/84762] GCC for PowerPC32 violates the SysV ABI spec for small struct returns

2018-04-03 Thread rguenther at suse dot de
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84762

--- Comment #9 from rguenther at suse dot de  ---
On Tue, 3 Apr 2018, segher at gcc dot gnu.org wrote:

> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84762
> 
> --- Comment #8 from Segher Boessenkool  ---
> It is.  This PR is about us not following the ABI.  On trunk this code
> is miscompiled; there is at least one other PR for that.

So this is a [8 Regression] then?  Please fill out known-to-work/fail
for me to more easily classify PRs.

[Bug libstdc++/85145] [8 Regression] include_next broken icw/ --with-gxx-include-dir

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

Richard Biener  changed:

   What|Removed |Added

 Target||mingw-w64
  Component|c++ |libstdc++
   Target Milestone|--- |8.0
Summary|GCC 8 regression:   |[8 Regression] include_next
   |include_next broken icw/|broken icw/
   |--with-gxx-include-dir  |--with-gxx-include-dir

--- Comment #1 from Richard Biener  ---
Using --with-gxx-include-dir works just fine for me with a native compiler.  I
suppose your setup is a cross?

[Bug c++/85134] [8 Regression] ICE with invalid constexpr in 'shared' OpenMP clause

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

--- Comment #1 from Jakub Jelinek  ---
Indeed, started with r258015.

[Bug c++/85133] [7/8 Regression] [concepts] ICE with invalid concept used in variadic template

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

Jakub Jelinek  changed:

   What|Removed |Added

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

--- Comment #1 from Jakub Jelinek  ---
Started with r238558, before it has been rejected with:
pr85133.C:1:33: error: variable concept has no initializer
 template concept bool C;
 ^
pr85133.C:5:6: error: template constraint failure
 A a;
  ^
pr85133.C:5:6: note:   constraints not satisfied
pr85133.C:5:6: note:   in the expansion of ‘C<  >...’
pr85133.C:5:6: note: ‘C’ was not satisfied

[Bug libstdc++/85145] [8 Regression] include_next broken icw/ --with-gxx-include-dir

2018-04-03 Thread jeroen at berkeley dot edu
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85145

--- Comment #2 from Jeroen Ooms  ---
I'm building mingw-w64 on msys2. Not sure if this counts as a cross. The full
build script is given in the Github repo mentioned above.

[Bug c++/85153] _Pragma to disable -Wswitch-unreachable diagnostic not properly working when used within preprocessor macro

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

Richard Biener  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2018-04-03
  Component|driver  |c++
 Ever confirmed|0   |1

--- Comment #3 from Richard Biener  ---
Confirmed.  Not sure what the exact limit is but some of the warnings can only
be disabled at function granularity and placing the pragmas in macros might
interfere with this.

[Bug c++/85156] [8 Regression] ICE with -O1 -g: gimplification failed

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

Jakub Jelinek  changed:

   What|Removed |Added

 CC||jakub at gcc dot gnu.org

--- Comment #2 from Jakub Jelinek  ---
Looks similar to PR84704, the STATEMENT_LIST is gimplified twice and as
gimplification is destructive, that can't really work well.

[Bug tree-optimization/85157] [parloops] Prevent canonicalize_loop_ivs failure in gen_parallel_loop

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

Richard Biener  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2018-04-03
 Ever confirmed|0   |1

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

[Bug c++/85159] if constexpr error about goto

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

--- Comment #1 from Richard Biener  ---
But is this really valid code?

[Bug other/85161] [8 regression] Test case failures in libbacktrace on powerpc64 BE starting with r253456

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

Richard Biener  changed:

   What|Removed |Added

   Priority|P3  |P1
   Target Milestone|--- |8.0

[Bug rtl-optimization/85160] GCC generates mvn/and instructions instead of bic on aarch64

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

Richard Biener  changed:

   What|Removed |Added

 CC||segher at gcc dot gnu.org
  Component|middle-end  |rtl-optimization
Version|unknown |8.0

--- Comment #1 from Richard Biener  ---
Yes, combine only tries multi-uses in limited circumstances.

[Bug testsuite/85154] [8 regression] gcc.dg/vect/vect-95.c fail

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

Richard Biener  changed:

   What|Removed |Added

 Status|UNCONFIRMED |ASSIGNED
   Last reconfirmed||2018-04-03
  Component|tree-optimization   |testsuite
   Target Milestone|--- |8.0
 Ever confirmed|0   |1

--- Comment #1 from Richard Biener  ---
silvermont?  *sigh*  --with-arch/cpu makes it really hard to invent testcase
guards.  pentium4, nocona, atom, slm, intel (but not core!) cost tables
are affected by maintaining higher unaligned load/store cost than aligned ones.

The x86 backend having so many tunings and different cost metrics don't make
it easy to fix the testcase.  Well, we can just remove that dump-scanning
altogether.

[Bug testsuite/85154] [8 regression] gcc.dg/vect/vect-95.c fail

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

--- Comment #2 from Richard Biener  ---
Author: rguenth
Date: Tue Apr  3 09:54:22 2018
New Revision: 259025

URL: https://gcc.gnu.org/viewcvs?rev=259025&root=gcc&view=rev
Log:
2018-04-03  Richard Biener  

PR testsuite/85154
* gcc.dg/vect/vect-95.c: Remove scan for alignment peeling.

Modified:
trunk/gcc/testsuite/ChangeLog
trunk/gcc/testsuite/gcc.dg/vect/vect-95.c

[Bug testsuite/85154] [8 regression] gcc.dg/vect/vect-95.c fail

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

Richard Biener  changed:

   What|Removed |Added

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

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

[Bug tree-optimization/85162] Vector extensions generating incorrect assembly

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

Richard Biener  changed:

   What|Removed |Added

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

--- Comment #2 from Richard Biener  ---
Invalid, vector comparison results are -1 and 0, not 1 and 0.

[Bug other/85123] [8 regression] test case gcc.dg/pr63594-2.c begins failing with r254862

2018-04-03 Thread segher at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85123

Segher Boessenkool  changed:

   What|Removed |Added

 Status|CLOSED  |REOPENED
 Resolution|DUPLICATE   |---

--- Comment #5 from Segher Boessenkool  ---
Reopening this one for the regression.  Let's keep PR84762 just for what
it was reported for: GCC is not compliant with the SYSV ABI for some things
(and never has been).

[Bug target/84762] GCC for PowerPC32 violates the SysV ABI spec for small struct returns

2018-04-03 Thread segher at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84762

--- Comment #10 from Segher Boessenkool  ---
I reopened PR85123 for the regression.  Let's keep this bug for purely
the SYSV ABI non-compliance.  This is not a regression (it is ancient).

[Bug c++/85156] [8 Regression] ICE with -O1 -g: gimplification failed

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

--- Comment #3 from Jakub Jelinek  ---
It is not just ICE, but also a wrong-code starting with GCC 4.3:
int x, y;

__attribute__((noipa)) int
foo (int z)
{
  if (__builtin_expect (x ? y != 0 : 0, z++))
return 7;
  return z;
}

int
main ()
{
  x = 1;
  asm volatile ("" : "+m" (x), "+m" (y));
  if (foo (10) != 11)
__builtin_abort ();
  return 0;
}

The side-effects of the second __builtin_expect argument are evaluated multiple
times.

[Bug tree-optimization/85168] ICE in tree-ssa-coalesce.c: SSA corruption: Unable to coalesce ssa_names which are marked as MUST COALESCE when -O2 is used

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

Richard Biener  changed:

   What|Removed |Added

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

--- Comment #2 from Richard Biener  ---
Confirmed.  I'll take a look.

[Bug tree-optimization/85156] [8 Regression] ICE with -O1 -g: gimplification failed

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

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 43816
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=43816&action=edit
gcc8-pr85156.patch

Untested fix.

[Bug c++/85114] -fstack-check causes internal compiler error

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

--- Comment #3 from Richard Biener  ---
Thanks, still can't reproduce here though.  Can you check whether netbsd has
any patches ontop of FSF 6.4.0?

[Bug c++/85134] [8 Regression] ICE with invalid constexpr in 'shared' OpenMP clause

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

Jakub Jelinek  changed:

   What|Removed |Added

 CC||jakub at gcc dot gnu.org

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

Untested fix.  The problem is in the early return from cp_finish_decl, we don't
emit then the DECL_EXPR that the OpenMP code relies on for VLAs.

[Bug tree-optimization/85168] [7/8 Regression] ICE in tree-ssa-coalesce.c: SSA corruption: Unable to coalesce ssa_names which are marked as MUST COALESCE when -O2 is used

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

Richard Biener  changed:

   What|Removed |Added

   Keywords||ice-on-valid-code
   Priority|P3  |P2
   Target Milestone|--- |7.4
Summary|ICE in tree-ssa-coalesce.c: |[7/8 Regression] ICE in
   |SSA corruption: Unable to   |tree-ssa-coalesce.c: SSA
   |coalesce ssa_names which|corruption: Unable to
   |are marked as MUST COALESCE |coalesce ssa_names which
   |when -O2 is used|are marked as MUST COALESCE
   ||when -O2 is used

--- Comment #3 from Richard Biener  ---
caused by code-hoisting but eventually latent.

[Bug target/85169] New: [8 Regression] wrong code with vector member insert

2018-04-03 Thread zsojka at seznam dot cz
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85169

Bug ID: 85169
   Summary: [8 Regression] wrong code with vector member insert
   Product: gcc
   Version: 8.0.1
Status: UNCONFIRMED
  Keywords: wrong-code
  Severity: normal
  Priority: P3
 Component: target
  Assignee: unassigned at gcc dot gnu.org
  Reporter: zsojka at seznam dot cz
  Target Milestone: ---
  Host: x86_64-pc-linux-gnu
Target: x86_64-pc-linux-gnu

Created attachment 43818
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=43818&action=edit
reduced testcase

This looks like a recent regression.

Output:
$ x86_64-pc-linux-gnu-gcc -Og -mavx512bw testcase.c
$ sde64 -- ./a.out
Aborted

The value of v[] is:
v = {0 , 1 }


$ x86_64-pc-linux-gnu-gcc -v
Using built-in specs.
COLLECT_GCC=/repo/gcc-trunk/binary-latest-amd64/bin/x86_64-pc-linux-gnu-gcc
COLLECT_LTO_WRAPPER=/repo/gcc-trunk/binary-trunk-259024-checking-yes-rtl-df-extra-amd64/bin/../libexec/gcc/x86_64-pc-linux-gnu/8.0.1/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: /repo/gcc-trunk//configure --enable-languages=c,c++
--enable-valgrind-annotations --disable-nls --enable-checking=yes,rtl,df,extra
--with-cloog --with-ppl --with-isl --build=x86_64-pc-linux-gnu
--host=x86_64-pc-linux-gnu --target=x86_64-pc-linux-gnu
--with-ld=/usr/bin/x86_64-pc-linux-gnu-ld
--with-as=/usr/bin/x86_64-pc-linux-gnu-as --disable-libstdcxx-pch
--prefix=/repo/gcc-trunk//binary-trunk-259024-checking-yes-rtl-df-extra-amd64
Thread model: posix
gcc version 8.0.1 20180403 (experimental) (GCC)

[Bug target/85170] New: ICE: in final_scan_insn_1, at final.c:3139 (error: could not split insn)

2018-04-03 Thread asolokha at gmx dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85170

Bug ID: 85170
   Summary: ICE: in final_scan_insn_1, at final.c:3139 (error:
could not split insn)
   Product: gcc
   Version: unknown
Status: UNCONFIRMED
  Keywords: ice-on-valid-code
  Severity: normal
  Priority: P3
 Component: target
  Assignee: unassigned at gcc dot gnu.org
  Reporter: asolokha at gmx dot com
  Target Milestone: ---
Target: powerpcspe-*-linux-gnu

gcc-8.0.0-alpha20180401 snapshot (r258999) ICEs when compiling the following
snippet w/ -O1 -fkeep-gc-roots-live -ftrapv -ftree-loop-vectorize
-fno-split-wide-types for a SPE target:

int
ae (int *ex, int ni)
{
  int it = 0;

  while (ni < 1)
{
  it += ex[ni];
  ++ni;
}

  return it;
}

% powerpc-e500v2-linux-gnuspe-gcc-8.0.0-alpha20180401 -O1 -fkeep-gc-roots-live
-ftrapv -ftree-loop-vectorize -fno-split-wide-types -c ywcbo250.c
ywcbo250.c: In function 'ae':
ywcbo250.c:13:1: error: could not split insn
 }
 ^
(insn 44 43 46 (set (reg:DI 28 28 [orig:195 vect__4.10 ] [195])
(mem:DI (plus:SI (reg/f:SI 26 26 [orig:172 vectp.9 ] [172])
(reg:SI 27 27 [orig:155 ivtmp.17 ] [155])) [0 MEM[base:
vectp.9_58, index: ivtmp.17_14, offset: 0B]+0 S8 A64])) 593 {*movdi_internal32}
 (nil))
during RTL pass: final
ywcbo250.c:13:1: internal compiler error: in final_scan_insn_1, at final.c:3139
0x54c424 _fatal_insn(char const*, rtx_def const*, char const*, int, char
const*)
   
/var/tmp/portage/cross-powerpc-e500v2-linux-gnuspe/gcc-8.0.0_alpha20180401/work/gcc-8-20180401/gcc/rtl-error.c:108
0x890bce final_scan_insn_1
   
/var/tmp/portage/cross-powerpc-e500v2-linux-gnuspe/gcc-8.0.0_alpha20180401/work/gcc-8-20180401/gcc/final.c:3139
0x890f37 final_scan_insn(rtx_insn*, _IO_FILE*, int, int, int*)
   
/var/tmp/portage/cross-powerpc-e500v2-linux-gnuspe/gcc-8.0.0_alpha20180401/work/gcc-8-20180401/gcc/final.c:3218
0x8910c7 final_1
   
/var/tmp/portage/cross-powerpc-e500v2-linux-gnuspe/gcc-8.0.0_alpha20180401/work/gcc-8-20180401/gcc/final.c:2088
0x891fe7 rest_of_handle_final
   
/var/tmp/portage/cross-powerpc-e500v2-linux-gnuspe/gcc-8.0.0_alpha20180401/work/gcc-8-20180401/gcc/final.c:4671
0x891fe7 execute
   
/var/tmp/portage/cross-powerpc-e500v2-linux-gnuspe/gcc-8.0.0_alpha20180401/work/gcc-8-20180401/gcc/final.c:4745

[Bug c++/85114] -fstack-check causes internal compiler error

2018-04-03 Thread tk at giga dot or.at
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85114

--- Comment #4 from Thomas Klausner  ---
Thank you for looking at this.

Yes, there are quite a number of changes in NetBSD's gcc:
http://danbala.tuwien.ac.at/~wiz/tmp/netbsd.gcc-6.4.0.diff.gz

(created by:
cd /usr/src/external/gpl3/gcc/dist
cvs diff -kk -rgcc-6-4-0)

The corresponding cvsweb path is:

http://cvsweb.netbsd.org/bsdweb.cgi/src/external/gpl3/gcc/dist/?only_with_tag=MAIN

if you want to investigate the reason for particular changes.

In addition, there is a separate build system used. You can find the Makefiles
at
http://cvsweb.netbsd.org/bsdweb.cgi/src/external/gpl3/gcc/?only_with_tag=MAIN
and below the lib and usr.bin directories.

[Bug rtl-optimization/80791] [8 regression] test case gcc.dg/sms-1.c fail2 starting with r247885

2018-04-03 Thread amker at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80791

--- Comment #14 from amker at gcc dot gnu.org ---
(In reply to Bill Schmidt from comment #13)
> Actually it appears that the IVOPTS change results in worse code going into
> SMS, regardless of whether SMS can succeed on the loop.  It comes down to
> the fact that IVOPTS formerly pulled a multiply (left-shift) out of the
> loop, but now the multiply remains in the loop.
> 
> After all the do_loop work and so forth, we end up with the following going
> into SMS.  The r247884 loop is on the left, r247885 on the right:
> 
> lab27:lab20:
>   r162, ca = r162 >> 1  r157, ca = r157 >> 1
>   r169 = r162 << 3  r163 = r157 << 3
> r166 = (r160 << 3) & 0xfff8
>   r171 = r177 + r164r167 = r172 + r166
>   *(r177 + r169) = r171 *(r172 + r163) = r167
>   r174 = (SI)r164 + 32  r169 = (SI)r160 + 4
>   r164 = zext(r174) r164 = sext(r169)
>   bdnz r178, lab27  bdnz r173, lab20
> 
> The loss of hoisting of the multiply/shift shows up in the optimized and
> vregs dumps as well; RTL optimizations aren't able to recover from this.
> 
> So I think this still comes down to an unfortunate choice made in IVOPTS.

According to comment #6, I think IVOPTs computed correct cost because
multiplication "_17 = _18 * 8;" is actually a bit-shift.

[Bug c++/85114] -fstack-check causes internal compiler error

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

Richard Biener  changed:

   What|Removed |Added

   Keywords||needs-reduction

--- Comment #5 from Richard Biener  ---
Not really - I suggest to file a bug to the netbsd folks.  Reducing the
testcase might also help, not sure.

[Bug target/85169] [8 Regression] wrong code with vector member insert

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

Jakub Jelinek  changed:

   What|Removed |Added

   Priority|P3  |P1
 Status|UNCONFIRMED |ASSIGNED
   Last reconfirmed||2018-04-03
 CC||jakub at gcc dot gnu.org
   Assignee|unassigned at gcc dot gnu.org  |jakub at gcc dot gnu.org
   Target Milestone|--- |8.0
 Ever confirmed|0   |1

[Bug target/85169] [8 Regression] wrong code with vector member insert

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

--- Comment #1 from Jakub Jelinek  ---
Created attachment 43819
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=43819&action=edit
gcc8-pr85169.patch

Untested fix.

[Bug c++/85153] _Pragma to disable -Wswitch-unreachable diagnostic not properly working when used within preprocessor macro

2018-04-03 Thread falemagn at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85153

--- Comment #4 from Fabio Alemagna  ---
@(In reply to Richard Biener from comment #3)
> Confirmed.  Not sure what the exact limit is but some of the warnings can
> only be disabled at function granularity and placing the pragmas in macros
> might interfere with this.

But the preprocessed output shows the #pragma's all at the expected place and
compiling the preprocessed output works as expected.

I only ever delved into gcc's innards in one of its old releases and don't know
if anything has changed meanwhile about this, but afaik the compiler always
works on the preprocessed output, and if this still holds true, how can it be
explained that invoking g++ on the un-preprocessed output produces a different
result than invoking it on the preprocessed output?

[Bug tree-optimization/85168] [7/8 Regression] ICE in tree-ssa-coalesce.c: SSA corruption: Unable to coalesce ssa_names which are marked as MUST COALESCE when -O2 is used

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

--- Comment #4 from Richard Biener  ---
Created attachment 43820
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=43820&action=edit
patch in testing

[Bug rtl-optimization/85167] shrink-wrap.c:333:15: runtime error with UBSAN

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

Jakub Jelinek  changed:

   What|Removed |Added

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

[Bug rtl-optimization/85167] [6/7/8 Regression] shrink-wrap.c:333:15: runtime error with UBSAN

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

Jakub Jelinek  changed:

   What|Removed |Added

   Priority|P3  |P2
   Target Milestone|--- |6.5
Summary|shrink-wrap.c:333:15:   |[6/7/8 Regression]
   |runtime error with UBSAN|shrink-wrap.c:333:15:
   ||runtime error with UBSAN

--- Comment #1 from Jakub Jelinek  ---
Started with r210457.

[Bug rtl-optimization/85167] [6/7/8 Regression] shrink-wrap.c:333:15: runtime error with UBSAN

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

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

Untested fix.

[Bug c++/85159] if constexpr error about goto

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

Jonathan Wakely  changed:

   What|Removed |Added

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

--- Comment #2 from Jonathan Wakely  ---
(In reply to Richard Biener from comment #1)
> But is this really valid code?

No.

"A label (9.1) declared in a substatement of a constexpr if
statement shall only be referred to by a statement (9.6.4) in the same
substatement."

[Bug c++/85171] New: generic lambda becomes recursive

2018-04-03 Thread nathan at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85171

Bug ID: 85171
   Summary: generic lambda becomes recursive
   Product: gcc
   Version: 8.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c++
  Assignee: unassigned at gcc dot gnu.org
  Reporter: nathan at gcc dot gnu.org
  Target Milestone: ---

Created attachment 43822
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=43822&action=edit
testcase

The attached testcase compiles without error, producing a recursive lambda.

During instanitation 'operator()' is looked up in the context of the lambda
type, and finds its synthesized template lambda::operator()(T)->int member
function.

The non-generic case fails to find operator() at parse time and errors out.

If this lambda was embedded in a class with its own operator(), I think that's
the one we should be finding.

I presume the parser's saving a raw identifier for the operator () and then we
do a lookup in tsubst.  That lookup should not look in the lambda hierarchy. 
If this was a non-lambda instantiation, we'd either find operator() in the
non-dependent hierarchy, and use that at instantiation time, or we'd find
nothing and look in the enclosing namespace scopes.  The wrinkle with generic
lambdas is that there could be enclosing non-namespace scopes of course.

[Bug libstdc++/80654] is_trivially_copy_constructible fails with compiler error with vector of uncopyable objects

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

--- Comment #10 from Jonathan Wakely  ---
(In reply to Frank Heckenbach from comment #8)
> (In reply to Ville Voutilainen from comment #7)
> > That's not a bug. You need to make the copy constructor of s conditionally
> > deleted depending on whether T is copyconstructible.
> 
> The copy constructor of std::vector doesn't seem to do that either
> (bits/stl_vector.h:326 in 7.3.0) unless I'm missing something.

It's impossible to do it for std::vector, because whether the vector is
copy-constructible depends on whether the value_type is CopyInsertable (**not**
copy-constructible) which depends on the allocator and is not known (or
knowable) at the right time, because std::vector allows its value_type to be
incomplete.

> Is that what Daniel Krügler meant by "not SFINAE-friendly"? But he also
> wrote: "This is a QoI issue but not a violation of the requirements of the
> standard.", so I'm confused now.

The standard doesn't say that std::vector has a conditionally deleted copy
constructor, so it doesn't require traits to give the right answer.

We could add partial specializations for std::vector> (where the
allocator behaviour is known) but we can't do it for std::vector or
std::vector, ArbitraryAllocator>.

[Bug inline-asm/85172] New: internal compiler error: unexpected expression '' of kind asm_expr

2018-04-03 Thread vegard.nossum at oracle dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85172

Bug ID: 85172
   Summary: internal compiler error: unexpected expression
'' of kind asm_expr
   Product: gcc
   Version: 8.0.1
Status: UNCONFIRMED
  Keywords: ice-on-valid-code
  Severity: normal
  Priority: P3
 Component: inline-asm
  Assignee: unassigned at gcc dot gnu.org
  Reporter: vegard.nossum at oracle dot com
  Target Milestone: ---

Input (valid code AFAICT):

int f() {
  return !__builtin_constant_p(({
asm("");
0;
  }));
}

Output:

$ cc1plus
 int f()
output/unexpected-expression.cc:5:5: internal compiler error: unexpected
expression '' of kind asm_expr
   }));
 ^
0xa38827 cxx_eval_constant_expression
/home/vegard/git/gcc/gcc/cp/constexpr.c:4786
0xa31d62 cxx_eval_constant_expression
/home/vegard/git/gcc/gcc/cp/constexpr.c:4423
0xa306a3 cxx_eval_statement_list
/home/vegard/git/gcc/gcc/cp/constexpr.c:3922
0xa306a3 cxx_eval_constant_expression
/home/vegard/git/gcc/gcc/cp/constexpr.c:4670
0xa5bc38 cxx_eval_builtin_function_call
/home/vegard/git/gcc/gcc/cp/constexpr.c:1189
0xa24598 cxx_eval_call_expression
/home/vegard/git/gcc/gcc/cp/constexpr.c:1496
0xa31c70 cxx_eval_constant_expression
/home/vegard/git/gcc/gcc/cp/constexpr.c:4200
0xa4b8ca cxx_eval_outermost_constant_expr
/home/vegard/git/gcc/gcc/cp/constexpr.c:4846
0xa591b6 maybe_constant_value(tree_node*, tree_node*)
/home/vegard/git/gcc/gcc/cp/constexpr.c:5063
0xab906a cp_fully_fold(tree_node*)
/home/vegard/git/gcc/gcc/cp/cp-gimplify.c:2071
0x13da147 cp_build_binary_op(unsigned int, tree_code, tree_node*, tree_node*,
int)
/home/vegard/git/gcc/gcc/cp/typeck.c:5391
0xae49c7 ocp_convert(tree_node*, tree_node*, int, int, int)
/home/vegard/git/gcc/gcc/cp/cvt.c:812
0xaec6ac cp_convert(tree_node*, tree_node*, int)
/home/vegard/git/gcc/gcc/cp/cvt.c:623
0xaec6ac cp_convert_and_check(tree_node*, tree_node*, int)
/home/vegard/git/gcc/gcc/cp/cvt.c:642
0x8e068f convert_like_real
/home/vegard/git/gcc/gcc/cp/call.c:7116
0x8e5c29 perform_implicit_conversion_flags(tree_node*, tree_node*, int, int)
/home/vegard/git/gcc/gcc/cp/call.c:10669
0x13c91f8 cp_build_unary_op(tree_code, tree_node*, bool, int)
/home/vegard/git/gcc/gcc/cp/typeck.c:6148
0x94399b build_new_op_1
/home/vegard/git/gcc/gcc/cp/call.c:6026
0x946036 build_new_op(unsigned int, tree_code, int, tree_node*, tree_node*,
tree_node*, tree_node**, int)
/home/vegard/git/gcc/gcc/cp/call.c:6058
0x13d000c build_x_unary_op(unsigned int, tree_code, cp_expr, int)
/home/vegard/git/gcc/gcc/cp/typeck.c:5601
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See  for instructions.

$ xgcc --version
xgcc (GCC) 8.0.1 20180322 (experimental)

6.3.0 generates code for "return 1", i.e. __builtin_constant_p() on an
expression containing an empty asm() returned 0 (which seems sensible, as I
don't think gcc should know anything about what is inside the asm string).

7.1.0 ICEs as well.

Test case was minimised by C-Reduce.

[Bug tree-optimization/84737] [8 Regression] 20% degradation in CPU2000 172.mgrid starting with r256888

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

Martin Liška  changed:

   What|Removed |Added

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

--- Comment #13 from Martin Liška  ---
I'm unassigning ..

[Bug c++/65923] False positive for warning about literal operator suffix and using

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

Jonathan Wakely  changed:

   What|Removed |Added

 CC||eric at efcs dot ca

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

[Bug c++/77999] GCC diagnoses usage of STL literal operators as invalid.

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

Jonathan Wakely  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |DUPLICATE

--- Comment #4 from Jonathan Wakely  ---
dup

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

[Bug c++/65923] False positive for warning about literal operator suffix and using

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

--- Comment #5 from Jonathan Wakely  ---
(In reply to Richard Geary from comment #2)
> This is still present in g++ 5.3.0, and also affects
> std::literals::string_literals. The flag -Wno-literal-suffix does not turn
> it off.

It does for GCC 7+, that was PR 69523 (which looks like a transposition of this
bug number, but isn't).

[Bug target/85173] New: ICE in in extract_insn, at recog.c:2304 for -fstack-clash-protection on ARM

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

Bug ID: 85173
   Summary: ICE in in extract_insn, at recog.c:2304 for
-fstack-clash-protection on ARM
   Product: gcc
   Version: unknown
Status: UNCONFIRMED
  Keywords: ice-on-valid-code
  Severity: normal
  Priority: P3
 Component: target
  Assignee: unassigned at gcc dot gnu.org
  Reporter: marxin at gcc dot gnu.org
CC: amker at gcc dot gnu.org, kyrylo.tkachov at arm dot com
  Target Milestone: ---
  Host: x86_64-pc-linux-gnu
Target: arm-linux-gnueabi

I see:

$ arm-linux-gnueabi-gcc
/home/marxin/Programming/gcc/gcc/testsuite/gcc.dg/stack-check-3.c /dev/null
--param stack-clash-protection-probe-interval=14 -fstack-clash-protection

0xdeadbeef _fatal_insn(char const*, rtx_def const*, char const*, int, char
const*)
.././../gcc/rtl-error.c:108
0xdeadbeef _fatal_insn_not_found(rtx_def const*, char const*, int, char const*)
.././../gcc/rtl-error.c:116
0xdeadbeef extract_insn(rtx_insn*)
.././../gcc/recog.c:2304
0xdeadbeef instantiate_virtual_regs_in_insn
.././../gcc/function.c:1599
0xdeadbeef instantiate_virtual_regs
.././../gcc/function.c:1969
0xdeadbeef execute
.././../gcc/function.c:2018

[Bug c++/85171] generic lambda becomes recursive

2018-04-03 Thread nathan at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85171

--- Comment #1 from Nathan Sidwell  ---
Created attachment 43823
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=43823&action=edit
member fn example

The second example shows the case inside a member fn, with ok and bad cases. 
X::ok calls X::operator(), X::bad recurses

[Bug middle-end/85090] [8 Regression] wrong code with -O2 -fno-tree-dominator-opts -mavx512f -fira-algorithm=priority

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

Jakub Jelinek  changed:

   What|Removed |Added

 CC|jakub at redhat dot com|

--- Comment #9 from Jakub Jelinek  ---
Vlad, do you think you could look at the IRA issue (with the above patch
reverted)?

[Bug c++/85128] Local scope type(def) falsely assumed to change meaning of outer scope type(def)

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

--- Comment #11 from Jonathan Wakely  ---
(In reply to Steffen Nurpmeso from comment #3)
> And despite absolutely idiotic C++ "improvements" like obsoleting the "auto"
> keyword and introducing override (yes) as a declaration suffix (no) that i
> had to fix

Or you could compile with -std=c++98

> (we had override, as a macro that expanded to virtual)

Yuck.

[Bug bootstrap/64914] [UBSAN/bootstrap-ubsan] With -g3: libiberty/md5.c:336:7: runtime error: load of misaligned address for type 'const md5_uint32', which requires 4 byte alignment

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

Martin Liška  changed:

   What|Removed |Added

   Target Milestone|--- |9.0

--- Comment #3 from Martin Liška  ---
Patch candidate:
https://gcc.gnu.org/ml/gcc-patches/2018-03/msg00022.html

[Bug target/71991] Inconsistency for __attribute__ ((__always_inline__)) among LTO and non-LTO compilation

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

Martin Liška  changed:

   What|Removed |Added

   Target Milestone|--- |8.0

[Bug c++/85127] Members implementation outside class doesn't compile if class name is an alias from a using

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

--- Comment #2 from Jonathan Wakely  ---
EDG rejects it too:

"us.cc", line 11: error: template argument list must match the parameter list
  void B::foo() {
   ^

1 error detected in the compilation of "us.cc".


I'm not aware of any rule making this invalid, so I agree it should be
accepted.

[Bug c++/85125] constant expression with const_cast UB does not emit error

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

Jonathan Wakely  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2018-04-03
 Ever confirmed|0   |1

--- Comment #1 from Jonathan Wakely  ---
N.B. GCC 5.x releases are no longer supported, but this bug is still present in
current releases.

[Bug c++/85118] [6/7/8 Regression] Error when using std::bind with a generic lambda - "cannot bind 'const volatile char&' to an rvalue of type 'const volatile char'"

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

--- Comment #2 from Jonathan Wakely  ---
Ugh, this again. I've battled with this when working on the implementation of
std::bind. I'll try to reduce it to something independent of the library
headers.

[Bug middle-end/64327] ../../gcc/gcc/rtlanal.c:4881:48: runtime error: shift exponent 4294967295 is too large for 64-bit type 'long unsigned int'

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

Martin Liška  changed:

   What|Removed |Added

 Status|WAITING |NEW
  Known to work||7.3.0, 8.0
  Known to fail||6.4.0

--- Comment #10 from Martin Liška  ---
Ok, so let's close it when GCC-6 will be closed.

[Bug preprocessor/78497] compiling with -save-temps adds -Wimplicit-fallthrough warnings

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

Martin Liška  changed:

   What|Removed |Added

   Target Milestone|--- |8.0

[Bug sanitizer/85174] New: c-c++-common/asan/pointer-compare-1.c does not work for powerpc with sdata

2018-04-03 Thread segher at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85174

Bug ID: 85174
   Summary: c-c++-common/asan/pointer-compare-1.c does not work
for powerpc with sdata
   Product: gcc
   Version: unknown
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: sanitizer
  Assignee: unassigned at gcc dot gnu.org
  Reporter: segher at gcc dot gnu.org
CC: dodji at gcc dot gnu.org, dvyukov at gcc dot gnu.org,
jakub at gcc dot gnu.org, kcc at gcc dot gnu.org, marxin at 
gcc dot gnu.org
  Target Milestone: ---

Specifically, these two tests fail:

  /* { dg-output "ERROR: AddressSanitizer: invalid-pointer-pair.*" } */
  foo (p - 1, p);
  /* { dg-output "ERROR: AddressSanitizer: invalid-pointer-pair.*" } */
  foo (p, p - 1);

where
  char *p = &small_global[0];

and that is
  char small_global[7] = {};

Adding -mdata=none makes it all work; but should asan handle this?

[Bug tree-optimization/85175] New: [8 regression] false-positive -Wformat-overflow= warning with gcc-8 -Os

2018-04-03 Thread arnd at linaro dot org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85175

Bug ID: 85175
   Summary: [8 regression] false-positive -Wformat-overflow=
warning with gcc-8 -Os
   Product: gcc
   Version: 8.0.1
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: tree-optimization
  Assignee: unassigned at gcc dot gnu.org
  Reporter: arnd at linaro dot org
  Target Milestone: ---

This snippet from the Linux kernel produces a bogus warning when built with gcc
-Os, using a recent snapshot (20180402) A two months older version did not
produce the warning, and building with -O2 is also fine. Reduced test case:

$ gcc-8.0.1 -Os -Wall -c test.c

int of_property_read_u32(int *out_value);
int imx_ldb_bind(void)
{
int i;
for (i = 0; i < 4; i++) {
char clkname[16];
__builtin_sprintf(clkname, "di%d_sel", i);
}
return of_property_read_u32(&i);
}

imx-ldb.i: In function 'imx_ldb_bind':
imx-ldb.i:7:35: warning: '_sel' directive writing 4 bytes into a region of size
between 3 and 13 [-Wformat-overflow=]
   __builtin_sprintf(clkname, "di%d_sel", i);

[Bug tree-optimization/85175] [8 regression] false-positive -Wformat-overflow= warning with gcc-8 -Os

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

Richard Biener  changed:

   What|Removed |Added

   Target Milestone|--- |8.0

[Bug target/85169] [8 Regression] wrong code with vector member insert

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

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

[Bug middle-end/85123] [8 regression] test case gcc.dg/pr63594-2.c begins failing with r254862

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

Richard Biener  changed:

   What|Removed |Added

   Keywords||wrong-code
   Priority|P3  |P1
  Component|other   |middle-end
   Target Milestone|--- |8.0

  1   2   3   >