[Bug c/83696] New: false positive warning when [[fallthrough]] is inside of if statement

2018-01-04 Thread shyou...@ruby-lang.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83696

Bug ID: 83696
   Summary: false positive warning when [[fallthrough]] is inside
of if statement
   Product: gcc
   Version: 7.2.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c
  Assignee: unassigned at gcc dot gnu.org
  Reporter: shyou...@ruby-lang.org
  Target Milestone: ---

Created attachment 43038
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=43038&action=edit
reproducible code

It seems [[fallthrough]] does not take effect when it is inside of an if
statement who has || in the expression.

% cat tmp.cpp
#pragma GCC diagnostic error "-Wimplicit-fallthrough"

int
func(int i, int j)
{
switch (i) {
case 0:
if ( i || j )
return 1;
else
[[fallthrough]];
default:
return 0;
}
}
% gcc-7 -v -std=c++17 tmp.cpp
Using built-in specs.
COLLECT_GCC=gcc-7
COLLECT_LTO_WRAPPER=/usr/local/Cellar/gcc/7.2.0/libexec/gcc/x86_64-apple-darwin15.6.0/7.2.0/lto-wrapper
Target: x86_64-apple-darwin15.6.0
Configured with: ../configure --build=x86_64-apple-darwin15.6.0
--prefix=/usr/local/Cellar/gcc/7.2.0
--libdir=/usr/local/Cellar/gcc/7.2.0/lib/gcc/7
--enable-languages=c,c++,objc,obj-c++,fortran --program-suffix=-7
--with-gmp=/usr/local/opt/gmp --with-mpfr=/usr/local/opt/mpfr
--with-mpc=/usr/local/opt/libmpc --with-isl=/usr/local/opt/isl
--with-system-zlib --enable-checking=release --with-pkgversion='Homebrew GCC
7.2.0' --with-bugurl=https://github.com/Homebrew/homebrew-core/issues
--disable-nls
Thread model: posix
gcc version 7.2.0 (Homebrew GCC 7.2.0)
COLLECT_GCC_OPTIONS='-v' '-std=c++1z' '-mmacosx-version-min=10.11.6'
'-asm_macosx_version_min=10.11' '-mtune=core2'

/usr/local/Cellar/gcc/7.2.0/libexec/gcc/x86_64-apple-darwin15.6.0/7.2.0/cc1plus
-quiet -v -D__DYNAMIC__ tmp.cpp -fPIC -quiet -dumpbase tmp.cpp
-mmacosx-version-min=10.11.6 -mtune=core2 -auxbase tmp -std=c++1z -version -o
/var/folders/50/9ss08lxs5ml7kvz614tr3_wmm17741/T//cc2RNpgL.s
GNU C++14 (Homebrew GCC 7.2.0) version 7.2.0 (x86_64-apple-darwin15.6.0)
compiled by GNU C version 7.2.0, GMP version 6.1.2, MPFR version 3.1.5,
MPC version 1.0.3, isl version isl-0.18-GMP

warning: MPFR header version 3.1.5 differs from library version 3.1.6.
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
ignoring nonexistent directory
"/usr/local/Cellar/gcc/7.2.0/lib/gcc/7/gcc/x86_64-apple-darwin15.6.0/7.2.0/../../../../../../x86_64-apple-darwin15.6.0/include"
#include "..." search starts here:
#include <...> search starts here:

/usr/local/Cellar/gcc/7.2.0/lib/gcc/7/gcc/x86_64-apple-darwin15.6.0/7.2.0/../../../../../../include/c++/7.2.0

/usr/local/Cellar/gcc/7.2.0/lib/gcc/7/gcc/x86_64-apple-darwin15.6.0/7.2.0/../../../../../../include/c++/7.2.0/x86_64-apple-darwin15.6.0

/usr/local/Cellar/gcc/7.2.0/lib/gcc/7/gcc/x86_64-apple-darwin15.6.0/7.2.0/../../../../../../include/c++/7.2.0/backward

/usr/local/Cellar/gcc/7.2.0/lib/gcc/7/gcc/x86_64-apple-darwin15.6.0/7.2.0/include
 /usr/local/include
 /usr/local/Cellar/gcc/7.2.0/include

/usr/local/Cellar/gcc/7.2.0/lib/gcc/7/gcc/x86_64-apple-darwin15.6.0/7.2.0/include-fixed
 /usr/include
 /System/Library/Frameworks
 /Library/Frameworks
End of search list.
GNU C++14 (Homebrew GCC 7.2.0) version 7.2.0 (x86_64-apple-darwin15.6.0)
compiled by GNU C version 7.2.0, GMP version 6.1.2, MPFR version 3.1.5,
MPC version 1.0.3, isl version isl-0.18-GMP

warning: MPFR header version 3.1.5 differs from library version 3.1.6.
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
Compiler executable checksum: 91ccd58de1ec407f356a7036de6130ed
tmp.cpp: In function 'int func(int, int)':
tmp.cpp:8:16: error: this statement may fall through
[-Werror=implicit-fallthrough=]
 if ( i || j )
  ~~^~~~
tmp.cpp:12:5: note: here
 default:
 ^~~
cc1plus: some warnings being treated as errors
[1]78552 exit 1 gcc-7 -v -std=c++17 tmp.cpp
zsh %

[Bug tree-optimization/83685] [8 Regression] ICE: SSA corruption

2018-01-04 Thread pinskia at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83685

Andrew Pinski  changed:

   What|Removed |Added

  Component|middle-end  |tree-optimization
   Target Milestone|--- |8.0

[Bug c++/83690] [8 regression] spurious unused variable warings for variables used only in static_assert

2018-01-04 Thread pinskia at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83690

Andrew Pinski  changed:

   What|Removed |Added

   Keywords||diagnostic
   Target Milestone|--- |8.0

[Bug target/83680] [8 regression] Numerous regressions on arm since r256093

2018-01-04 Thread pinskia at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83680

Andrew Pinski  changed:

   What|Removed |Added

   Keywords||wrong-code
  Component|middle-end  |target
   Target Milestone|--- |8.0

[Bug other/83694] New test case gcc.dg/pr83666.c from r256232 ICEs

2018-01-04 Thread ro at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83694

Rainer Orth  changed:

   What|Removed |Added

 Target|powerpc64*-*-*  |powerpc64*-*-*, sparc*-*-*
 Status|UNCONFIRMED |NEW
   Last reconfirmed||2018-01-05
 CC||ro at gcc dot gnu.org
   Host|powerpc64*-*-*  |powerpc64*-*-*, sparc*-*-*
   Target Milestone|--- |8.0
Summary|New test case   |New test case
   |gcc.dg/pr83666.c from   |gcc.dg/pr83666.c from
   |r256232 ICEs on powerpc64   |r256232 ICEs
 Ever confirmed|0   |1
  Build|powerpc64*-*-*  |powerpc64*-*-*, sparc*-*-*

--- Comment #1 from Rainer Orth  ---
Also on SPARC.

[Bug target/83682] [8 Regression] ICE in simplify_subreg, at simplify-rtx.c:6296

2018-01-04 Thread pinskia at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83682

Andrew Pinski  changed:

   What|Removed |Added

  Component|c   |target
   Target Milestone|--- |8.0

[Bug middle-end/83684] [8 Regression] ICE in maybe_diag_overlap, at gimple-ssa-warn-restrict.c:1371

2018-01-04 Thread pinskia at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83684

Andrew Pinski  changed:

   What|Removed |Added

   Keywords||diagnostic,
   ||ice-on-valid-code
   Target Milestone|--- |8.0
Summary|[5 Regression] ICE in   |[8 Regression] ICE in
   |maybe_diag_overlap, at  |maybe_diag_overlap, at
   |gimple-ssa-warn-restrict.c: |gimple-ssa-warn-restrict.c:
   |1371|1371

[Bug tree-optimization/83695] New: ICE on valid code at -O3: Segmentation fault

2018-01-04 Thread su at cs dot ucdavis.edu
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83695

Bug ID: 83695
   Summary: ICE on valid code at -O3: Segmentation fault
   Product: gcc
   Version: unknown
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: tree-optimization
  Assignee: unassigned at gcc dot gnu.org
  Reporter: su at cs dot ucdavis.edu
  Target Milestone: ---

This appears to be a recent regression. 

$ gcctk -v
Using built-in specs.
COLLECT_GCC=gcctk
COLLECT_LTO_WRAPPER=/home/su/software/tmp/gcc/gcc-trunk/libexec/gcc/x86_64-pc-linux-gnu/8.0.0/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: ../gcc-source-trunk/configure --enable-languages=c,c++,lto
--prefix=/home/su/software/tmp/gcc/gcc-trunk --disable-bootstrap
Thread model: posix
gcc version 8.0.0 20180105 (experimental) [trunk revision 256272] (GCC) 
$ 
$ gcctk -O2 small.c
$ gcc-7.2.0 -O3 small.c
$ 
$ gcctk -O3 small.c
during GIMPLE pass: linterchange
small.c: In function ‘main’:
small.c:15:5: internal compiler error: Segmentation fault
 int main ()
 ^~~~
0xc8fd6f crash_signal
../../gcc-source-trunk/gcc/toplev.c:325
0xd89984 instantiate_scev_r
../../gcc-source-trunk/gcc/tree-scalar-evolution.c:2720
0xd89e6b instantiate_scev_convert
../../gcc-source-trunk/gcc/tree-scalar-evolution.c:2611
0xd89e6b instantiate_scev_r
../../gcc-source-trunk/gcc/tree-scalar-evolution.c:2747
0xd8a7f5 instantiate_scev(edge_def*, loop*, tree_node*)
../../gcc-source-trunk/gcc/tree-scalar-evolution.c:2806
0xe1dc46 instantiate_parameters
../../gcc-source-trunk/gcc/tree-scalar-evolution.h:63
0xe1dc46 infer_loop_bounds_from_signedness
../../gcc-source-trunk/gcc/tree-ssa-loop-niter.c:3498
0xe1dc46 infer_loop_bounds_from_undefined
../../gcc-source-trunk/gcc/tree-ssa-loop-niter.c:3561
0xe22854 estimate_numbers_of_iterations(loop*)
../../gcc-source-trunk/gcc/tree-ssa-loop-niter.c:3943
0xe2425f estimate_numbers_of_iterations(loop*)
../../gcc-source-trunk/gcc/tree-ssa-loop-niter.c:4427
0xe2425f loop_exits_before_overflow
../../gcc-source-trunk/gcc/tree-ssa-loop-niter.c:4328
0xe24760 scev_probably_wraps_p(tree_node*, tree_node*, tree_node*, gimple*,
loop*, bool)
../../gcc-source-trunk/gcc/tree-ssa-loop-niter.c:4580
0x1502ec7 convert_affine_scev(loop*, tree_node*, tree_node**, tree_node**,
gimple*, bool, tree_node*)
../../gcc-source-trunk/gcc/tree-chrec.c:1262
0x1503424 chrec_convert_1
../../gcc-source-trunk/gcc/tree-chrec.c:1348
0xd8bf27 interpret_rhs_expr
../../gcc-source-trunk/gcc/tree-scalar-evolution.c:1930
0xd88dfe interpret_gimple_assign
../../gcc-source-trunk/gcc/tree-scalar-evolution.c:2002
0xd88dfe analyze_scalar_evolution_1
../../gcc-source-trunk/gcc/tree-scalar-evolution.c:2051
0xd88b1e analyze_scalar_evolution_1
../../gcc-source-trunk/gcc/tree-scalar-evolution.c:2039
0xd896b9 analyze_scalar_evolution(loop*, tree_node*)
../../gcc-source-trunk/gcc/tree-scalar-evolution.c:2111
0xe1dc29 infer_loop_bounds_from_signedness
../../gcc-source-trunk/gcc/tree-ssa-loop-niter.c:3498
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See  for instructions.
$ 





int a[3][3][3], b, d;
short c;
unsigned char e;

static void f ()
{
  for (c = 0; c < 2; c++)
  for (e = 0; e < 3; e++)
for (b = 0; b < 3; b++)
  a[b][e][b] = 0;
  while (1)
;
}

int main ()
{
  if (d)
f ();
  return 0;
}

[Bug ipa/82801] [6 Regression] Internal compiler error with Eigen and __attribute__((always_inline, flatten))

2018-01-04 Thread gcc-bugs at marehr dot dialup.fu-berlin.de
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82801

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

   What|Removed |Added

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

--- Comment #10 from gcc-bugs at marehr dot dialup.fu-berlin.de ---
Hi,

I did built gcc from git sources
[https://github.com/gcc-mirror/gcc/commit/156d24841, gcc version 8.0.0 20171215
(experimental) (GCC)] today and ran into the same? error.

I could extract this minimal code snippet from our code base that does not work
with g++-8, but with gcc version 7.2.1 20171128 (GCC).

```
class a {};
class b {};
class c : b, a {
  __attribute__((always_inline)) c operator=(c);
};
```

~~~
Error log:

internal compiler error: Segmentation fault
   __attribute__((always_inline)) c operator=(c);
   ^
0xc0092f crash_signal
/home/marehr/Packages/gcc-git/src/gcc/gcc/toplev.c:325
0x828832 cxx11_attribute_p(tree_node const*)
/home/marehr/Packages/gcc-git/src/gcc/gcc/attribs.c:802
0x828832 get_attribute_name(tree_node const*)
/home/marehr/Packages/gcc-git/src/gcc/gcc/attribs.c:817
0x828832 private_lookup_attribute(char const*, unsigned long, tree_node*)
/home/marehr/Packages/gcc-git/src/gcc/gcc/attribs.c:1778
0x828953 lookup_attribute
/home/marehr/Packages/gcc-git/src/gcc/gcc/attribs.h:172
0x828953 diag_attr_exclusions
/home/marehr/Packages/gcc-git/src/gcc/gcc/attribs.c:410
0x828ae9 diag_attr_exclusions
/home/marehr/Packages/gcc-git/src/gcc/gcc/attribs.c:378
0x829f82 decl_attributes(tree_node**, tree_node*, int, tree_node*)
/home/marehr/Packages/gcc-git/src/gcc/gcc/attribs.c:702
0x7422bc cplus_decl_attributes(tree_node**, tree_node*, int)
/home/marehr/Packages/gcc-git/src/gcc/gcc/cp/decl2.c:1508
0x72fd62 grokfndecl
/home/marehr/Packages/gcc-git/src/gcc/gcc/cp/decl.c:8844
0x73dc6d grokdeclarator(cp_declarator const*, cp_decl_specifier_seq*,
decl_context, int, tree_node**)
/home/marehr/Packages/gcc-git/src/gcc/gcc/cp/decl.c:11987
0x745342 grokfield(cp_declarator const*, cp_decl_specifier_seq*, tree_node*,
bool, tree_node*, tree_node*)
/home/marehr/Packages/gcc-git/src/gcc/gcc/cp/decl2.c:829
0x79e34e cp_parser_member_declaration
/home/marehr/Packages/gcc-git/src/gcc/gcc/cp/parser.c:23842
0x79f16a cp_parser_member_specification_opt
/home/marehr/Packages/gcc-git/src/gcc/gcc/cp/parser.c:23316
0x79f16a cp_parser_class_specifier_1
/home/marehr/Packages/gcc-git/src/gcc/gcc/cp/parser.c:22458
0x7a0bf9 cp_parser_class_specifier
/home/marehr/Packages/gcc-git/src/gcc/gcc/cp/parser.c:22710
0x7a0bf9 cp_parser_type_specifier
/home/marehr/Packages/gcc-git/src/gcc/gcc/cp/parser.c:16718
0x7acad5 cp_parser_decl_specifier_seq
/home/marehr/Packages/gcc-git/src/gcc/gcc/cp/parser.c:13579
0x7b1c90 cp_parser_simple_declaration
/home/marehr/Packages/gcc-git/src/gcc/gcc/cp/parser.c:12888
0x7b2bf8 cp_parser_block_declaration
/home/marehr/Packages/gcc-git/src/gcc/gcc/cp/parser.c:12835

[Bug fortran/45689] [F03] Missing transformational intrinsic in the trans_func_f2003 list

2018-01-04 Thread dominiq at lps dot ens.fr
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=45689
Bug 45689 depends on bug 47988, which changed state.

Bug 47988 Summary: ICE: in reload_cse_simplify_operands, at postreload.c:403: 
insn does not satisfy its constraints
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=47988

   What|Removed |Added

 Status|WAITING |RESOLVED
 Resolution|--- |FIXED

[Bug target/47988] ICE: in reload_cse_simplify_operands, at postreload.c:403: insn does not satisfy its constraints

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

Dominique d'Humieres  changed:

   What|Removed |Added

 Status|WAITING |RESOLVED
 Resolution|--- |FIXED

--- Comment #3 from Dominique d'Humieres  ---
I have tested gfortran.dg/cshift_large_1.f90 with/without the options in
comment 0 without any problem from 4.8 up to trunk. Closing as FIXED.

BTW I think expected values after cshift in the attached test are wrong.

[Bug libstdc++/83626] std::experimental::filesystem::remove_all throws exception instead of returning 0 if path doesn't exist

2018-01-04 Thread chillermillerlong at hotmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83626

--- Comment #4 from Andrew Gunnerson  ---
Thanks for the quick fix!

[Bug tree-optimization/83693] missing strlen optimization for array of arrays

2018-01-04 Thread msebor at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83693

Martin Sebor  changed:

   What|Removed |Added

   Keywords||missed-optimization

--- Comment #1 from Martin Sebor  ---
Here's another test case with structs.

const struct {
  char a[4];
} a[] = { { "0" }, { "01" } };

const struct {
  char a[5];
} b[][2] = { { { "0" }, { "01" } }, { { "012" }, { "0123" } } };

void f (void)
{
  if (__builtin_strlen (a[1].a) != 2)
__builtin_abort ();
}

void g (void)
{
  if (__builtin_strlen (b[1][1].a) != 4)
__builtin_abort ();
}

[Bug fortran/83622] [8 Regression] Wrong code with derived type and -fopenmp

2018-01-04 Thread paul.richard.thomas at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83622

--- Comment #6 from paul.richard.thomas at gmail dot com  ---
That's what I have been trying to find out :-)

It's jogging my memory but I cannot for the life of me rememeber what
it was about.

Paul


On 4 January 2018 at 22:00, anlauf at gmx dot de
 wrote:
> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83622
>
> --- Comment #5 from Harald Anlauf  ---
> trans-array.c has:
>
> /* Returns true if the expression is an array pointer.  */
>
> static bool
> is_pointer_array (tree expr)
> {
>   if (flag_openmp)
> return false;
>
> [...]
>
> Is there a reason behind this?
>
> --
> You are receiving this mail because:
> You are on the CC list for the bug.
> You are the assignee for the bug.

[Bug libstdc++/83566] cyl_bessel_j returns wrong result for x>1000 for high orders.

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

Jonathan Wakely  changed:

   What|Removed |Added

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

[Bug c++/83555] Unnecessary null check when static_cast is used with references.

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

Jonathan Wakely  changed:

   What|Removed |Added

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

[Bug libstdc++/83607] std::boyer_moore_searcher is slow searching through arrays of std::byte

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

--- Comment #6 from Jonathan Wakely  ---
Fixed on trunk so far.

[Bug libstdc++/83626] std::experimental::filesystem::remove_all throws exception instead of returning 0 if path doesn't exist

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

--- Comment #3 from Jonathan Wakely  ---
Fixed on trunk so far.

[Bug other/83694] New: New test case gcc.dg/pr83666.c from r256232 ICEs on powerpc64

2018-01-04 Thread seurer at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83694

Bug ID: 83694
   Summary: New test case gcc.dg/pr83666.c from r256232 ICEs on
powerpc64
   Product: gcc
   Version: 8.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: ---

This happens on both BE and LE.  Don't think it's been reported yet elsewhere.

spawn -ignore SIGHUP /home/seurer/gcc/build/gcc-test2/gcc/xgcc
-B/home/seurer/gcc/build/gcc-test2/gcc/
/home/seurer/gcc/gcc-test2/gcc/testsuite/gcc.dg/pr83666.c
-fno-diagnostics-show-caret -fdiagnostics-color=never -O2 -g
--param=sccvn-max-scc-size=10 -Wno-psabi -S -o pr83666.s
during RTL pass: expand
/home/seurer/gcc/gcc-test2/gcc/testsuite/gcc.dg/pr83666.c: In function 'foo':
/home/seurer/gcc/gcc-test2/gcc/testsuite/gcc.dg/pr83666.c:25:1: internal
compiler error: in smallest_mode_for_size, at stor-layout.c:355
0x1099eb0b smallest_mode_for_size(poly_int<1u, unsigned long>, mode_class)
/home/seurer/gcc/gcc-test2/gcc/stor-layout.c:355
0x103b5b3f smallest_int_mode_for_size(poly_int<1u, unsigned long>)
/home/seurer/gcc/gcc-test2/gcc/machmode.h:842
0x103b5b3f expand_debug_expr
/home/seurer/gcc/gcc-test2/gcc/cfgexpand.c:4538
0x103c27d3 expand_debug_locations
/home/seurer/gcc/gcc-test2/gcc/cfgexpand.c:5371
0x103c27d3 execute
/home/seurer/gcc/gcc-test2/gcc/cfgexpand.c:6415

[Bug libstdc++/83626] std::experimental::filesystem::remove_all throws exception instead of returning 0 if path doesn't exist

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

--- Comment #2 from Jonathan Wakely  ---
Author: redi
Date: Thu Jan  4 22:58:59 2018
New Revision: 256269

URL: https://gcc.gnu.org/viewcvs?rev=256269&root=gcc&view=rev
Log:
PR libstdc++/83626 Don't throw for remove("") and remove_all("")

PR libstdc++/83626
* src/filesystem/ops.cc (remove(const path&, error_code&))): Remove
redundant call to ec.clear().
(remove_all(const path&, error_code&))): Do not return an error for
non-existent paths.
* src/filesystem/std-ops.cc: Likewise.
* testsuite/27_io/filesystem/operations/remove.cc: New test.
* testsuite/27_io/filesystem/operations/remove_all.cc: Fix expected
results for non-existent paths.
* testsuite/experimental/filesystem/operations/remove.cc: New test.
* testsuite/experimental/filesystem/operations/remove_all.cc: Fix
expected results for non-existent paths.

Added:
trunk/libstdc++-v3/testsuite/27_io/filesystem/operations/remove.cc
  - copied, changed from r256243,
trunk/libstdc++-v3/testsuite/27_io/filesystem/operations/remove_all.cc
trunk/libstdc++-v3/testsuite/experimental/filesystem/operations/remove.cc
  - copied, changed from r256243,
trunk/libstdc++-v3/testsuite/experimental/filesystem/operations/remove_all.cc
Modified:
trunk/libstdc++-v3/ChangeLog
trunk/libstdc++-v3/src/filesystem/ops.cc
trunk/libstdc++-v3/src/filesystem/std-ops.cc
trunk/libstdc++-v3/testsuite/27_io/filesystem/operations/remove_all.cc
   
trunk/libstdc++-v3/testsuite/experimental/filesystem/operations/remove_all.cc

[Bug tree-optimization/83693] New: missing strlen optimization for array of arrays

2018-01-04 Thread msebor at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83693

Bug ID: 83693
   Summary: missing strlen optimization for array of arrays
   Product: gcc
   Version: 8.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: tree-optimization
  Assignee: unassigned at gcc dot gnu.org
  Reporter: msebor at gcc dot gnu.org
  Target Milestone: ---

The strlen optimization is ineffective for constant arrays of arrays like in
the case of b and c below.  It looks like the string_constant() function in
expr.c that strlen relies on isn't equipped handle multi-dimensional arrays.

$ cat z.c && gcc -O2 -S -Wall -fdump-tree-optimized=/dev/stdout z.c
const char a[4] = "012";
const char b[][4] = { "012", "234" };
const char c[][2][4] = { { "012", "234" }, { "345", "456" } };

void f0 (void)
{
  if (__builtin_strlen (a) != 3)   // folded
__builtin_abort ();
}

void f1 (void)
{
  if (__builtin_strlen (b[1]) != 3)   // not folded
__builtin_abort ();
}

void f2 (void)
{
  if (__builtin_strlen (c[1][1]) != 3)   // not folded
__builtin_abort ();
}


;; Function f0 (f0, funcdef_no=0, decl_uid=1955, cgraph_uid=0, symbol_order=3)

f0 ()
{
   [local count: 1073741825]:
  return;

}



;; Function f1 (f1, funcdef_no=1, decl_uid=1958, cgraph_uid=1, symbol_order=4)

f1 ()
{
  long unsigned int _1;

   [local count: 1073741825]:
  _1 = __builtin_strlen (&b[1]);
  if (_1 != 3)
goto ; [0.00%]
  else
goto ; [99.96%]

   [count: 0]:
  __builtin_abort ();

   [local count: 1073312327]:
  return;

}



;; Function f2 (f2, funcdef_no=2, decl_uid=1961, cgraph_uid=2, symbol_order=5)

f2 ()
{
  long unsigned int _1;

   [local count: 1073741825]:
  _1 = __builtin_strlen (&c[1][1]);
  if (_1 != 3)
goto ; [0.00%]
  else
goto ; [99.96%]

   [count: 0]:
  __builtin_abort ();

   [local count: 1073312327]:
  return;

}

[Bug c++/83692] Rejects valid constexpr with unrelated code fixing problem

2018-01-04 Thread david at doublewise dot net
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83692

David Stone  changed:

   What|Removed |Added

 CC||david at doublewise dot net

--- Comment #1 from David Stone  ---
Forgot to mention, this is in C++17 and C++2a modes only. C++14 does not appear
to cause this problem.

[Bug c++/83692] New: Rejects valid constexpr with unrelated code fixing problem

2018-01-04 Thread david at doublewise dot net
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83692

Bug ID: 83692
   Summary: Rejects valid constexpr with unrelated code fixing
problem
   Product: gcc
   Version: 8.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c++
  Assignee: unassigned at gcc dot gnu.org
  Reporter: david at doublewise dot net
  Target Milestone: ---

The following program fails to compile

struct integer {
constexpr int value() const {
return m_value;
}
int m_value;
};

struct outer {
integer m_x{0};
constexpr outer() {
if (m_x.value() != 0) throw 0;
m_x.m_value = integer{1}.value();
if (m_x.value() != 1) throw 0;
}
};

constexpr outer o{};


Giving the error message:

17 : :17:19:   in 'constexpr' expansion of 'outer()'
13 : :13:37: error: expression '' is not a constant
expression
 if (m_x.value() != 1) throw 0;
 ^
Compiler returned: 1



Seemingly insignificant changes in the code lead to the error disappearing: for
instance, removing the first if statement (which is not rejected as invalid)
causes the second if statement to be accepted.

[Bug c/83688] Please check if buffers may overlap when copying strings using sprintf

2018-01-04 Thread bugzi...@poradnik-webmastera.com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83688

--- Comment #7 from Daniel Fruzynski  ---
In general case yes, this can produce a lot of false positives. I wanted to use
this only for strings stored in fixed-size buffer. Existing string-related
warnings already uses this information, and this request is to extend
diagnostics for other related cases where strings in fixed-size buffers are
processed.

[Bug target/83387] PowerPC64: Infinite loops in do_reload() with -msoft-float

2018-01-04 Thread bergner at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83387

Peter Bergner  changed:

   What|Removed |Added

 Status|RESOLVED|CLOSED

--- Comment #20 from Peter Bergner  ---
Closing as fixed.

[Bug fortran/83622] [8 Regression] Wrong code with derived type and -fopenmp

2018-01-04 Thread anlauf at gmx dot de
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83622

--- Comment #5 from Harald Anlauf  ---
trans-array.c has:

/* Returns true if the expression is an array pointer.  */

static bool
is_pointer_array (tree expr)
{
  if (flag_openmp)
return false;

[...]

Is there a reason behind this?

[Bug target/83554] [8 Regression] ICE: in ix86_mitigate_rop, at config/i386/i386.c:41274 with -mmitigate-rop

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

Jakub Jelinek  changed:

   What|Removed |Added

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

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

[Bug libgomp/83046] ICE in nvptx offloading, C++ compilation of libgomp.oacc-c-c++-common/gang-static-2.c

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

Tom de Vries  changed:

   What|Removed |Added

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

--- Comment #20 from Tom de Vries  ---
> Patch with test-cases committed, marking resolved-fixed.

[Bug target/83554] [8 Regression] ICE: in ix86_mitigate_rop, at config/i386/i386.c:41274 with -mmitigate-rop

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

--- Comment #4 from Jakub Jelinek  ---
Author: jakub
Date: Thu Jan  4 21:54:23 2018
New Revision: 256268

URL: https://gcc.gnu.org/viewcvs?rev=256268&root=gcc&view=rev
Log:
PR target/83554
* config/i386/i386.md (*hi3_1 splitter): Use
QIreg_operand instead of register_operand predicate.
* config/i386/i386.c (ix86_rop_should_change_byte_p,
set_rop_modrm_reg_bits, ix86_mitigate_rop): Use -mmitigate-rop in
comments instead of -fmitigate[-_]rop.

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

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

[Bug lto/83121] [8 Regression] ICE: in linemap_ordinary_map_lookup, at libcpp/line-map.c:995

2018-01-04 Thread dmalcolm at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83121

--- Comment #6 from David Malcolm  ---
Candidate patch:
  https://gcc.gnu.org/ml/gcc-patches/2018-01/msg00257.html

[Bug c/83688] Please check if buffers may overlap when copying strings using sprintf

2018-01-04 Thread msebor at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83688

--- Comment #6 from Martin Sebor  ---
The warning does see that range (it's in the output of the -fdump-tree-vrp
option).  The challenge with using ranges is to avoid false positives from
excessive bounds.  For sizes, typically only the lower bound can be trusted. 
The upper bound is very often meaningless.  For instance, in something as
simple as the following, n's range is [0, UINT_MAX]:

  void test (unsigned n)
  {
memcpy (buf, buf + 5, n);
  }

So all these warnings (-Warray-bounds, -Wformat-overflow, -Wrestrict,
-Wstringop-overflow, etc.) only use the more conservative of the two bounds,
usually the lower one.

[Bug bootstrap/81926] [7 regression] go/parse.o differs between stage2 and stage3

2018-01-04 Thread ro at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81926

--- Comment #39 from Rainer Orth  ---
Author: ro
Date: Thu Jan  4 21:47:35 2018
New Revision: 256267

URL: https://gcc.gnu.org/viewcvs?rev=256267&root=gcc&view=rev
Log:
Avoid Solaris/SPARC comparison failures with Solaris as (PR bootstrap/81926)

PR bootstrap/81926
* cgraphunit.c (symbol_table::compile): Switch to text_section
before calling assembly_start debug hook.
* run-rtl-passes.c (run_rtl_passes): Likewise.
Include output.h.

Modified:
trunk/gcc/ChangeLog
trunk/gcc/cgraphunit.c
trunk/gcc/run-rtl-passes.c

[Bug middle-end/81897] [6/7/8 Regression] spurious -Wmaybe-uninitialized warning

2018-01-04 Thread aldyh at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81897

--- Comment #10 from Aldy Hernandez  ---
Created attachment 43037
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=43037&action=edit
proposed UNTESTED patch

Everything is so easy once Jeff does all the analysis :).

As mentioned, there is no rhyme or reason to the seemingly random choice of
starting the chain at the immediate dominator of the potentially uninitialized
PHI argument.  The ENTRY block seems like a saner solution, but alas
compute_control_dep_chain() and friends can't handle computing dependency
chains starting at the entry block.

Once that is fixed, we have a shot at analyzing the dependency chain and
calculating if anything invalidated it.  At which point, my code was broken.

I feel like I'm just echoing Jeff :).

The attached UNTESTED patch fixes the PR, while surviving:

  make check-gcc RUNTESTFLAGS=dg.exp=uninit*

I'll go through testing and post if I didn't break the world.

[Bug other/82352] [7 Regression] comdat-local function called by void h::i() outside its comdat

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

--- Comment #7 from Jakub Jelinek  ---
Author: jakub
Date: Thu Jan  4 21:13:17 2018
New Revision: 256266

URL: https://gcc.gnu.org/viewcvs?rev=256266&root=gcc&view=rev
Log:
PR ipa/82352
* g++.dg/ipa/pr82352.C (size_t): Define to __SIZE_TYPE__ instead of
long unsigned int.

Modified:
trunk/gcc/testsuite/ChangeLog
trunk/gcc/testsuite/g++.dg/ipa/pr82352.C

[Bug c++/81327] [8 Regression] cast to void* does not suppress -Wclass-memaccess

2018-01-04 Thread ville.voutilainen at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81327

--- Comment #6 from Ville Voutilainen  ---
As stated in the other comments, this breaks *users* of existing Qt versions.
Any fix would apply to newer versions only. QVector bit-blasts an object of a
type with a virtual table over an object of that same type, so it doesn't
change the value of the vptr. It does a cast to void* to try and tell the
compiler it knows what it's doing. I don't consider it feasible nor palatable
to suggest said users to have to add warning pragmas everywhere they might
include QVector.

As far as the bit-blast goes, I plan to write a standard change proposal to
make it well-defined.

Please don't release GCC 8 without fixing this problem.

[Bug fortran/83683] eoshift accepts wrong-length boundary

2018-01-04 Thread tkoenig at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83683

Thomas Koenig  changed:

   What|Removed |Added

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

--- Comment #3 from Thomas Koenig  ---
Fixed, closing.

[Bug fortran/20585] [meta-bug] Fortran 2003 support

2018-01-04 Thread tkoenig at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=20585
Bug 20585 depends on bug 45689, which changed state.

Bug 45689 Summary: [F03] Missing transformational intrinsic in the 
trans_func_f2003 list
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=45689

   What|Removed |Added

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

[Bug fortran/31392] [meta-bug] gfortran problems with initialization

2018-01-04 Thread tkoenig at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=31392
Bug 31392 depends on bug 45689, which changed state.

Bug 45689 Summary: [F03] Missing transformational intrinsic in the 
trans_func_f2003 list
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=45689

   What|Removed |Added

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

[Bug fortran/30932] [meta-bug] fortran intrinsics

2018-01-04 Thread tkoenig at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=30932
Bug 30932 depends on bug 45689, which changed state.

Bug 45689 Summary: [F03] Missing transformational intrinsic in the 
trans_func_f2003 list
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=45689

   What|Removed |Added

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

[Bug fortran/45689] [F03] Missing transformational intrinsic in the trans_func_f2003 list

2018-01-04 Thread tkoenig at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=45689

Thomas Koenig  changed:

   What|Removed |Added

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

--- Comment #19 from Thomas Koenig  ---
Fixed on trunk, closing.

[Bug fortran/83683] eoshift accepts wrong-length boundary

2018-01-04 Thread tkoenig at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83683

--- Comment #2 from Thomas Koenig  ---
Author: tkoenig
Date: Thu Jan  4 21:04:23 2018
New Revision: 256265

URL: https://gcc.gnu.org/viewcvs?rev=256265&root=gcc&view=rev
Log:
2018-01-04  Thomas Koenig  

PR fortran/83683
PR fortran/45689
* check.c (gfc_check_eoshift): Check for string length and
for conformance of boundary.
* intrinsic.c (add_functions): Add gfc_simplify_eoshift.
* intrinsic.h: Add prototype for gfc_simplify_eoshift.
* simplify.c (gfc_simplify_eoshift): New function.

2018-01-04  Thomas Koenig  

PR fortran/83683
PR fortran/45689
* gfortran.dg/eoshift_8.f90: New test.
* gfortran.dg/simplify_eoshift_1.f90: New test.


Added:
trunk/gcc/testsuite/gfortran.dg/eoshift_8.f90
trunk/gcc/testsuite/gfortran.dg/simplify_eoshift_1.f90
Modified:
trunk/gcc/fortran/ChangeLog
trunk/gcc/fortran/check.c
trunk/gcc/fortran/intrinsic.c
trunk/gcc/fortran/intrinsic.h
trunk/gcc/fortran/simplify.c
trunk/gcc/testsuite/ChangeLog

[Bug fortran/45689] [F03] Missing transformational intrinsic in the trans_func_f2003 list

2018-01-04 Thread tkoenig at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=45689

--- Comment #18 from Thomas Koenig  ---
Author: tkoenig
Date: Thu Jan  4 21:04:23 2018
New Revision: 256265

URL: https://gcc.gnu.org/viewcvs?rev=256265&root=gcc&view=rev
Log:
2018-01-04  Thomas Koenig  

PR fortran/83683
PR fortran/45689
* check.c (gfc_check_eoshift): Check for string length and
for conformance of boundary.
* intrinsic.c (add_functions): Add gfc_simplify_eoshift.
* intrinsic.h: Add prototype for gfc_simplify_eoshift.
* simplify.c (gfc_simplify_eoshift): New function.

2018-01-04  Thomas Koenig  

PR fortran/83683
PR fortran/45689
* gfortran.dg/eoshift_8.f90: New test.
* gfortran.dg/simplify_eoshift_1.f90: New test.


Added:
trunk/gcc/testsuite/gfortran.dg/eoshift_8.f90
trunk/gcc/testsuite/gfortran.dg/simplify_eoshift_1.f90
Modified:
trunk/gcc/fortran/ChangeLog
trunk/gcc/fortran/check.c
trunk/gcc/fortran/intrinsic.c
trunk/gcc/fortran/intrinsic.h
trunk/gcc/fortran/simplify.c
trunk/gcc/testsuite/ChangeLog

[Bug c/83688] Please check if buffers may overlap when copying strings using sprintf

2018-01-04 Thread bugzi...@poradnik-webmastera.com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83688

--- Comment #5 from Daniel Fruzynski  ---
> There is nothing to indicate that the first call to memcpy() in comment #0
> overlaps so -Wrestrict doesn't warn for it.

I thought that fix for bug 83373 will somehow help here. gcc could guess that
memcpy will copy from 1 to 15 bytes, which may overlap destination. In fact
this could help in all cases here except last memcpy.

[Bug fortran/83679] [6 regression] r256113 causes regression on pr77942.f90

2018-01-04 Thread kargl at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83679

kargl at gcc dot gnu.org changed:

   What|Removed |Added

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

--- Comment #4 from kargl at gcc dot gnu.org ---
Fixed on 6 and 7 branches.  Regression does not occur on trunk.  Thanks for the
bug report.

[Bug c++/81327] [8 Regression] cast to void* does not suppress -Wclass-memaccess

2018-01-04 Thread msebor at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81327

--- Comment #5 from Martin Sebor  ---
I don't consider this a regression.  The warnings are justified and it wasn't a
design goal to let casts suppress them.  I agree it would be useful for
compatibility with Clang (that's why I raised the bug), but making it possible
is an enhancement.  Until it's implemented, the warnings can be selectively
suppressed via GCC's diagnostic pragmas:

void g (struct S *s)
{
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wclass-memaccess"
  __builtin_memset ((void*)s, 0, sizeof *s);
#pragma GCC diagnostic pop
}

[Bug fortran/83679] [6 regression] r256113 causes regression on pr77942.f90

2018-01-04 Thread kargl at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83679

--- Comment #3 from kargl at gcc dot gnu.org ---
Author: kargl
Date: Thu Jan  4 20:18:58 2018
New Revision: 256264

URL: https://gcc.gnu.org/viewcvs?rev=256264&root=gcc&view=rev
Log:
2018-01-04  Steven G. Kargl  

PR Fortran/83679
* simplify.c (gfc_simplify_cshift): Restore early return for zero-sized
array.  Update Copyright year while here.

Modified:
branches/gcc-6-branch/gcc/fortran/ChangeLog
branches/gcc-6-branch/gcc/fortran/simplify.c

[Bug fortran/83679] [6 regression] r256113 causes regression on pr77942.f90

2018-01-04 Thread kargl at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83679

--- Comment #2 from kargl at gcc dot gnu.org ---
Author: kargl
Date: Thu Jan  4 20:16:23 2018
New Revision: 256263

URL: https://gcc.gnu.org/viewcvs?rev=256263&root=gcc&view=rev
Log:
2018-01-04  Steven G. Kargl  

PR Fortran/83679
* simplify.c (gfc_simplify_cshift): Restore early return for zero-sized
array.  Update Copyright year while here.

Modified:
branches/gcc-7-branch/gcc/fortran/ChangeLog
branches/gcc-7-branch/gcc/fortran/simplify.c

[Bug c/83688] Please check if buffers may overlap when copying strings using sprintf

2018-01-04 Thread msebor at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83688

--- Comment #4 from Martin Sebor  ---
There is nothing to indicate that the first call to memcpy() in comment #0
overlaps so -Wrestrict doesn't warn for it.

One thing to note is that the warning treats raw memory functions slightly
differently than string functions because the former tend to be used to copy
regions of the same array within itself, while string functions don't.  So
while the first memcpy call doesn't trigger a warning, if it were replaced with
one to strncpy, GCC would warn:

In file included from /usr/include/string.h:630,
 from d.c:3:
pr83688.c: In function ‘test’:
pr83688.c:11:5: warning: ‘__builtin_strncpy’ accessing 1 or more bytes at
offsets 0 and 5 may overlap up to 9223372036854775802 bytes at offset
[9223372036854775806, 5] [-Wrestrict]
 strncpy (buf, buf+5, strlen(buf+5)+1);
 ^~~

(The numbers it prints could stand to be improved.)

Regarding -Wformat-overflow, it does (obviously) check for sprintf overflow. 
It doesn't check for overlap like in this call:

  sprintf (d + i, "%s", d);

That's what the July 2017 patch added.  In case of either warning, I don't
think their quality would be improved by explicitly saying that overflow or
overlap is undefined.  Very few GCC warnings do, and I feel that describing the
problem is more informative than saying that something undefined has happened. 
It would of course be possible to print a note after the warning saying that
it's undefined.  But I'd rather have the note include additional detail about
the context of the problem than state (what should be) obvious.

[Bug fortran/83679] [6 regression] r256113 causes regression on pr77942.f90

2018-01-04 Thread kargl at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83679

kargl at gcc dot gnu.org changed:

   What|Removed |Added

   Target Milestone|7.2 |6.4
  Known to fail||6.4.1

[Bug fortran/83679] [6 regression] r256113 causes regression on pr77942.f90

2018-01-04 Thread kargl at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83679

kargl at gcc dot gnu.org changed:

   What|Removed |Added

   Priority|P3  |P4
  Known to work||8.0
Version|8.0 |7.2.0
   Assignee|unassigned at gcc dot gnu.org  |kargl at gcc dot gnu.org
   Target Milestone|--- |7.2
  Known to fail||7.2.1

[Bug fortran/83679] [6 regression] r256113 causes regression on pr77942.f90

2018-01-04 Thread kargl at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83679

kargl at gcc dot gnu.org changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2018-01-04
 CC||kargl at gcc dot gnu.org
 Ever confirmed|0   |1

--- Comment #1 from kargl at gcc dot gnu.org ---
I have a patch that I'm testing.

[Bug target/83507] [8 Regression] ICE in internal_dfa_insn_code_* for powerpc targets

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

--- Comment #3 from Arseny Solokha  ---
I've managed to generate a couple of additional testcases for this PR in
December. Next week I'll check whether this ICE is still there w/ my setup.

[Bug c++/81327] [8 Regression] cast to void* does not suppress -Wclass-memaccess

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

Jakub Jelinek  changed:

   What|Removed |Added

 CC||jakub at gcc dot gnu.org
   Target Milestone|--- |8.0
Summary|cast to void* does not  |[8 Regression] cast to
   |suppress -Wclass-memaccess  |void* does not suppress
   ||-Wclass-memaccess

--- Comment #4 from Jakub Jelinek  ---
Because this warning is included in -Wall, this is a regression.

[Bug target/81084] [8 Regression] powerpcspe port full of confusing configury / command-line options not related to SPE

2018-01-04 Thread rsandifo at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81084

rsandifo at gcc dot gnu.org  changed:

   What|Removed |Added

 CC||rsandifo at gcc dot gnu.org

--- Comment #7 from rsandifo at gcc dot gnu.org  
---
If we do keep the port, PR83691 should be fixed by someone who can
test it.  I can write a candidate patch if the feeling is that
I broke it with r256209, but it would mean changing a core pattern
like adddi3, which really needs testing on a real target.

[Bug target/83691] New: Invalid gpr_reg_operand handling in powerpcspe port

2018-01-04 Thread rsandifo at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83691

Bug ID: 83691
   Summary: Invalid gpr_reg_operand handling in powerpcspe port
   Product: gcc
   Version: unknown
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: target
  Assignee: unassigned at gcc dot gnu.org
  Reporter: rsandifo at gcc dot gnu.org
  Target Milestone: ---
Target: powerpc-eabispe

The powerpcspe adddi3 pattern takes gpr_reg_operands:

(define_expand "add3"
  [(set (match_operand:SDI 0 "gpc_reg_operand" "")
(plus:SDI (match_operand:SDI 1 "gpc_reg_operand" "")
  (match_operand:SDI 2 "reg_or_add_cint_operand" "")))]

and splits the addition into two 32-bit instructions:

  rtx lo0 = gen_lowpart (SImode, operands[0]);
  rtx lo1 = gen_lowpart (SImode, operands[1]);
  rtx lo2 = gen_lowpart (SImode, operands[2]);
  rtx hi0 = gen_highpart (SImode, operands[0]);
  rtx hi1 = gen_highpart (SImode, operands[1]);
  rtx hi2 = gen_highpart_mode (SImode, DImode, operands[2]);

  if (!reg_or_short_operand (lo2, SImode))
lo2 = force_reg (SImode, lo2);
  if (!adde_operand (hi2, SImode))
hi2 = force_reg (SImode, hi2);

  emit_insn (gen_addsi3_carry (lo0, lo1, lo2));
  emit_insn (gen_addsi3_carry_in (hi0, hi1, hi2));

However, gpr_reg_operand rejects subregs that satisfy invalid_e500_subreg:

  if ((TARGET_E500_DOUBLE || TARGET_SPE) && invalid_e500_subreg (op, mode))
return 0;

and invalid_e500_subreg rejects subregs of vectors for SImode but not
for DImode:

  if (TARGET_SPE
  && GET_CODE (op) == SUBREG
  && mode == SImode
  && REG_P (SUBREG_REG (op))
  && SPE_VECTOR_MODE (GET_MODE (SUBREG_REG (op
return true;

This means that gpr_reg_operand accepts things for DImode that
are invalid when split to SImode.  An example of this is
gcc.dg/vect/vect-singleton_1.c when compiled at -O3, where we get:

error: unrecognizable insn:
 TEST (long long, int64x1_t, s64)
 ^~~~
(insn 10 9 11 2 (parallel [
(set (subreg:SI (reg:DI 163) 4)
(plus:SI (subreg:SI (reg/v:V1DI 159 [ a ]) 4)
(reg:SI 164)))
(set (reg:SI 76 ca)
(ltu:SI (plus:SI (subreg:SI (reg/v:V1DI 159 [ a ]) 4)
(reg:SI 164))
(subreg:SI (reg/v:V1DI 159 [ a ]) 4)))
]) "../../../testsuite/gcc.dg/./vect/vect-singleton_1.c":28 -1
 (nil))
during RTL pass: vregs

This particular testcase started failing with r256209, but that
really just exposed an existing problem.

[Bug c++/83690] New: [8 regression] spurious unused variable warings for variables used only in static_assert

2018-01-04 Thread s...@li-snyder.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83690

Bug ID: 83690
   Summary: [8 regression] spurious unused variable warings for
variables used only in static_assert
   Product: gcc
   Version: 8.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c++
  Assignee: unassigned at gcc dot gnu.org
  Reporter: s...@li-snyder.org
  Target Milestone: ---

As of 

gcc version 8.0.0 20180102 (experimental) (GCC) 

gcc gives an unused-but-set warning for variables that are used only in a 
static_assert.

For example, with this source:

--- x.cc -
void foo()
{
  constexpr bool foo = true;
  static_assert(foo, "foo");
}
--

we get a warning:

$ cc1plus -std=c++17 x.cc -quiet -Wall
x.cc: In function ‘void foo()’:
x.cc:3:18: warning: variable ‘foo’ set but not used [-Wunused-but-set-variable]
   constexpr bool foo = true;
  ^~~

We do not get this warning with gcc 7.2.1.

[Bug c/83688] Please check if buffers may overlap when copying strings using sprintf

2018-01-04 Thread bugzi...@poradnik-webmastera.com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83688

--- Comment #3 from Daniel Fruzynski  ---
Looks that something is not working properly. I have pasted output from
compilation of function in 1st post, and -Wrestrict complained only about last
memcpy call. Please take a look on this.

BTW, string concatenation using sprintf causes -Wformat-overflow warning, so
some protection against this is present. However this message does not say
anything that this is undefined behavior per C standard.

[Bug c++/83689] Internal compiler error using is_trivially_default_constructible on array of nontrivially-destructible types

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

--- Comment #2 from Jakub Jelinek  ---
#include 

struct X { X() {} };

void test01()
{
  static_assert(std::is_trivially_constructible::value);
}

ICEs too (but not std::is_constructible).

[Bug c++/83689] Internal compiler error using is_trivially_default_constructible on array of nontrivially-destructible types

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

Jakub Jelinek  changed:

   What|Removed |Added

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

--- Comment #1 from Jakub Jelinek  ---
Reduced testcase without headers:

template
struct A { static constexpr _Tp a = __v; };
template
struct B : public A {};
struct C { C () {} };

void
foo ()
{
  using D = C[10];
  static_assert (!B::a, "");
}

This got fixed with r248788 aka PR80812.  Ville, shall we backport?

[Bug debug/83585] [8 Regression] Assembler messages: Error: can't resolve `.text' {.text section} - `.LCOLDB0' {.text.unlikely section}

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

Jakub Jelinek  changed:

   What|Removed |Added

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

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

[Bug debug/83585] [8 Regression] Assembler messages: Error: can't resolve `.text' {.text section} - `.LCOLDB0' {.text.unlikely section}

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

--- Comment #7 from Jakub Jelinek  ---
Author: jakub
Date: Thu Jan  4 17:47:55 2018
New Revision: 256256

URL: https://gcc.gnu.org/viewcvs?rev=256256&root=gcc&view=rev
Log:
PR debug/83585
* bb-reorder.c (insert_section_boundary_note): Set has_bb_partition
to switched_sections.

* gcc.dg/pr83585.c: New test.

Added:
trunk/gcc/testsuite/gcc.dg/pr83585.c
Modified:
trunk/gcc/ChangeLog
trunk/gcc/bb-reorder.c
trunk/gcc/testsuite/ChangeLog

[Bug c++/83689] New: Internal compiler error using is_trivially_default_constructible on array of nontrivially-destructible types

2018-01-04 Thread zhangxy at google dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83689

Bug ID: 83689
   Summary: Internal compiler error using
is_trivially_default_constructible on array of
nontrivially-destructible types
   Product: gcc
   Version: 7.2.1
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c++
  Assignee: unassigned at gcc dot gnu.org
  Reporter: zhangxy at google dot com
  Target Milestone: ---

The following code triggers internal compiler error (see
https://godbolt.org/g/dXRbdK for more details and comparison with clang):

/opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/type_traits: In
instantiation of 'struct std::is_trivially_constructible':
/opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/type_traits:1373:12:  
required from 'struct
std::is_trivially_default_constructible'
31 : :31:84:   required from here
/opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/type_traits:1366:12:
internal compiler error: in build_value_init_noctor, at cp/init.c:483
 struct is_trivially_constructible
^~
mmap: Invalid argument

```
#include 

class NontrivialDefaultCtor {
 public:
  NontrivialDefaultCtor() {}
};

void f() {
  using NontrivialDefaultCtor10 = NontrivialDefaultCtor[10];
 
static_assert(!std::is_trivially_default_constructible::value,
  "This should be false");
}
```

[Bug c/82922] Request: add -Wstrict-prototypes to -Wextra as K&R style is obsolescent

2018-01-04 Thread msebor at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82922

Martin Sebor  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2018-01-04
 CC||msebor at gcc dot gnu.org
 Ever confirmed|0   |1

--- Comment #1 from Martin Sebor  ---
Confirmed.

[Bug c/83688] Please check if buffers may overlap when copying strings using sprintf

2018-01-04 Thread msebor at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83688

Martin Sebor  changed:

   What|Removed |Added

 Status|NEW |ASSIGNED
   Assignee|unassigned at gcc dot gnu.org  |msebor at gcc dot 
gnu.org
Summary|Please check if buffers may |Please check if buffers may
   |overlap when copying|overlap when copying
   |strings |strings using sprintf

[Bug c/83688] Please check if buffers may overlap when copying strings

2018-01-04 Thread msebor at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83688

Martin Sebor  changed:

   What|Removed |Added

   Keywords||diagnostic
 Status|UNCONFIRMED |NEW
   Last reconfirmed||2018-01-04
 CC||msebor at gcc dot gnu.org
 Ever confirmed|0   |1

--- Comment #2 from Martin Sebor  ---
Strcpy is already handled by -Wrestrict, as are all other string built-ins. 
There may be gaps in the coverage of some of them due to weaknesses in
optimizations but if you find cases where GCC doesn't warn but should please
open bugs for them.

I posted a patch to add -Wrestrict for sprintf back in July
(https://gcc.gnu.org/ml/gcc-patches/2017-07/msg00036.html) but for various
reasons it didn't make it into GCC 8.  I'm hoping to get to it in GCC 9 so let
me use this request to track that task.

[Bug c/83559] [8 regression] -Wsuggest-attribute=const conflicts with -Wattributes warning about const attribute on function returning void

2018-01-04 Thread egallager at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83559

--- Comment #5 from Eric Gallager  ---
(In reply to Martin Sebor from comment #4)
> Fixed in r256188.

Thanks for the quick fix! One thing I'm still wondering, though, what's the
recommended way for maintaining compatibility with old compilers that still
have the old -Wsuggest-attribute=const? A bunch of ifdefs?

[Bug c/83688] Please check if buffers may overlap when copying strings

2018-01-04 Thread bugzi...@poradnik-webmastera.com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83688

--- Comment #1 from Daniel Fruzynski  ---
This also would allow to catch code which use sprintf to concatenate strings,
what is an undefined behavior (snippet from
https://linux.die.net/man/3/snprintf):

sprintf(buf, "%s some further text", buf);

[Bug c++/83667] ICE in dump_function_decl on a thunk with variadic arguments

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

--- Comment #3 from Nathan Sidwell  ---
Author: nathan
Date: Thu Jan  4 15:49:28 2018
New Revision: 256254

URL: https://gcc.gnu.org/viewcvs?rev=256254&root=gcc&view=rev
Log:
[PR c++/83667] Fix tree_dump ICE

https://gcc.gnu.org/ml/gcc-patches/2018-01/msg00218.html
PR c++/83667
* g++.dg/ipa/pr83667.C: Fix regex, require alias.

Modified:
trunk/gcc/testsuite/ChangeLog
trunk/gcc/testsuite/g++.dg/ipa/pr83667.C

[Bug c/83688] New: Please check if buffers may overlap when copying strings

2018-01-04 Thread bugzi...@poradnik-webmastera.com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83688

Bug ID: 83688
   Summary: Please check if buffers may overlap when copying
strings
   Product: gcc
   Version: 8.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c
  Assignee: unassigned at gcc dot gnu.org
  Reporter: bugzi...@poradnik-webmastera.com
  Target Milestone: ---

Functions like strcpy internally use memcpy to copy data. This may cause
problems when someone will try to use them to move string in buffer, e.g. to
strip prefix. gcc is able to detect if overlapping buffers are used with
memcpy. Please add similar diagnostics to strcpy/sprintf functions too.

[code]
#include 
#include 

char buf[20];

void test()
{
strcpy(buf, buf+5);
memcpy(buf, buf+5, strlen(buf+5)+1);

snprintf(buf, sizeof(buf), "%s", buf+5);

memcpy(buf, buf+5, 10);
}
[/code]

[out]
$ g++ -c -o test.o test.cc -O3 -Wall -Wextra -Wformat-overflow
-Wformat-truncation -Wstringop-overflow=2 -Wstringop-truncation
test.cc: In function ‘void test()’:
test.cc:13:11: warning: ‘void* memcpy(void*, const void*, size_t)’ accessing 10
bytes at offsets 0 and 5 overlaps 5 bytes at offset 5 [-Wrestrict]
 memcpy(buf, buf+5, 10);
 ~~^~~~

$ g++ --version
g++ (GCC) 8.0.0 20171231 (experimental)
[/out]

[Bug other/82352] [7 Regression] comdat-local function called by void h::i() outside its comdat

2018-01-04 Thread holger.hopp at sap dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82352

--- Comment #6 from Holger Hopp  ---
The patch fixes my >10 original issues with gcc-7.
It also fixes similar (other, fewer) issues with gcc-6 (gcc-6.2.1 was ok,
gcc-6.3.1 not ok, with patch ok).
So please downport this patch also to gcc-6 branch.
Thanks!

[Bug target/83687] New: ARM NEON invalid optimisation for vabd/vabdl

2018-01-04 Thread nicholas at nicholaswilson dot me.uk
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83687

Bug ID: 83687
   Summary: ARM NEON invalid optimisation for vabd/vabdl
   Product: gcc
   Version: 7.2.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: target
  Assignee: unassigned at gcc dot gnu.org
  Reporter: nicholas at nicholaswilson dot me.uk
  Target Milestone: ---

When compiling for ARM, the optimiser appears to do an invalid optimisation, by
attempting to the reduce the sequence subtract-then-abs into the single
instruction absolute-difference. Unfortunately the two are *not* equivalent.

=== Test file (test.c) ===
// COMPILE WITH: gcc -c -O1 -o test.o test.c -mfpu=neon
#include 

int8_t testFunction1(int8_t a, int8_t b) {
  volatile int8x16_t sub = vsubq_s8(vdupq_n_s8(a), vdupq_n_s8(b));
  int8x16_t abs = vabsq_s8(sub);
  return vgetq_lane_s8(abs, 0);
}

int8_t testFunction2(int8_t a, int8_t b) {
  int8x16_t sub = vsubq_s8(vdupq_n_s8(a), vdupq_n_s8(b));
  int8x16_t abs = vabsq_s8(sub);
  return vgetq_lane_s8(abs, 0);
}

=== Result ===
$ objdump -d test.o
test.o: file format elf32-littlearm
Disassembly of section .text:

 :
   0:   e24dd010sub sp, sp, #16
   4:   eee00b90vdup.8  q8, r0
   8:   eee21b90vdup.8  q9, r1
   c:   f34008e2vsub.i8 q8, q8, q9
  10:   f44d0adfvst1.64 {d16-d17}, [sp :64]
  14:   f46d0adfvld1.64 {d16-d17}, [sp :64]
  18:   f3f10360vabs.s8 q8, q8
  1c:   ee500b90vmov.s8 r0, d16[0]
  20:   e28dd010add sp, sp, #16
  24:   e12fff1ebx  lr

0028 :
  28:   eee00b90vdup.8  q8, r0
  2c:   eee21b90vdup.8  q9, r1
  30:   f24007e2vabd.s8 q8, q8, q9
  34:   ee500b90vmov.s8 r0, d16[0]
  38:   e12fff1ebx  lr

As you can see, the vsub/vabs sequence is optimised to vabd unless "volatile"
is used to prevent it.

=== Second test, to show that the behaviour differs ===
// COMPILE WITH: gcc -o a.out test.o main.c && ./a.out
#include 
#include 

int8_t testFunction1(int8_t a, int8_t b);
int8_t testFunction2(int8_t a, int8_t b);

int main() {
  printf("vabs(vsub(-100,100)) = %u\n", (uint8_t)testFunction1(-100, 100));
  printf("vabd(-100,100) = %u\n", (uint8_t)testFunction2(-100, 100));
  return 0;
}

// Result, prints:
//   vabs(vsub(-100,100)) = 56  [ because vsub(-100,100) wraps to 56 ]
//   vabd(-100,100) = 200   [ because vabd does abs over the 9-bit diff ]


=== Final observations ===

* Behaviour does not repro at -O0, does at -O1, -O2.
* Behaviour does not repro with the following set of options, but does repro
  if any of these options are removed:
-O1 -fno-if-conversion -fno-forward-propagate -fno-tree-copy-prop \
-fno-tree-copyrename -fno-tree-dominator-opts -fno-tree-ter

Currently, I'm using the "volatile" hack to prevent the vabd instruction from
being emitted. This hurts perf a bit (redundant store/load to the stack) but at
least it works.

Tested with: GCC 4.6.0, GCC 6.3.0, and GCC 7.2.0.
Hardware: Raspberry Pi, ARMv7l BCM2835 and BCM2709

=== GCC 6.3 configuration ===
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/arm-linux-gnueabihf/6/lto-wrapper
Target: arm-linux-gnueabihf
Configured with: ../src/configure -v --with-pkgversion='Raspbian 6.3.0-18+rpi1'
--with-bugurl=file:///usr/share/doc/gcc-6/README.Bugs
--enable-languages=c,ada,c++,java,go,d,fortran,objc,obj-c++ --prefix=/usr
--program-suffix=-6 --program-prefix=arm-linux-gnueabihf- --enable-shared
--enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext
--enable-threads=posix --libdir=/usr/lib --enable-nls --with-sysroot=/
--enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes
--with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-libitm
--disable-libquadmath --enable-plugin --with-system-zlib
--disable-browser-plugin --enable-java-awt=gtk --enable-gtk-cairo
--with-java-home=/usr/lib/jvm/java-1.5.0-gcj-6-armhf/jre --enable-java-home
--with-jvm-root-dir=/usr/lib/jvm/java-1.5.0-gcj-6-armhf
--with-jvm-jar-dir=/usr/lib/jvm-exports/java-1.5.0-gcj-6-armhf
--with-arch-directory=arm --with-ecj-jar=/usr/share/java/eclipse-ecj.jar
--with-target-system-zlib --enable-objc-gc=auto --enable-multiarch
--disable-sjlj-exceptions --with-arch=armv6 --with-fpu=vfp --with-float=hard
--enable-checking=release --build=arm-linux-gnueabihf
--host=arm-linux-gnueabihf --target=arm-linux-gnueabihf
Thread model: posix
gcc version 6.3.0 20170516 (Raspbian 6.3.0-18+rpi1)

=== GCC 7.2.0 configuration ===
Using built-in specs.
COLLECT_GCC=/usr/local/gcc-7.2.0/bin/gcc-7.2.0
COLLECT_LTO_WRAPPER=/usr/local/gcc-7.2.0/libexec/gcc/arm-linux-gnueabihf/7.2.0/lto-wrapper
Target: arm-linux-gnueabihf
Configured with: ../gcc-7.2.0/configure -v --enable-languages=c,c++,fortran
--prefix=/usr/local/gcc-7.2.0 --program-suffix=-7.2.0 --with-arch=armv6
--with-fpu=vfp --with-float=hard -

[Bug c++/82882] [8 regression] ICE Segmentation fault

2018-01-04 Thread trippels at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82882

Markus Trippelsdorf  changed:

   What|Removed |Added

 CC||doko at gcc dot gnu.org

--- Comment #5 from Markus Trippelsdorf  ---
*** Bug 83686 has been marked as a duplicate of this bug. ***

[Bug c++/83686] [8 Regression] ICE (segfault) in determine_visibility

2018-01-04 Thread trippels at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83686

Markus Trippelsdorf  changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 CC||trippels at gcc dot gnu.org
 Resolution|--- |DUPLICATE

--- Comment #1 from Markus Trippelsdorf  ---
dup.

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

[Bug target/82096] ICE in int_mode_for_mode, at stor-layout.c:403 with arm-linux-gnueabi

2018-01-04 Thread sudi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82096

sudi at gcc dot gnu.org changed:

   What|Removed |Added

 Status|UNCONFIRMED |ASSIGNED
   Last reconfirmed|2017-12-19 00:00:00 |2018-01-04
 Ever confirmed|0   |1

--- Comment #6 from sudi at gcc dot gnu.org ---
Patch submitted 

https://gcc.gnu.org/ml/gcc-patches/2018-01/msg00219.html

[Bug c++/83686] New: [8 Regression] ICE (segfault) in determine_visibility

2018-01-04 Thread doko at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83686

Bug ID: 83686
   Summary: [8 Regression] ICE (segfault) in determine_visibility
   Product: gcc
   Version: 8.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c++
  Assignee: unassigned at gcc dot gnu.org
  Reporter: doko at gcc dot gnu.org
  Target Milestone: ---

seen with r256068 on x86_64-linux-gnu, extracted from building akonadiconsole:

$ cat monitorsmodel.ii
# 8 "" 3
class a {
  b(const &) const;
  int f;
};
template  d(c) {
  [] { enum {}; };
}
a::b(const &) const {
  auto e = f;
  d(e);
}

$ g++ -std=gnu++11 -c -O0 monitorsmodel.ii
: In instantiation of 'int d(c) [with c = int]':
:17:6:   required from here
:13:13: internal compiler error: Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.

Program received signal SIGSEGV, Segmentation fault.
0x007194d8 in determine_visibility(tree_node*) ()
(gdb) bt
#0  0x007194d8 in determine_visibility(tree_node*) ()
#1  0x007ace3e in lookup_template_class(tree_node*, tree_node*,
tree_node*, tree_node*, int, int) ()
#2  0x005962d2 in ?? ()
#3  0x007a4c9c in tsubst(tree_node*, tree_node*, int, tree_node*) ()
#4  0x007b41bf in ?? ()
#5  0x007a4fc0 in tsubst(tree_node*, tree_node*, int, tree_node*) ()
#6  0x0079f9c3 in ?? ()
#7  0x0079f1e6 in ?? ()
#8  0x0079f2fc in ?? ()
#9  0x0079f2fc in ?? ()
#10 0x007a0fc3 in tsubst_lambda_expr(tree_node*, tree_node*, int,
tree_node*) ()
#11 0x007a2472 in ?? ()
#12 0x0079f361 in ?? ()
#13 0x0079ed96 in ?? ()
#14 0x0079f1e6 in ?? ()
#15 0x0079f2fc in ?? ()
#16 0x0079d551 in instantiate_decl(tree_node*, bool, bool) ()
#17 0x007b76ec in instantiate_pending_templates(int) ()
#18 0x0071cc2c in c_parse_final_cleanups() ()
#19 0x00be025f in ?? ()
#20 0x006b2830 in toplev::main(int, char**) ()
#21 0x006b4b0b in main ()

[Bug fortran/83683] eoshift accepts wrong-length boundary

2018-01-04 Thread tkoenig at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83683

--- Comment #1 from Thomas Koenig  ---
Another thing that is incorrectly accepted, also with
-fcheck=bounds:

program main
  implicit none
  integer :: n
  integer :: i,n1, n2, n3
  character(len=3), parameter :: e(2,3,4) =
reshape([(repeat(achar(i),3),i=iachar('a'),iachar('a')+2*3*4-1)], &
   shape(e))
  character(len=3), parameter :: bnd2(3,5) =
reshape([(repeat(achar(i),3),i=iachar('A'),iachar('A')+3*5-1)], &
   shape(bnd2))
  character(len=3) :: f2(2,3,4) ! = eoshift(e,shift=-1,boundary=bnd2);

  n = -1
  f2 = eoshift(e,shift=n,boundary=bnd2);  ! bnd2 has wrong bounds

  print '(*(1H",A,1H",:","))',f2
end program main

[Bug target/83387] PowerPC64: Infinite loops in do_reload() with -msoft-float

2018-01-04 Thread bergner at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83387

Peter Bergner  changed:

   What|Removed |Added

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

--- Comment #19 from Peter Bergner  ---
Patch committed.

[Bug target/83387] PowerPC64: Infinite loops in do_reload() with -msoft-float

2018-01-04 Thread bergner at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83387

Peter Bergner  changed:

   What|Removed |Added

 Status|NEW |ASSIGNED
URL||https://gcc.gnu.org/ml/gcc-
   ||patches/2018-01/msg00216.ht
   ||ml
   Target Milestone|--- |8.0

[Bug middle-end/83685] [8 Regression] ICE: SSA corruption

2018-01-04 Thread doko at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83685

--- Comment #1 from Matthias Klose  ---
$ cat score.i
int b;
char c;
int _setjmp();
void a();
void d() {
  int e;
  while (b) {
if (_setjmp())
  a(e);
if (c) {
  e--;
  a();
}
e++;
  }
}

[Bug middle-end/83680] [8 regression] Numerous regressions on arm since r256093

2018-01-04 Thread rsandifo at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83680

rsandifo at gcc dot gnu.org  changed:

   What|Removed |Added

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

--- Comment #6 from rsandifo at gcc dot gnu.org  
---
Patch applied.

[Bug c++/81933] [7/8 Regression] Invalid "constexpr call flows off the end of the function" error

2018-01-04 Thread mpolacek at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81933

--- Comment #6 from Marek Polacek  ---
And I bet the solution will be to handle empty classes in
split_nonconstant_init_1 or somewhere similar.

[Bug middle-end/83680] [8 regression] Numerous regressions on arm since r256093

2018-01-04 Thread rsandifo at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83680

--- Comment #5 from rsandifo at gcc dot gnu.org  
---
Author: rsandifo
Date: Thu Jan  4 14:39:03 2018
New Revision: 256251

URL: https://gcc.gnu.org/viewcvs?rev=256251&root=gcc&view=rev
Log:
PR83680: Inverted test in arm_vectorize_vec_perm_const

2018-01-04  Richard Sandiford  

gcc/
PR target/83680
* config/arm/arm.c (arm_vectorize_vec_perm_const): Fix inverted
test for d.testing.

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

[Bug rtl-optimization/83575] [8 Regression] ICE: verify_flow_info failed (error: multiple hot/cold transitions found)

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

Jakub Jelinek  changed:

   What|Removed |Added

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

--- Comment #3 from Jakub Jelinek  ---
Started with r254379.

[Bug target/83387] PowerPC64: Infinite loops in do_reload() with -msoft-float

2018-01-04 Thread bergner at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83387

--- Comment #18 from Peter Bergner  ---
Author: bergner
Date: Thu Jan  4 14:36:35 2018
New Revision: 256250

URL: https://gcc.gnu.org/viewcvs?rev=256250&root=gcc&view=rev
Log:
PR target/83387
* config/rs6000/rs6000.c (rs6000_discover_homogeneous_aggregate): Do
not
allow arguments in FP registers if TARGET_HARD_FLOAT is false.

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

[Bug middle-end/83685] New: [8 Regression] ICE: SSA corruption

2018-01-04 Thread doko at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83685

Bug ID: 83685
   Summary: [8 Regression] ICE: SSA corruption
   Product: gcc
   Version: 8.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: middle-end
  Assignee: unassigned at gcc dot gnu.org
  Reporter: doko at gcc dot gnu.org
  Target Milestone: ---

seen building covered on x86_64-linux-gnu, r256068.

$ gcc -c -O2 score.i 

Unable to coalesce ssa_names 4 and 17 which are marked as MUST COALESCE.
e_4(ab) and  e_17(ab)
during RTL pass: expand
score.i: In function 'd':
score.i:5:6: internal compiler error: SSA corruption
 void d() {
  ^
Please submit a full bug report,
with preprocessed source if appropriate.

[Bug target/83466] Wrong TLS GD sequence for ILP32

2018-01-04 Thread sch...@linux-m68k.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83466

--- Comment #5 from Andreas Schwab  ---
This also fixes the original failure: miscompiled efl that causes python3-efl
to fail to build.

[Bug middle-end/83684] New: [5 Regression] ICE in maybe_diag_overlap, at gimple-ssa-warn-restrict.c:1371

2018-01-04 Thread doko at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83684

Bug ID: 83684
   Summary: [5 Regression] ICE in maybe_diag_overlap, at
gimple-ssa-warn-restrict.c:1371
   Product: gcc
   Version: 8.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: middle-end
  Assignee: unassigned at gcc dot gnu.org
  Reporter: doko at gcc dot gnu.org
  Target Milestone: ---

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

seen building courier 0.78 on x86_64-linux-gnu, r256068.

while I get the preprocessed source from the ICE, I'm unable to reproduce this
using the preprocessed source.

libtool: compile:  gcc -DHAVE_CONFIG_H -I. -Wdate-time -D_FORTIFY_SOURCE=2 -g
-O2 -fdebug-prefix-map=/home/
packages/tmp/gcc/courier-0.78.0=. -fstack-protector-strong -Wformat
-Werror=format-security -Wall -pedantic
 -Wall -I./.. -I.. -I./../.. -I../.. -c maildirnewshared.c  -fPIC -DPIC -o
.libs/maildirnewshared.o
during GIMPLE pass: strlen
maildirnewshared.c: In function 'maildir_newshared_next':
maildirnewshared.c:53:5: internal compiler error: in maybe_diag_overlap, at
gimple-ssa-warn-restrict.c:1371
 int maildir_newshared_next(struct maildir_newshared_enum_cb *info,
 ^~
Please submit a full bug report,
with preprocessed source if appropriate.

[Bug fortran/83683] eoshift accepts wrong-length boundary

2018-01-04 Thread tkoenig at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83683

Thomas Koenig  changed:

   What|Removed |Added

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

[Bug c++/81933] [7/8 Regression] Invalid "constexpr call flows off the end of the function" error

2018-01-04 Thread mpolacek at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81933

--- Comment #5 from Marek Polacek  ---
Here's what happens.

We get the "flows off" error because:

4151 if (tree init = DECL_INITIAL (r))
4152   {
4153 init = cxx_eval_constant_expression (ctx, init,
4154  false,
4155  non_constant_p,
overflow_p);
4156 /* Don't share a CONSTRUCTOR that might be changed.  */
4157 init = unshare_constructor (init);
4158 ctx->values->put (r, init);
4159   }

r's DECL_INITIAL is null and we don't put the CONSTRUCTOR in ctx->values.  So
here:
1702   result = *ctx->values->get (slot ? slot : res);
1703   if (result == NULL_TREE && !*non_constant_p)
1704 {
1705   if (!ctx->quiet)
1706 error ("% call flows off the end "
1707"of the function");
1708   *non_constant_p = true;
1709 }

result is null -> error.

Why was the DECL_INITIAL null?  Because in c++17 we execute the hunk in Comment
4, which puts some additional fields into some classes.  This makes a
difference for split_nonconstant_init:

 751   if (split_nonconstant_init_1 (dest, init))
 752 init = NULL_TREE;

where split_nonconstant_init_1 is true so that means that the DECL_INITIAL will
be null.  Why is split_nonconstant_init_1 true?  Because it ends up calling
complete_ctor_at_level_p with

6114   return count_type_elements (type, true) == num_elts;

but the count_type_elements result differs between c++14/c++17 precisely
because of the fields added in build_base_field.

But we should only add those fields when initializing aggregates with bases,
which is not what's happening in Comment 2's testcase.

[Bug fortran/83683] New: eoshift accepts wrong-length boundary

2018-01-04 Thread tkoenig at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83683

Bug ID: 83683
   Summary: eoshift accepts wrong-length boundary
   Product: gcc
   Version: unknown
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: fortran
  Assignee: unassigned at gcc dot gnu.org
  Reporter: tkoenig at gcc dot gnu.org
  Target Milestone: ---

The following should be rejected:

program main
  implicit none
  integer :: i
  character(len=3) :: e(2,3,4)

  e = reshape([(repeat(achar(i),3),i=iachar('a'),iachar('a')+2*3*4-1)], 
shape(e))
  print *,eoshift(e,1,boundary="1")

end program main

From the F2003 standard 13.7.52:

"BOUNDARY (optional) shall be of the same type and type parameters as ARRAY"

[Bug rtl-optimization/83628] [8 Regression] performance regression when accessing arrays on alpha

2018-01-04 Thread ubizjak at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83628

--- Comment #6 from Uroš Bizjak  ---
On a related note, gcc-5 (-O2) was able to also simplify:

int test (int a, int b, int c)
{
  return (a < b) * 4 + c;
}

cmplt $16,$17,$17
s4addl $17,$18,$0
ret $31,($26),1

where gcc-8 emits:

cmplt $16,$17,$0
s4addq $0,0,$0
addl $0,$18,$0
ret $31,($26),1

gcc-5 is able to if-convert to:

(insn 30 10 15 2 (set (reg:DI 70 [ D.1498 ])
(if_then_else:DI (ne (reg:DI 76)
(const_int 0 [0]))
(const_int 4 [0x4])
(const_int 0 [0]))) cmp1.c:5 161 {*movdicc_internal}
 (nil))

which is later combined with:

(insn 15 30 16 2 (set (reg:SI 77 [ D.1498 ])
(plus:SI (subreg/s/u:SI (reg:DI 70 [ D.1498 ]) 0)
(subreg/s/u:SI (reg/v:DI 75 [ c ]) 0))) cmp1.c:5 3 {addsi3}
 (expr_list:REG_DEAD (reg/v:DI 75 [ c ])
(expr_list:REG_DEAD (reg:DI 70 [ D.1498 ])
(nil

to:

Trying 30 -> 15:
Successfully matched this instruction:
(set (reg:SI 77 [ D.1498 ])
(plus:SI (mult:SI (subreg:SI (reg:DI 76) 0)
(const_int 4 [0x4]))
(reg:SI 18 $18 [ c ])))

gcc-8 is not able to if-convert...

[Bug c/83682] New: [8 Regression] ICE in simplify_subreg, at simplify-rtx.c:6296

2018-01-04 Thread doko at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83682

Bug ID: 83682
   Summary: [8 Regression] ICE in simplify_subreg, at
simplify-rtx.c:6296
   Product: gcc
   Version: 8.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c
  Assignee: unassigned at gcc dot gnu.org
  Reporter: doko at gcc dot gnu.org
  Target Milestone: ---

seen building the cen64 package, trunk r256068 on x86_64-linux-gnu

$ cat cp1.i
typedef float a __attribute__((__vector_size__(16)));
a b;
__attribute__((__vector_size__(2 * sizeof(double double c;
void *memcpy();
void d() {
  a e, g;
  float f;
  e = __builtin_ia32_cvtsd2ss(b, c);
  g = e;
  f = g[0];
  memcpy(d, &f, sizeof(f));
}

$ gcc -std=c99 -c -O2 cp1.i 
during RTL pass: combine
cp1.i: In function 'd':
cp1.i:12:1: internal compiler error: in simplify_subreg, at simplify-rtx.c:6296
 }
 ^
Please submit a full bug report,
with preprocessed source if appropriate.

[Bug target/83507] [8 Regression] ICE in internal_dfa_insn_code_* for powerpc targets

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

Segher Boessenkool  changed:

   What|Removed |Added

   Keywords|ice-on-valid-code   |ice-on-invalid-code

--- Comment #2 from Segher Boessenkool  ---
It uses w4 uninitialised, so it is invalid code, too.

[Bug target/83507] [8 Regression] ICE in internal_dfa_insn_code_* for powerpc targets

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

--- Comment #1 from Segher Boessenkool  ---
I cannot reproduce this on either powerpc-linux or powerpc64-linux.

[Bug target/83554] [8 Regression] ICE: in ix86_mitigate_rop, at config/i386/i386.c:41274 with -mmitigate-rop

2018-01-04 Thread ubizjak at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83554

--- Comment #3 from Uroš Bizjak  ---
Comment on attachment 43035
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=43035
gcc8-pr83554.patch

>(any_rotate:HI (match_dup 0) (const_int 8)))
>   (clobber (reg:CC FLAGS_REG))]
>  "reload_completed
>-  && (TARGET_USE_XCHGB || optimize_function_for_size_p (cfun))"
>+  && (TARGET_USE_XCHGB || optimize_function_for_size_p (cfun))
>+  && QI_REG_P (operands[0])"

You can use QIreg_operand as operand predicate in this pattern.

[Bug rtl-optimization/83628] [8 Regression] performance regression when accessing arrays on alpha

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

--- Comment #5 from Segher Boessenkool  ---
The MULT is not canonical.

For some reason we do not realise we can do the ASHIFT as SI instead of DI.

[Bug rtl-optimization/83628] [8 Regression] performance regression when accessing arrays on alpha

2018-01-04 Thread ubizjak at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83628

Uroš Bizjak  changed:

   What|Removed |Added

 Status|ASSIGNED|NEW
 CC||law at gcc dot gnu.org,
   ||rsandifo at gcc dot gnu.org,
   ||segher at gcc dot gnu.org
  Component|target  |rtl-optimization
   Assignee|ubizjak at gmail dot com   |unassigned at gcc dot 
gnu.org
   Target Milestone|--- |8.0
Summary|performance regression when |[8 Regression] performance
   |accessing arrays on alpha   |regression when accessing
   ||arrays on alpha

--- Comment #4 from Uroš Bizjak  ---
The remaining regression is in make_compound_operation function in combine.c.

In the following testcase:

int test (int a, int b)
{
  return a + b * 4;
}

the compiler (gcc-5) combined:

(insn 7 4 8 2 (set (reg:DI 76)
(ashift:DI (reg/v:DI 74 [ b ])
(const_int 2 [0x2]))) cmp.c:3 64 {ashldi3}
 (expr_list:REG_DEAD (reg/v:DI 74 [ b ])
(nil)))
(insn 8 7 9 2 (set (reg:SI 75 [ D.1494 ])
(plus:SI (subreg:SI (reg:DI 76) 0)
(subreg/s/u:SI (reg/v:DI 73 [ a ]) 0))) cmp.c:3 3 {addsi3}
 (expr_list:REG_DEAD (reg:DI 76)
(expr_list:REG_DEAD (reg/v:DI 73 [ a ])
(nil
into:

Trying 7 -> 8:
Successfully matched this instruction:
(set (reg:SI 75 [ D.1494 ])
(plus:SI (mult:SI (reg:SI 17 $17 [ b ])
(const_int 4 [0x4]))
(reg:SI 16 $16 [ a ])))

This is not the case anymore, the compiler (gcc-8) fails combination with:

Trying 7 -> 8:
7: r75:DI=$17:DI<<0x2
  REG_DEAD $17:DI
8: r74:SI=$16:SI+r75:DI#0
  REG_DEAD $16:DI
  REG_DEAD r75:DI
Failed to match this instruction:
(set (reg:SI 74)
(plus:SI (subreg:SI (ashift:DI (reg:DI 17 $17 [ b ])
(const_int 2 [0x2])) 0)
(reg:SI 16 $16 [ a ])))

This is a rtl-optimization regression from gcc-5 branch.

[Bug target/83681] New: epiphany: config/epiphany/epiphany.h:883:8: error: unknown type name 'rtl_opt_pass'

2018-01-04 Thread sebastian.hu...@embedded-brains.de
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83681

Bug ID: 83681
   Summary: epiphany: config/epiphany/epiphany.h:883:8: error:
unknown type name 'rtl_opt_pass'
   Product: gcc
   Version: 8.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: target
  Assignee: unassigned at gcc dot gnu.org
  Reporter: sebastian.hu...@embedded-brains.de
  Target Milestone: ---

I cannot build an epiphany-rtems5 Ada compiler:

/run/user/10351/b-gcc-epiphany/./gcc/xgcc
-B/run/user/10351/b-gcc-epiphany/./gcc/ -nostdinc
-B/run/user/10351/b-gcc-epiphany/epiphany-rtems5/newlib/ -isystem
/run/user/10351/b-gcc-epiphany/epiphany-rtems5/newlib/targ-include -isystem
/home/sh/src/gcc/newlib/libc/include -B/home/sh/install/epiphany-rtems5/bin/
-B/home/sh/install/epiphany-rtems5/lib/ -isystem
/home/sh/install/epiphany-rtems5/include -isystem
/home/sh/install/epiphany-rtems5/sys-include-c -DCROSS_DIRECTORY_STRUCTURE
-DIN_GCC  -W -Wall -g -O2 -g -O2 -fexceptions -DIN_RTS -DHAVE_GETIPINFO\
-iquote /home/sh/src/gcc/gcc \
 -iquote . -iquote .. -iquote ../.. -iquote /home/sh/src/gcc/gcc/ada
-iquote /home/sh/src/gcc/gcc -I/home/sh/src/gcc/include  \
targext.c -o targext.o
In file included from ../../tm.h:21,
 from targext.c:46:
/home/sh/src/gcc/gcc/config/epiphany/epiphany.h:883:8: error: unknown type name
'rtl_opt_pass'
 extern rtl_opt_pass *make_pass_mode_switch_use (gcc::context *ctxt);
^~~~
/home/sh/src/gcc/gcc/config/epiphany/epiphany.h:883:52: error: expected ')'
before ':' token
 extern rtl_opt_pass *make_pass_mode_switch_use (gcc::context *ctxt);
^
)
/home/sh/src/gcc/gcc/config/epiphany/epiphany.h:884:8: error: unknown type name
'rtl_opt_pass'
 extern rtl_opt_pass *make_pass_resolve_sw_modes (gcc::context *ctxt);
^~~~
/home/sh/src/gcc/gcc/config/epiphany/epiphany.h:884:53: error: expected ')'
before ':' token
 extern rtl_opt_pass *make_pass_resolve_sw_modes (gcc::context *ctxt);
 ^
 )
In file included from ../../tm.h:23,
 from targext.c:46:
/home/sh/src/gcc/gcc/config/elfos.h:201: warning:
"READONLY_DATA_SECTION_ASM_OP" redefined
 #define READONLY_DATA_SECTION_ASM_OP "\t.section\t.rodata"

In file included from ../../tm.h:21,
 from targext.c:46:
/home/sh/src/gcc/gcc/config/epiphany/epiphany.h:671: note: this is the location
of the previous definition
 #define READONLY_DATA_SECTION_ASM_OP "\t.section .rodata"

[Bug c++/83627] -Wdelete-non-virtual-dtor doesn't trigger when calling destructor by hand

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

--- Comment #2 from Jonathan Wakely  ---
Tangentially related: Bug 60262

[Bug debug/83666] [8 Regression] ICE: SIGFPE with -O2 -g --param=sccvn-max-scc-size=10

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

Jakub Jelinek  changed:

   What|Removed |Added

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

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

  1   2   >