[Bug target/25128] [m68k] Suboptimal comparisons against 65536

2016-11-21 Thread law at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=25128

--- Comment #3 from Jeffrey A. Law  ---
Author: law
Date: Mon Nov 21 18:19:12 2016
New Revision: 242676

URL: https://gcc.gnu.org/viewcvs?rev=242676=gcc=rev
Log:
PR target/25128
* config/m68k/predicates.md (swap_peephole_relational_operator): New
predicate.
* config/m68k/m68k.md (relational tests against 65535/65536): New
peephole2.

PR target/25128
* gcc.target/m68k/pr25128.c: New test.

Added:
trunk/gcc/testsuite/gcc.target/m68k/pr25128.c
Modified:
trunk/gcc/ChangeLog
trunk/gcc/config/m68k/m68k.md
trunk/gcc/config/m68k/predicates.md
trunk/gcc/testsuite/ChangeLog

[Bug target/25128] [m68k] Suboptimal comparisons against 65536

2016-11-21 Thread law at redhat dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=25128

Jeffrey A. Law  changed:

   What|Removed |Added

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

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

[Bug c++/70909] Libiberty Demangler segfaults (4)

2016-11-21 Thread trippels at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70909

--- Comment #15 from Markus Trippelsdorf  ---
Thanks for the testcase.
Marcel's patch fixes the segfault, but doesn't demangle the symbol.

markus@x4 libiberty % ./a.out
_ZSt7forwardIR17predicate_matcherIZ11any_matcherIiEDavEUlOT_E_13typed_matcherIiEEES3_RNSt16remove_referenceIS2_E4typeE
typed name
  template
qualified name
  name 'std'
  name 'forward'
template argument list
  reference
template
  name 'predicate_matcher'
  template argument list
local name
  typed name
template
  name 'any_matcher'
  template argument list
builtin type int
function type
  name 'auto'
  argument list
  lambda 0
argument list
  rvalue reference
template parameter 0
template argument list
  template
name 'typed_matcher'
template argument list
  builtin type int
  function type
rvalue reference
  template parameter 0
argument list
  reference
qualified name
  template
qualified name
  standard substitution std
  name 'remove_reference'
template argument list
  template parameter 0
  name 'type'
Failed:
_ZSt7forwardIR17predicate_matcherIZ11any_matcherIiEDavEUlOT_E_13typed_matcherIiEEES3_RNSt16remove_referenceIS2_E4typeE

libc++abi demangler gives:
int&& std::forward&>(std::remove_reference::type&)

[Bug fortran/68544] ICE trying to pass derived type constructor as a function

2016-11-21 Thread gerhard.steinmetz.fort...@t-online.de
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68544

--- Comment #6 from Gerhard Steinmetz  
---

These snippets are silently accepted (t is not an array nor a scalar).


$ cat z3.f90
program p
   type t
   end type
   print *, shape(t)
end

$ gfortran-7-20161120 -Wall -fcheck=all z3.f90
$ a.out

$

---

$ cat z4.f90
subroutine s(t)
   type t
   end type
end

$ gfortran-7-20161120 -c z4.f90
$

[Bug middle-end/78452] New: -Wformat-length=2 wrong length in %s directive with an array argument

2016-11-21 Thread msebor at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78452

Bug ID: 78452
   Summary: -Wformat-length=2 wrong length in %s directive with an
array argument
   Product: gcc
   Version: 7.0
Status: UNCONFIRMED
  Severity: minor
  Priority: P3
 Component: middle-end
  Assignee: unassigned at gcc dot gnu.org
  Reporter: msebor at gcc dot gnu.org
  Target Milestone: ---

When the -Wformat-length=2 option is used, in a call to sprintf with the %s
directive and an argument that refers to two or more arrays of different sizes
at least one of which is greater than the space in the destination, GCC issues
a warning as expected but indicates the wrong number of bytes is being written.
 The test case below shows the problem.  The second warning should say
something like

  ‘%-s’ directive writing up to 4 bytes into a region of size 3

$ cat x.c && /build/gcc-trunk-svn/gcc/xgcc -B /build/gcc-trunk-svn/gcc -O2 -S
-Wall -Wextra -Wpedantic -Wformat-length=2 x.c
char d[3];

const char s3[] = "123";
const char s4[] = "1234";

void f (int i)
{
  const char *s = i < 0 ? s3 : s4;
  __builtin_sprintf (d, "%-s", s);   // warning (expected), bytes correct
}

char a3[3];
char a4[4];

void g (int i)
{
  const char *s = i < 0 ? a3 : a4;
  __builtin_sprintf (d, "%-s", s);   // warning (expected), bytes wrong
}

x.c: In function ‘f’:
x.c:9:26: warning: ‘%-s’ directive writing between 3 and 4 bytes into a region
of size 3 [-Wformat-length=]
   __builtin_sprintf (d, "%-s", s);   // warning (expected), bytes correct
  ^~~
x.c:9:3: note: format output between 4 and 5 bytes into a destination of size 3
   __builtin_sprintf (d, "%-s", s);   // warning (expected), bytes correct
   ^~~
x.c: In function ‘g’:
x.c:18:26: warning: ‘%-s’ directive writing 1 or more bytes into a region of
size 3 [-Wformat-length=]
   __builtin_sprintf (d, "%-s", s);   // warning (expected), bytes wrong
  ^~~
x.c:18:3: note: format output 2 bytes into a destination of size 3
   __builtin_sprintf (d, "%-s", s);   // warning (expected), bytes wrong
   ^~~

[Bug bootstrap/78453] New: arm-none-linux-gnueabihf bootstrap failed with revision 242549

2016-11-21 Thread amker at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78453

Bug ID: 78453
   Summary: arm-none-linux-gnueabihf bootstrap failed with
revision 242549
   Product: gcc
   Version: 7.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: bootstrap
  Assignee: unassigned at gcc dot gnu.org
  Reporter: amker at gcc dot gnu.org
  Target Milestone: ---

Hi,
After revision 242549, arm-linux-gnueabihf bootstrap failed with below message:

../../gcc/gcc/edit-context.c: In member function 'void
edit_context::print_diff(pretty_printer*, bool)':
../../gcc/gcc/edit-context.c:299:1: error: insn does not satisfy its
constraints:
 }
 ^
(insn 69 17 25 3 (set (mem/f/c:DI (plus:SI (reg/f:SI 13 sp)
(const_int 8 [0x8])) [39 c.m_outer_cb+0 S8 A64])
(reg:DI 12 ip)) "../../gcc/gcc/typed-splay-tree.h":56 633
{*movdi_vfp_cortexa8}
 (nil))
../../gcc/gcc/edit-context.c:299:1: internal compiler error: in
extract_constrain_insn, at recog.c:2213
0xa38f27 _fatal_insn(char const*, rtx_def const*, char const*, int, char
const*)
../../gcc/gcc/rtl-error.c:108
0xa38f69 _fatal_insn_not_found(rtx_def const*, char const*, int, char const*)
../../gcc/gcc/rtl-error.c:119
0x9f7055 extract_constrain_insn(rtx_insn*)
../../gcc/gcc/recog.c:2213
0x9fc5bf copyprop_hardreg_forward_1
../../gcc/gcc/regcprop.c:794
0x9fd76b execute
../../gcc/gcc/regcprop.c:1301
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See  for instructions.

GCC is configured as:
../gcc/configure --prefix=/.../target --disable-libssp --disable-libgomp
--disable-libsanitizer --disable-libitm --disable-atomic
--enable-languages=c,c++ --with-arch=armv7-a --with-fpu=neon --with-float=hard

[Bug middle-end/78454] valgrind conditional jump or move depends on uninitialised value(s) in sparseset_bit_p

2016-11-21 Thread trippels at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78454

Markus Trippelsdorf  changed:

   What|Removed |Added

 CC||trippels at gcc dot gnu.org

--- Comment #1 from Markus Trippelsdorf  ---
Did you configure gcc with --enable-valgrind-annotations?

[Bug fortran/68544] ICE trying to pass derived type constructor as a function

2016-11-21 Thread gerhard.steinmetz.fort...@t-online.de
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68544

Gerhard Steinmetz  changed:

   What|Removed |Added

 CC||gerhard.steinmetz.fortran@t
   ||-online.de

--- Comment #3 from Gerhard Steinmetz  
---

Update :


$ cat z1.f90
program p
   type t
   end type
   call f(t)
end


$ gfortran-7-20161120 z1.f90
z1.f90:2:0:

type t

internal compiler error: Segmentation fault
0xc4265f crash_signal
../../gcc/toplev.c:333
0x74c990 gfc_sym_identifier
../../gcc/fortran/trans-decl.c:339
0x74e2e3 build_function_decl
../../gcc/fortran/trans-decl.c:2197
0x75806a gfc_get_symbol_decl(gfc_symbol*)
../../gcc/fortran/trans-decl.c:1622
0x77005f gfc_conv_variable
../../gcc/fortran/trans-expr.c:2494
0x76bcf2 gfc_conv_expr(gfc_se*, gfc_expr*)
../../gcc/fortran/trans-expr.c:7704
0x773aa6 gfc_conv_expr_reference(gfc_se*, gfc_expr*)
../../gcc/fortran/trans-expr.c:7804
0x767220 gfc_conv_procedure_call(gfc_se*, gfc_symbol*, gfc_actual_arglist*,
gfc_expr*, vec*)
../../gcc/fortran/trans-expr.c:5169
0x7b0fe4 gfc_trans_call(gfc_code*, bool, tree_node*, tree_node*, bool)
../../gcc/fortran/trans-stmt.c:407
0x72c59a trans_code
../../gcc/fortran/trans.c:1774
0x75c578 gfc_generate_function_code(gfc_namespace*)
../../gcc/fortran/trans-decl.c:6261
0x6e53e0 translate_all_program_units
../../gcc/fortran/parse.c:6038
0x6e53e0 gfc_parse_file()
../../gcc/fortran/parse.c:6238
0x729052 gfc_be_parse_file
../../gcc/fortran/f95-lang.c:202

[Bug target/78451] New: FAIL: gcc.target/i386/sse-22a.c: error: inlining failed in call to always_inline '_mm512_setzero_ps'

2016-11-21 Thread msebor at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78451

Bug ID: 78451
   Summary: FAIL: gcc.target/i386/sse-22a.c: error: inlining
failed in call to always_inline '_mm512_setzero_ps'
   Product: gcc
   Version: 7.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: target
  Assignee: unassigned at gcc dot gnu.org
  Reporter: msebor at gcc dot gnu.org
  Target Milestone: ---

The gcc.target/i386/sse-22a.c test has been failing with the following error:

FAIL: gcc.target/i386/sse-22a.c (test for excess errors)
Excess errors:
/home/msebor/build/gcc-78284/gcc/include/avx512fintrin.h:244:1: error: inlining
failed in call to always_inline '_mm512_setzero_ps': target specific option
mismatch

On the gcc-rtegression list it's been reported as failing with an ICE:
  https://gcc.gnu.org/ml/gcc-regression/2016-11/msg00380.html

The failure was mentioned in the following discussion:
  https://gcc.gnu.org/ml/gcc-patches/2016-11/msg02066.html

[Bug c++/70909] Libiberty Demangler segfaults (4)

2016-11-21 Thread matt at godbolt dot org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70909

--- Comment #14 from Matt Godbolt  ---
Created attachment 40101
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=40101=edit
compile with gcc 6.2 -std=c++14

This reproduces the issue. Compile with g++ 6.2 and -std=c++14 to create a file
which contains the symbol:

_ZSt7forwardIR17predicate_matcherIZ11any_matcherIiEDavEUlOT_E_13typed_matcherIiEEES3_RNSt16remove_referenceIS2_E4typeE

This symbol crashes both c++filt (2.26.20160125) and gdb (7.10) in the same way
as this bug describes (d_print_comp infinite recursion).

[Bug middle-end/67335] [6/7 Regression] ICE in compiling omp simd function with unused argument

2016-11-21 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67335

--- Comment #3 from Jakub Jelinek  ---
Author: jakub
Date: Mon Nov 21 19:17:36 2016
New Revision: 242678

URL: https://gcc.gnu.org/viewcvs?rev=242678=gcc=rev
Log:
PR middle-end/67335
* omp-simd-clone.c (simd_clone_adjust_argument_types): Use NULL prefix
for tmp simd array if DECL_NAME (parm) is NULL.

* g++.dg/vect/simd-clone-7.cc: New test.

Added:
trunk/gcc/testsuite/g++.dg/vect/simd-clone-7.cc
Modified:
trunk/gcc/ChangeLog
trunk/gcc/omp-simd-clone.c
trunk/gcc/testsuite/ChangeLog

[Bug middle-end/78454] New: valgrind conditional jump or move depends on uninitialised value(s) in sparseset_bit_p

2016-11-21 Thread msebor at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78454

Bug ID: 78454
   Summary: valgrind conditional jump or move depends on
uninitialised value(s) in sparseset_bit_p
   Product: gcc
   Version: 7.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: middle-end
  Assignee: unassigned at gcc dot gnu.org
  Reporter: msebor at gcc dot gnu.org
  Target Milestone: ---

Running the latest trunk of GCC 7.0 under Valgrind shows the errors below.  I
see a report of a similar problem in bug 54689 was closed as invalid though it
references r190503 presumably committed to suppress the reported errors (?) 
Yet the suppression code was present when the bug was filed (with trunk as of
r191663) and is still there on trunk today so I'm not sure what to make of
that.

$ cat x.c && /build/gcc-trunk-svn/gcc/xgcc -B /build/gcc-trunk-svn/gcc -S x.c
-wrapper valgrind
int f (int x)
{
  return x;
}
==5831== Memcheck, a memory error detector
==5831== Copyright (C) 2002-2013, and GNU GPL'd, by Julian Seward et al.
==5831== Using Valgrind-3.10.1 and LibVEX; rerun with -h for copyright info
==5831== Command: /build/gcc-trunk-svn/gcc/cc1 -quiet -iprefix
/home/msebor/build/gcc-trunk-svn/gcc/../lib/gcc/x86_64-pc-linux-gnu/7.0.0/
-isystem /build/gcc-trunk-svn/gcc/include -isystem
/build/gcc-trunk-svn/gcc/include-fixed x.c -quiet -dumpbase x.c -mtune=generic
-march=x86-64 -auxbase x -o x.s
==5831== 
==5831== Conditional jump or move depends on uninitialised value(s)
==5831==at 0xC8FA56: sparseset_bit_p(sparseset_def*, unsigned long)
(sparseset.h:147)
==5831==by 0xC904E4: mark_pseudo_regno_live(int) (ira-lives.c:289)
==5831==by 0xC9079E: mark_pseudo_reg_live(rtx_def*, unsigned int)
(ira-lives.c:373)
==5831==by 0xC9080B: mark_ref_live(df_ref_d*) (ira-lives.c:387)
==5831==by 0xC92F59: process_bb_node_lives(ira_loop_tree_node*)
(ira-lives.c:1254)
==5831==by 0xC68ED2: ira_traverse_loop_tree(bool, ira_loop_tree_node*, void
(*)(ira_loop_tree_node*), void (*)(ira_loop_tree_node*)) (ira-build.c:1806)
==5831==by 0xC93D64: ira_create_allocno_live_ranges() (ira-lives.c:1565)
==5831==by 0xC6D21A: ira_build() (ira-build.c:3422)
==5831==by 0xC6393B: ira(_IO_FILE*) (ira.c:5217)
==5831==by 0xC64154: (anonymous namespace)::pass_ira::execute(function*)
(ira.c:5522)
==5831==by 0xD95BE3: execute_one_pass(opt_pass*) (passes.c:2370)
==5831==by 0xD95F33: execute_pass_list_1(opt_pass*) (passes.c:2459)
==5831== 
==5831== Conditional jump or move depends on uninitialised value(s)
==5831==at 0xC8FA56: sparseset_bit_p(sparseset_def*, unsigned long)
(sparseset.h:147)
==5831==by 0xC8FAE8: sparseset_set_bit(sparseset_def*, unsigned long)
(sparseset.h:166)
==5831==by 0xC8FD5C: make_object_born(ira_object*) (ira-lives.c:120)
==5831==by 0xC90505: mark_pseudo_regno_live(int) (ira-lives.c:293)
==5831==by 0xC9079E: mark_pseudo_reg_live(rtx_def*, unsigned int)
(ira-lives.c:373)
==5831==by 0xC9080B: mark_ref_live(df_ref_d*) (ira-lives.c:387)
==5831==by 0xC92F59: process_bb_node_lives(ira_loop_tree_node*)
(ira-lives.c:1254)
==5831==by 0xC68ED2: ira_traverse_loop_tree(bool, ira_loop_tree_node*, void
(*)(ira_loop_tree_node*), void (*)(ira_loop_tree_node*)) (ira-build.c:1806)
==5831==by 0xC93D64: ira_create_allocno_live_ranges() (ira-lives.c:1565)
==5831==by 0xC6D21A: ira_build() (ira-build.c:3422)
==5831==by 0xC6393B: ira(_IO_FILE*) (ira.c:5217)
==5831==by 0xC64154: (anonymous namespace)::pass_ira::execute(function*)
(ira.c:5522)
==5831== 
==5831== Conditional jump or move depends on uninitialised value(s)
==5831==at 0xCD8587: sparseset_bit_p(sparseset_def*, unsigned long)
(sparseset.h:147)
==5831==by 0xCD993F: check_pseudos_live_through_calls(int)
(lra-lives.c:570)
==5831==by 0xCDA9FF: process_bb_lives(basic_block_def*, int&, bool)
(lra-lives.c:856)
==5831==by 0xCDBFDC: lra_create_live_ranges_1(bool, bool)
(lra-lives.c:1255)
==5831==by 0xCDC2BB: lra_create_live_ranges(bool, bool) (lra-lives.c:1320)
==5831==by 0xCB82BF: lra(_IO_FILE*) (lra.c:2450)
==5831==by 0xC63D56: do_reload() (ira.c:5381)
==5831==by 0xC641EE: (anonymous namespace)::pass_reload::execute(function*)
(ira.c:5565)
==5831==by 0xD95BE3: execute_one_pass(opt_pass*) (passes.c:2370)
==5831==by 0xD95F33: execute_pass_list_1(opt_pass*) (passes.c:2459)
==5831==by 0xD95F64: execute_pass_list_1(opt_pass*) (passes.c:2460)
==5831==by 0xD95FBA: execute_pass_list(function*, opt_pass*)
(passes.c:2470)
==5831== 
==5831== Conditional jump or move depends on uninitialised value(s)
==5831==at 0xCD8587: sparseset_bit_p(sparseset_def*, unsigned long)
(sparseset.h:147)
==5831==by 0xCD993F: check_pseudos_live_through_calls(int)
(lra-lives.c:570)
==5831==by 0xCDA59D: process_bb_lives(basic_block_def*, int&, bool)
(lra-lives.c:785)
==5831==by 0xCDBFDC: 

[Bug fortran/68544] ICE trying to pass derived type constructor as a function

2016-11-21 Thread gerhard.steinmetz.fort...@t-online.de
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68544

--- Comment #5 from Gerhard Steinmetz  
---

Affects several intrinsic functions/subroutines ...

$ cat z7.f90
program p
   type t
   end type
   print *, atomic_define(t)
   print *, atomic_ref(t)
   print *, coshape(t)
   print *, cpu_time(t)
   print *, date_and_time(t)
   print *, execute_command_line(t)
   print *, findloc(t)
   print *, get_command(t)
   print *, get_command_argument(t)
   print *, get_environment_variable(t)
   print *, is_contiguous(t)
   print *, move_alloc(t)
   print *, mvbits(t)
   print *, out_of_range(t)
   print *, random_init(t)
   print *, random_number(t)
   print *, random_seed(t)
   print *, rank(t)
   print *, reduce(t)
   print *, system_clock(t)
end

[Bug middle-end/78454] valgrind conditional jump or move depends on uninitialised value(s) in sparseset_bit_p

2016-11-21 Thread msebor at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78454

Martin Sebor  changed:

   What|Removed |Added

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

--- Comment #2 from Martin Sebor  ---
As suggested in comment #1, configuring GCC with --enable-valgrind-annotations
is needed.  Unfortunately, after that, a build fails with the errors below:

checking for valgrind.h... no
checking for VALGRIND_DISCARD in ... no
checking for VALGRIND_DISCARD in ... no
configure: error: *** Can't find valgrind/memcheck.h, memcheck.h or valgrind.h
Makefile:4286: recipe for target 'configure-stage1-gcc' failed
make[1]: *** [configure-stage1-gcc] Error 1

It seems that valgrind-devel needs to be installed in order for this to work
(it would be nice if the top-level configure warned or failed when it isn't).

With these problems out of the way though, the Valgrind errors disappear. 
Reverting r190503 brings them back, so it did indeed fix the referenced bug
54689.  I'm going to resolve this bug as a duplicate of the older one.  I've
also updated the Debugging GCC Wiki page
(https://gcc.gnu.org/wiki/DebuggingGCC) to mention this.

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

[Bug middle-end/54689] sparseset.h:147 Conditional jump or move depends on uninitialised value(s)

2016-11-21 Thread msebor at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=54689

Martin Sebor  changed:

   What|Removed |Added

 CC||msebor at gcc dot gnu.org

--- Comment #3 from Martin Sebor  ---
*** Bug 78454 has been marked as a duplicate of this bug. ***

[Bug fortran/78443] [OOP] Incorrect behavior with non_overridable keyword

2016-11-21 Thread janus at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78443

--- Comment #2 from janus at gcc dot gnu.org ---
Indeed this behavior is a bug.

Looking at the dump generated with -fdump-tree-original, it seems that all
typebound-procedure calls are generated as they should be:

* The three calls in the main program are reduced to non-polymorphic calls:

test2 (, );
test2 (, );
test1 (, );

* The calls to 'square' in the test procedures are performed polymorphically:

  D.3553 = this->_vptr->square ((struct __class_types_P2_t *) this,
(real(kind=4) *) x);
  D.3555 = this->_vptr->square ((struct __class_types_P1_t *) this,
(real(kind=4) *) x);


So, what goes wrong is probably the assignment of the TBPs in the vtab.

[Bug bootstrap/77676] powerpc64 and powerpc64le stage2 bootstrap fail

2016-11-21 Thread msebor at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77676

Martin Sebor  changed:

   What|Removed |Added

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

--- Comment #18 from Martin Sebor  ---
The patch to re-enable -fprintf-return-value was committed in r242674 after
successfully bootstrapping on powerpc64*, i386, and x86_64 and passing
regression tests.  Please open a new bug for any new problems related to the
option.

[Bug tree-optimization/78428] [5/6/7 Regression] wrong code at -O2 and -O3 on x86_64-linux-gnu in 64-bit mode

2016-11-21 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78428

Jakub Jelinek  changed:

   What|Removed |Added

 CC||jakub at gcc dot gnu.org

--- Comment #3 from Jakub Jelinek  ---
I think store_constructor/store_constructor_field should get
bitregion_{start,end} arguments and pass them through, so that initializing
some object through expand_constructor honors the object boundaries like e.g.
expand_assignment does.

[Bug target/78439] [7 Regression] error: insn does not satisfy its constraints (arm-linux-gnueabihf)

2016-11-21 Thread amker at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78439

amker at gcc dot gnu.org changed:

   What|Removed |Added

 CC||amker at gcc dot gnu.org

--- Comment #6 from amker at gcc dot gnu.org ---
(In reply to ktkachov from comment #3)
> The ICE happens due to r242590.
> Need to figure out if it is the cause of the bug or just exposes it

It looks like the same bug as PR78453, but for that one, r242549 is the first
guilty revision.

[Bug c++/71973] c++ handles built-in functions inconsistently

2016-11-21 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71973

--- Comment #6 from Jakub Jelinek  ---
Author: jakub
Date: Mon Nov 21 18:55:11 2016
New Revision: 242677

URL: https://gcc.gnu.org/viewcvs?rev=242677=gcc=rev
Log:
PR c++/71973
* g++.dg/torture/pr53321.C (size_t): Use __SIZE_TYPE__ instead of
long unsigned int.
* g++.dg/torture/pr63512.C (::strlen): Use __SIZE_TYPE__ instead of
unsigned long.

Modified:
trunk/gcc/testsuite/ChangeLog
trunk/gcc/testsuite/g++.dg/torture/pr53321.C
trunk/gcc/testsuite/g++.dg/torture/pr63512.C

[Bug tree-optimization/78428] [5/6/7 Regression] wrong code at -O2 and -O3 on x86_64-linux-gnu in 64-bit mode

2016-11-21 Thread hjl.tools at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78428

--- Comment #4 from H.J. Lu  ---
Before r218818, struct of 12 bytes is aligned at 4 bytes without -Os
and 8 bytes with -Os.  After r218818, it is always aligned at 8 bytes,
which triggers struct store memory leak:

movq%rax, b+8(%rip)

Since b is 12 bytes and a is placed next to b, it overrides a.

[Bug fortran/68544] ICE trying to pass derived type constructor as a function

2016-11-21 Thread gerhard.steinmetz.fort...@t-online.de
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68544

--- Comment #4 from Gerhard Steinmetz  
---

Invalid code with a function :


$ cat z2.f90
program p
   type t
   end type
   print *, f(t)
end


$ gfortran-7-20161120 z2.f90
z2.f90:2:0:

type t

internal compiler error: Segmentation fault
0xc4265f crash_signal
../../gcc/toplev.c:333
0x74c990 gfc_sym_identifier
../../gcc/fortran/trans-decl.c:339
0x74e2e3 build_function_decl
../../gcc/fortran/trans-decl.c:2197
0x75806a gfc_get_symbol_decl(gfc_symbol*)
../../gcc/fortran/trans-decl.c:1622
0x77005f gfc_conv_variable
../../gcc/fortran/trans-expr.c:2494
0x76bcf2 gfc_conv_expr(gfc_se*, gfc_expr*)
../../gcc/fortran/trans-expr.c:7704
0x773aa6 gfc_conv_expr_reference(gfc_se*, gfc_expr*)
../../gcc/fortran/trans-expr.c:7804
0x767220 gfc_conv_procedure_call(gfc_se*, gfc_symbol*, gfc_actual_arglist*,
gfc_expr*, vec*)
../../gcc/fortran/trans-expr.c:5169
0x76bcd2 gfc_conv_expr(gfc_se*, gfc_expr*)
../../gcc/fortran/trans-expr.c:7696
0x7737d8 gfc_conv_expr_reference(gfc_se*, gfc_expr*)
../../gcc/fortran/trans-expr.c:7831
0x79a586 gfc_trans_transfer(gfc_code*)
../../gcc/fortran/trans-io.c:2482
0x72c237 trans_code
../../gcc/fortran/trans.c:1902
0x7972e0 build_dt
../../gcc/fortran/trans-io.c:1980
0x72c257 trans_code
../../gcc/fortran/trans.c:1874
0x75c578 gfc_generate_function_code(gfc_namespace*)
../../gcc/fortran/trans-decl.c:6261
0x6e53e0 translate_all_program_units
../../gcc/fortran/parse.c:6038
0x6e53e0 gfc_parse_file()
../../gcc/fortran/parse.c:6238
0x729052 gfc_be_parse_file
../../gcc/fortran/f95-lang.c:202

[Bug c++/78425] Atrtibute warning message location incorrect

2016-11-21 Thread msebor at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78425

Martin Sebor  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2016-11-21
 CC||msebor at gcc dot gnu.org
 Ever confirmed|0   |1

--- Comment #1 from Martin Sebor  ---
Confirmed.  The location information for attributes isn't correct either in C
or in C++ as the following test case shows:

$ cat x.C && /build/gcc-svn/gcc/xgcc -B /build/gcc-svn/gcc -S -Wall -Wextra
-xc++ x.C
#define ARG_NONNULL __attribute__ ((nonnull))
#define RET_NONNULL __attribute__ ((returns_nonnull))

void ARG_NONNULL f0 (void*) RET_NONNULL;
void RET_NONNULL f1 (void*) ARG_NONNULL;

void __attribute__ ((nonnull)) f2 (void*) __attribute__ ((returns_nonnull));
void __attribute__ ((returns_nonnull)) f3 (void*) __attribute__ ((nonnull));


x.C:2:53: error: returns_nonnull attribute on a function not returning a
pointer
 #define RET_NONNULL __attribute__ ((returns_nonnull))
 ^
x.C:4:29: note: in expansion of macro ‘RET_NONNULL’
 void ARG_NONNULL f0 (void*) RET_NONNULL;
 ^~~
x.C:1:45: error: returns_nonnull attribute on a function not returning a
pointer
 #define ARG_NONNULL __attribute__ ((nonnull))
 ^
x.C:5:29: note: in expansion of macro ‘ARG_NONNULL’
 void RET_NONNULL f1 (void*) ARG_NONNULL;
 ^~~
x.C:7:75: error: returns_nonnull attribute on a function not returning a
pointer
 void __attribute__ ((nonnull)) f2 (void*) __attribute__ ((returns_nonnull));
   ^
x.C:8:75: error: returns_nonnull attribute on a function not returning a
pointer
 void __attribute__ ((returns_nonnull)) f3 (void*) __attribute__ ((nonnull));
   ^

When compiled in C mode the messages are almost as bad (though more obviously
wrong and so less confusing)

x.C:4:1: error: returns_nonnull attribute on a function not returning a pointer
 void ARG_NONNULL f0 (void*) RET_NONNULL;
 ^~~~
x.C:5:1: error: returns_nonnull attribute on a function not returning a pointer
 void RET_NONNULL f1 (void*) ARG_NONNULL;
 ^~~~
x.C:7:1: error: returns_nonnull attribute on a function not returning a pointer
 void __attribute__ ((nonnull)) f2 (void*) __attribute__ ((returns_nonnull));
 ^~~~
x.C:8:1: error: returns_nonnull attribute on a function not returning a pointer
 void __attribute__ ((returns_nonnull)) f3 (void*) __attribute__ ((nonnull));
 ^~~~

[Bug sanitizer/78208] Compile-time hog with -fsanitize=null with operator overloading

2016-11-21 Thread mpolacek at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78208

--- Comment #2 from Marek Polacek  ---
I think the compile-hog would also be visible with -Wduplicated-branches, but
that's not in yet (and it's unclear whether it will make its way in to GCC 7).

[Bug tree-optimization/78428] [5/6/7 Regression] wrong code at -O2 and -O3 on x86_64-linux-gnu in 64-bit mode

2016-11-21 Thread marxin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78428

Martin Liška  changed:

   What|Removed |Added

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

--- Comment #5 from Martin Liška  ---
I'm working on a patch.

[Bug fortran/78443] [OOP] Incorrect behavior with non_overridable keyword

2016-11-21 Thread janus at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78443

janus at gcc dot gnu.org changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |FIXED
   Assignee|unassigned at gcc dot gnu.org  |janus at gcc dot gnu.org

--- Comment #3 from janus at gcc dot gnu.org ---
(In reply to janus from comment #2)
> So, what goes wrong is probably the assignment of the TBPs in the vtab.

We simply fail to set the TBP entry for 'square' in the vtabs of C1 and C2.
This patch fixes it and regtests cleanly:


Index: gcc/fortran/class.c
===
--- gcc/fortran/class.c (Revision 242657)
+++ gcc/fortran/class.c (Arbeitskopie)
@@ -751,9 +751,6 @@ add_proc_comp (gfc_symbol *vtype, const char *name
 {
   gfc_component *c;

-  if (tb->non_overridable)
-return;
-
   c = gfc_find_component (vtype, name, true, true, NULL);

   if (c == NULL)


With this, the output of the test case becomes ...

 square(   2. ) =   -100.00
 square(   2. ) =4.
 square(   2. ) =4.

... which I believe is correct.

Note: The patch may be a bit too strong, but it does no harm. There are cases
where one can avoid having a TBP entry in the vtab, namely if the
non-overridable procedure itself is not overriding a procedure from the parent
class. I'll try to create an improved patch which implements such as check.

[Bug bootstrap/78453] arm-none-linux-gnueabihf bootstrap failed with revision 242549

2016-11-21 Thread wilco at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78453

wilco at gcc dot gnu.org changed:

   What|Removed |Added

 CC||wilco at gcc dot gnu.org

--- Comment #1 from wilco at gcc dot gnu.org ---
(In reply to amker from comment #0)
> Hi,
> After revision 242549, arm-linux-gnueabihf bootstrap failed with below
> message:
> 
> ../../gcc/gcc/edit-context.c: In member function 'void
> edit_context::print_diff(pretty_printer*, bool)':
> ../../gcc/gcc/edit-context.c:299:1: error: insn does not satisfy its
> constraints:
>  }
>  ^
> (insn 69 17 25 3 (set (mem/f/c:DI (plus:SI (reg/f:SI 13 sp)
> (const_int 8 [0x8])) [39 c.m_outer_cb+0 S8 A64])
> (reg:DI 12 ip)) "../../gcc/gcc/typed-splay-tree.h":56 633
> {*movdi_vfp_cortexa8}


That's a latent bug - see https://patchwork.ozlabs.org/patch/220135/

"In ARM mode only, the pair of registers IP and SP is allowed as operands in
LDRD/STRD. To handle it, this patch defines a new constraint "q" to be
CORE_REGS in ARM mode and GENERAL_REGS (i.e., equivalent to "r") otherwise.
Note that in ARM mode "q" is not equivalent to "rk" because of the way
constraints are matched. The new constraint "q" is used in place of "r" for
DImode move between register and memory."


So "q" is needed for strd on ARM, and this is used by movdi_vfp but not by
movdi_vfp_cortexa8...

[Bug fortran/68567] ICE on using wrong defined arrays (different cases/messages)

2016-11-21 Thread law at redhat dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68567

Jeffrey A. Law  changed:

   What|Removed |Added

   Priority|P3  |P4
 CC||law at redhat dot com

[Bug target/78426] [7 Regression] wrong code with strncmp on SH

2016-11-21 Thread law at redhat dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78426

Jeffrey A. Law  changed:

   What|Removed |Added

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

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

[Bug fortran/78027] [6/7 Regression] ICE in new_oacc_loop_routine, at omp-low.c:19000

2016-11-21 Thread law at redhat dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78027

Jeffrey A. Law  changed:

   What|Removed |Added

   Priority|P3  |P4
 CC||law at redhat dot com

[Bug target/68538] ICE in gen_reg_rtx, at emit-rtl.c:1027 when cross-compiling for cris-linux-gnu target

2016-11-21 Thread egall at gwmail dot gwu.edu
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68538

Eric Gallager  changed:

   What|Removed |Added

 CC||egall at gwmail dot gwu.edu

--- Comment #4 from Eric Gallager  ---
After seeing this report, I'm realizing that Bug 71009 which I filed might be a
duplicate of this one; it's also an ICE at the same place in emit-rtl.c for the
same reason of can_create_pseudo_p having an issue. It's just for a different
target though.

[Bug fortran/68568] ICE with automatic character object and save, in combination with some options

2016-11-21 Thread law at redhat dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68568

Jeffrey A. Law  changed:

   What|Removed |Added

   Priority|P3  |P4
 CC||law at redhat dot com

[Bug tree-optimization/78114] [7 regression] gfortran.dg/vect/fast-math-mgrid-resid.f FAILs

2016-11-21 Thread law at redhat dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78114

Jeffrey A. Law  changed:

   What|Removed |Added

   Priority|P3  |P4
 CC||law at redhat dot com

[Bug fortran/78122] [5/6/7 Regression] [F08] ICE in get, at cgraph.h:395

2016-11-21 Thread law at redhat dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78122

Jeffrey A. Law  changed:

   What|Removed |Added

   Priority|P3  |P4
 CC||law at redhat dot com

[Bug target/68538] ICE in gen_reg_rtx, at emit-rtl.c:1027 when cross-compiling for cris-linux-gnu target

2016-11-21 Thread law at redhat dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68538

Jeffrey A. Law  changed:

   What|Removed |Added

 CC||law at redhat dot com

--- Comment #3 from Jeffrey A. Law  ---
This is still a problem on the trunk.  I'm not at all familiar with the CRIS
port, but ISTM that we should never be calling copy_to_mode_reg when
!can_create_pseudo_p because copy_to_mode_reg always creates a new pseudo.

[Bug c++/78425] Atrtibute warning message location incorrect

2016-11-21 Thread msebor at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78425

Martin Sebor  changed:

   What|Removed |Added

  Known to fail||5.3.0, 6.2.0, 7.0

--- Comment #2 from Martin Sebor  ---
Besides 7.0 this also affects both of 6.x and 5.x so it's not a regression.

[Bug rtl-optimization/78437] [7 Regression]: Invalid sign-extend conversion in REE pass

2016-11-21 Thread law at redhat dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78437

Jeffrey A. Law  changed:

   What|Removed |Added

   Priority|P3  |P4
 CC||law at redhat dot com

[Bug tree-optimization/78455] New: [7 Regression] ICE in operator[], at vec.h:732

2016-11-21 Thread asolokha at gmx dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78455

Bug ID: 78455
   Summary: [7 Regression] ICE in operator[], at vec.h:732
   Product: gcc
   Version: 7.0
Status: UNCONFIRMED
  Keywords: ice-on-valid-code
  Severity: normal
  Priority: P3
 Component: tree-optimization
  Assignee: unassigned at gcc dot gnu.org
  Reporter: asolokha at gmx dot com
CC: aldyh at gcc dot gnu.org
  Target Milestone: ---

gcc-7.0.0-alpha20161120 snapshot fails to compile the following reduced snippet
w/ -O2 (-Os, -Og) -Wuninitialized:

int ij;

void
ql (void)
{
  int m5 = 0;

  for (;;)
  {
if (0)
  for (;;)
  {
int *go;
int *t4 = go;

 l1:
*t4 = (*t4 != 0) ? 0 : 2;
  }

if (ij != 0)
  goto l1;
  }
}

% x86_64-unknown-linux-gnu-gcc-7.0.0-alpha20161120 -O2 -Wuninitialized -c
dwgke5h1.c
dwgke5h1.c: In function 'ql':
dwgke5h1.c:4:1: internal compiler error: in operator[], at vec.h:732
 ql (void)
 ^~

r242639 must be a culprit, given that the top of backtrace is this:

Breakpoint 1, 0x013a3db0 in internal_error(char const*, ...) ()
(gdb) where
#0  0x013a3db0 in internal_error(char const*, ...) ()
#1  0x013a22c4 in fancy_abort(char const*, int, char const*) ()
#2  0x00d8e861 in uninit_ops_invalidate_phi_use(gphi*, unsigned int,
vec, va_heap, vl_ptr>) ()



[Bug c++/47877] -fvisibility-inlines-hidden does not hide member template functions

2016-11-21 Thread jengelh at inai dot de
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=47877

--- Comment #3 from Jan Engelhardt  ---
Hm yes, I begin to see why this was done. Template instantiations show up as
W-type symbols in `nm`, and template specializations are 'T'-type, and both
need to be visible so that the override works.

But only on -O0.

When compiling with -O2, the template instantiations gets inlined and the
symbol (_ZN3Foo3barIS_EEvv in this example) disappears because of
-fvisibility-inlines-hidden and could not possibly be overridden. So template
specializations from elsewhere will have no effect.

...

So IMO we can probably just drop the "!processing_template_decl" part.

[Bug go/78432] [7 Regression] -fdump-go-spec ICEs for aligned causing x32 libgo library to fail to build

2016-11-21 Thread law at redhat dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78432

Jeffrey A. Law  changed:

   What|Removed |Added

   Priority|P3  |P4
 CC||law at redhat dot com

[Bug go/78431] [7 regression] ICE in go_append_padding, at godump.c:636

2016-11-21 Thread law at redhat dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78431

Jeffrey A. Law  changed:

   What|Removed |Added

   Priority|P3  |P4
 CC||law at redhat dot com

[Bug fortran/77746] [5/6/7 Regression] [F03] Wrong subroutine called, clash of specific procedure name and binding-name

2016-11-21 Thread law at redhat dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77746

Jeffrey A. Law  changed:

   What|Removed |Added

   Priority|P3  |P4
 CC||law at redhat dot com

[Bug c++/78457] attempt to instantiate unused template

2016-11-21 Thread rs2740 at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78457

TC  changed:

   What|Removed |Added

 CC||rs2740 at gmail dot com

--- Comment #1 from TC  ---
Doesn't seem to be a bug to me. This is caused by basically the same issue as
the one noted in https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69116#c2.

std::endl names a function template, so it's a nondeduced context. Deduction
for `std::ostream& operator<<(std::ostream& os, Y const& )` therefore
succeeds with Ts..., not otherwise deduced, deduced be to an empty pack. Then
during overload resolution the compiler instantiates the definition of `Y<>` to
see if it can be constructed from std::endl; that instantiation triggers a hard
error outside the immediate context as expected.

[Bug c++/77949] [7 Regression] ICE on invalid code in internal compiler error: in linemap_position_for_loc_and_offset, at libcpp/line-map.c:907

2016-11-21 Thread dmalcolm at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77949

David Malcolm  changed:

   What|Removed |Added

 Status|NEW |ASSIGNED
   Assignee|aldyh at gcc dot gnu.org   |dmalcolm at gcc dot 
gnu.org

[Bug target/78460] New: [7 Regression] [SH] OOM building glibc string tst-cmp.c

2016-11-21 Thread jsm28 at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78460

Bug ID: 78460
   Summary: [7 Regression] [SH] OOM building glibc string
tst-cmp.c
   Product: gcc
   Version: 7.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: target
  Assignee: unassigned at gcc dot gnu.org
  Reporter: jsm28 at gcc dot gnu.org
  Target Milestone: ---
Target: sh4-linux-gnu

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

GCC mainline built for sh4-linux-gnu runs out of memory building
string/tst-cmp.c.  The symptom observed is that cc1's memory usage goes up by a
bit under 1GB a second until it's killed after exhausting memory and swap (on a
system with 128GB of each).  Compile with: sh4-glibc-linux-gnu-gcc -S tst-cmp.i
-fno-isolate-erroneous-paths-dereference -fno-isolate-erroneous-paths-attribute
-std=gnu11 -fgnu89-inline  -O2 -fmerge-all-constants -g

Preprocessed source attached.

[Bug libstdc++/69782] [6/7 Regression] defining min() macro causes thousand of lines of error messages

2016-11-21 Thread law at redhat dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69782

Jeffrey A. Law  changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 CC||law at redhat dot com
 Resolution|--- |WONTFIX

--- Comment #10 from Jeffrey A. Law  ---
Per c#8/c#9.

[Bug ipa/77674] [7 Regression] ICE in binds_to_current_def_p with -fkeep-inline-functions

2016-11-21 Thread law at redhat dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77674

--- Comment #5 from Jeffrey A. Law  ---
*** Bug 71616 has been marked as a duplicate of this bug. ***

[Bug ipa/77674] [7 Regression] ICE in binds_to_current_def_p with -fkeep-inline-functions

2016-11-21 Thread law at redhat dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77674

Jeffrey A. Law  changed:

   What|Removed |Added

 CC||su at cs dot ucdavis.edu

--- Comment #3 from Jeffrey A. Law  ---
*** Bug 71353 has been marked as a duplicate of this bug. ***

[Bug ipa/77674] [7 Regression] ICE in binds_to_current_def_p with -fkeep-inline-functions

2016-11-21 Thread law at redhat dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77674

Jeffrey A. Law  changed:

   What|Removed |Added

 CC||hjl.tools at gmail dot com

--- Comment #4 from Jeffrey A. Law  ---
*** Bug 71524 has been marked as a duplicate of this bug. ***

[Bug tree-optimization/77318] [7 regression] FAIL: gfortran.dg/graphite/pr68279.f90 -O (internal compiler error)

2016-11-21 Thread law at redhat dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77318

Jeffrey A. Law  changed:

   What|Removed |Added

   Priority|P3  |P4
 CC||law at redhat dot com

[Bug tree-optimization/77856] [7 Regression] wrong code at -O2 on x86_64-linux-gnu in 32-bit mode

2016-11-21 Thread law at redhat dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77856

Jeffrey A. Law  changed:

   What|Removed |Added

   Priority|P3  |P1
 CC||law at redhat dot com

[Bug target/77761] [7 Regression] wrong code with -fschedule-insns -mavx512f --param=max-pending-list-length=512

2016-11-21 Thread law at redhat dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77761

Jeffrey A. Law  changed:

   What|Removed |Added

   Priority|P3  |P1
 CC||law at redhat dot com

[Bug tree-optimization/71408] [7 Regression] wrong code at -Os and above on x86_64-linux-gnu

2016-11-21 Thread law at redhat dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71408

Jeffrey A. Law  changed:

   What|Removed |Added

   Priority|P3  |P1
 CC||law at redhat dot com

[Bug tree-optimization/71408] [7 Regression] wrong code at -Os and above on x86_64-linux-gnu

2016-11-21 Thread kugan at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71408

kugan at gcc dot gnu.org changed:

   What|Removed |Added

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

--- Comment #7 from kugan at gcc dot gnu.org ---
Fixed in trunk.

[Bug tree-optimization/78455] [7 Regression] ICE in operator[], at vec.h:732

2016-11-21 Thread mpolacek at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78455

Marek Polacek  changed:

   What|Removed |Added

 CC||mpolacek at gcc dot gnu.org

--- Comment #2 from Marek Polacek  ---
It seems like this is just a typo?

--- a/gcc/tree-ssa-uninit.c
+++ b/gcc/tree-ssa-uninit.c
@@ -2192,7 +2192,7 @@ can_chain_union_be_invalidated_p (pred_chain_union
use_preds,
   pred_chain c = use_preds[i];
   bool entire_pred_chain_invalidated = false;
   for (size_t j = 0; j < c.length (); ++j)
-   if (can_one_predicate_be_invalidated_p (c[i], worklist))
+   if (can_one_predicate_be_invalidated_p (c[j], worklist))
  {
entire_pred_chain_invalidated = true;
break;

fixes it.

[Bug target/77493] [6/7 Regression] -fcrossjumping (-O2) on ppc64le causes segfaults (jump to 0x0) (first bad r230091)

2016-11-21 Thread law at redhat dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77493

Jeffrey A. Law  changed:

   What|Removed |Added

   Priority|P3  |P1
 CC||law at redhat dot com

[Bug target/78458] New: [7 Regression] LRA ICE building libgcc for powerpc-linux-gnuspe e500v2

2016-11-21 Thread jsm28 at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78458

Bug ID: 78458
   Summary: [7 Regression] LRA ICE building libgcc for
powerpc-linux-gnuspe e500v2
   Product: gcc
   Version: 7.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: target
  Assignee: unassigned at gcc dot gnu.org
  Reporter: jsm28 at gcc dot gnu.org
  Target Milestone: ---
Target: powerpc-linux-gnuspe

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

GCC mainline has an ICE in LRA when building libgcc for powerpc-linux-gnuspe
target (configured with --enable-e500-double and --with-glibc-version=2.24 to
get the relevant handling of DFmode and TFmode).  I'll attach preprocessed
source of the relevant libgcc file.  Compile with: -g -O2 -fPIC
-mlong-double-128 -mno-minimal-toc -fbuilding-libgcc -fno-stack-protector -S
multc3.i

/scratch/jmyers/glibc/many7/src/gcc/libgcc/libgcc2.c: In function '__multc3':
/scratch/jmyers/glibc/many7/src/gcc/libgcc/libgcc2.c:2035:1: internal compiler
error: in lra_set_insn_recog_data, at lra.c:965
 }
 ^
0x9b41cc lra_set_insn_recog_data(rtx_insn*)
/scratch/jmyers/glibc/many7/src/gcc/gcc/lra.c:963
0x9b43ef lra_get_insn_recog_data
/scratch/jmyers/glibc/many7/src/gcc/gcc/lra-int.h:487
0x9b43ef lra_update_insn_regno_info(rtx_insn*)
/scratch/jmyers/glibc/many7/src/gcc/gcc/lra.c:1585
0x9b46bf lra_update_insn_regno_info(rtx_insn*)
/scratch/jmyers/glibc/many7/src/gcc/gcc/vec.h:1447
0x9b46bf lra_push_insn_1
/scratch/jmyers/glibc/many7/src/gcc/gcc/lra.c:1736
0x9b46bf lra_push_insn(rtx_insn*)
/scratch/jmyers/glibc/many7/src/gcc/gcc/lra.c:1744
0x9b46bf push_insns
/scratch/jmyers/glibc/many7/src/gcc/gcc/lra.c:1787
0x9b5f2d lra_process_new_insns(rtx_insn*, rtx_insn*, rtx_insn*, char const*)
/scratch/jmyers/glibc/many7/src/gcc/gcc/lra.c:1835
0x9c15f8 split_reg
/scratch/jmyers/glibc/many7/src/gcc/gcc/lra-constraints.c:5370
0x9c2134 inherit_in_ebb
/scratch/jmyers/glibc/many7/src/gcc/gcc/lra-constraints.c:6179
0x9c6b23 lra_inheritance()
/scratch/jmyers/glibc/many7/src/gcc/gcc/lra-constraints.c:6249
0x9b6d52 lra(_IO_FILE*)
/scratch/jmyers/glibc/many7/src/gcc/gcc/lra.c:2403
0x96c231 do_reload
/scratch/jmyers/glibc/many7/src/gcc/gcc/ira.c:5381
0x96c231 execute
/scratch/jmyers/glibc/many7/src/gcc/gcc/ira.c:5565
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See  for instructions.

[Bug target/78458] [7 Regression] LRA ICE building libgcc for powerpc-linux-gnuspe e500v2

2016-11-21 Thread meissner at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78458

Michael Meissner  changed:

   What|Removed |Added

 CC||meissner at gcc dot gnu.org

--- Comment #1 from Michael Meissner  ---
What subversion id did you build with?  Was it before or after subversion id
242679 which was my last checkin to movdi in rs6000.md?

[Bug target/78459] New: [7 Regression] [SH] ICE in maybe_record_trace_start building glibc string tests

2016-11-21 Thread jsm28 at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78459

Bug ID: 78459
   Summary: [7 Regression] [SH] ICE in maybe_record_trace_start
building glibc string tests
   Product: gcc
   Version: 7.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: target
  Assignee: unassigned at gcc dot gnu.org
  Reporter: jsm28 at gcc dot gnu.org
  Target Milestone: ---
Target: sh4-linux-gnu

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

GCC mainline built for sh4-linux-gnu has an ICE building glibc string/tester.c.
 Compile with: sh4-glibc-linux-gnu-gcc -S tester.i
-fno-isolate-erroneous-paths-dereference -fno-isolate-erroneous-paths-attribute
-std=gnu11 -fgnu89-inline  -O2 -fmerge-all-constants -g

tester.c: In function 'test_strcpy':
tester.c:178:1: internal compiler error: in maybe_record_trace_start, at
dwarf2cfi.c:2328
 }
 ^
0x76f73c maybe_record_trace_start
/scratch/jmyers/glibc/many7/src/gcc/gcc/dwarf2cfi.c:2328
0x770040 scan_trace
/scratch/jmyers/glibc/many7/src/gcc/gcc/dwarf2cfi.c:2510
0x77086a create_cfi_notes
/scratch/jmyers/glibc/many7/src/gcc/gcc/dwarf2cfi.c:2664
0x77086a execute_dwarf2_frame
/scratch/jmyers/glibc/many7/src/gcc/gcc/dwarf2cfi.c:3022
0x77086a execute
/scratch/jmyers/glibc/many7/src/gcc/gcc/dwarf2cfi.c:3502
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See  for instructions.

Preprocessed source attached.

[Bug target/78438] [7 Regression] incorrect comparison optimization

2016-11-21 Thread segher at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78438

--- Comment #5 from Segher Boessenkool  ---
Why is this wrong?  This isn't the same reg 94 (it is reused):

Failed to match this instruction:
(set (mem/c:QI (symbol_ref:DI ("a") [flags 0x2]  )
[0 a+0 S1 A8])
(subreg:QI (ashiftrt:SI (reg:SI 93 [ b ])
(const_int 26 [0x1a])) 0))
Successfully matched this instruction:
(set (reg:SI 94)
(ashiftrt:SI (reg:SI 93 [ b ])
(const_int 26 [0x1a])))
Successfully matched this instruction:
(set (mem/c:QI (symbol_ref:DI ("a") [flags 0x2]  )
[0 a+0 S1 A8])
(subreg:QI (reg:SI 94) 0))

The low 8 bits of  r93 a>> 26  are exactly what we need to store afaics?

[Bug fortran/78443] [OOP] Incorrect behavior with non_overridable keyword

2016-11-21 Thread janus at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78443

janus at gcc dot gnu.org changed:

   What|Removed |Added

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

--- Comment #4 from janus at gcc dot gnu.org ---
Here is an improved patch:


===
--- gcc/fortran/class.c (Revision 242657)
+++ gcc/fortran/class.c (Arbeitskopie)
@@ -751,7 +751,7 @@ add_proc_comp (gfc_symbol *vtype, const char *name
 {
   gfc_component *c;

-  if (tb->non_overridable)
+  if (tb->non_overridable && !tb->overridden)
 return;

   c = gfc_find_component (vtype, name, true, true, NULL);


It gives the same output and regtests cleanly as well.

[Bug fortran/68568] ICE with automatic character object and save, in combination with some options

2016-11-21 Thread anlauf at gmx dot de
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68568

--- Comment #5 from Harald Anlauf  ---
The original testcase hits an assert in trans-decl.c:1704

1698  /* Associate names can use the hidden string length variable
1699 of their associated target.  */
1700  if (sym->ts.type == BT_CHARACTER
1701  && TREE_CODE (length) != INTEGER_CST)
1702{
1703  gfc_finish_var_decl (length, sym);
1704  gcc_assert (!sym->value);
1705}
1706
1707  gfc_finish_var_decl (decl, sym);

If the assert is removed, the testcase compiles.

[Bug tree-optimization/77362] [6/7 Regression] [graphite] ICE in sese_build_liveouts_use w/ -O2 -floop-nest-optimize

2016-11-21 Thread law at redhat dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77362

Jeffrey A. Law  changed:

   What|Removed |Added

   Priority|P3  |P4
 CC||law at redhat dot com

[Bug target/68538] ICE in gen_reg_rtx, at emit-rtl.c:1027 when cross-compiling for cris-linux-gnu target

2016-11-21 Thread law at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68538

--- Comment #6 from Jeffrey A. Law  ---
Author: law
Date: Mon Nov 21 23:24:13 2016
New Revision: 242682

URL: https://gcc.gnu.org/viewcvs?rev=242682=gcc=rev
Log:
PR target/68538
* config/cris/cris.md: Don't call copy_to_mode_reg unless
can_create_pseudo_p is true.

PR target/68538
* gcc.c-torture/compile/pr68538.c: New test.

Added:
trunk/gcc/testsuite/gcc.c-torture/compile/pr68538.c
Modified:
trunk/gcc/ChangeLog
trunk/gcc/config/cris/cris.md
trunk/gcc/testsuite/ChangeLog

[Bug target/78458] [7 Regression] LRA ICE building libgcc for powerpc-linux-gnuspe e500v2

2016-11-21 Thread joseph at codesourcery dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78458

--- Comment #3 from joseph at codesourcery dot com  ---
I still get the same ICE at r242683.

[Bug tree-optimization/71351] [7 Regression] ICE: Segmentation fault (graphite)

2016-11-21 Thread law at redhat dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71351

Jeffrey A. Law  changed:

   What|Removed |Added

   Priority|P3  |P4
 CC||law at redhat dot com

[Bug tree-optimization/71357] [7 Regression] [graphite] ICE: verify_ssa failed (error: definition in block follows the use for SSA_NAME) w/ -O2 -floop-nest-optimize

2016-11-21 Thread law at redhat dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71357

Jeffrey A. Law  changed:

   What|Removed |Added

   Priority|P3  |P4
 CC||law at redhat dot com

[Bug ipa/71353] [7 Regression] ICE on valid code at -O1 and above on x86_64-linux-gnu: in binds_to_current_def_p, at symtab.c:2232

2016-11-21 Thread law at redhat dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71353

Jeffrey A. Law  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 CC||law at redhat dot com
 Resolution|--- |DUPLICATE

--- Comment #3 from Jeffrey A. Law  ---
Duplicate

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

[Bug middle-end/71524] [7 Regression] internal compiler error: in binds_to_current_def_p, at symtab.c:2232

2016-11-21 Thread law at redhat dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71524

Jeffrey A. Law  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 CC||law at redhat dot com
 Resolution|--- |DUPLICATE

--- Comment #4 from Jeffrey A. Law  ---
Duplicate

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

[Bug tree-optimization/71751] [7 Regression] Segmentation fault in ssa_default_def

2016-11-21 Thread law at redhat dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71751

Jeffrey A. Law  changed:

   What|Removed |Added

   Priority|P3  |P4
 CC||law at redhat dot com

[Bug fortran/68568] ICE with automatic character object and save, in combination with some options

2016-11-21 Thread anlauf at gmx dot de
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68568

--- Comment #6 from Harald Anlauf  ---
(In reply to Dominique d'Humieres from comment #3)
> Confirmed from 4.8 up to trunk (6.0).

I don't get an ICE with 4.6, but I do with 4.7.4.

So technically a regression.

[Bug target/78255] [5/6/7 regression] Indirect sibling call causing wrong code generation for ARM

2016-11-21 Thread law at redhat dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78255

Jeffrey A. Law  changed:

   What|Removed |Added

   Priority|P3  |P1
 CC||law at redhat dot com

[Bug tree-optimization/78455] [7 Regression] ICE in operator[], at vec.h:732

2016-11-21 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78455

Jakub Jelinek  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2016-11-21
 CC||jakub at gcc dot gnu.org
   Target Milestone|--- |7.0
 Ever confirmed|0   |1

--- Comment #1 from Jakub Jelinek  ---
Yes, confirmed r242639.

[Bug target/77439] [6/7 regression] wrong code for sibcall with longcall, APCS frame and VFP

2016-11-21 Thread law at redhat dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77439

Jeffrey A. Law  changed:

   What|Removed |Added

   Priority|P3  |P1
 CC||law at redhat dot com

[Bug libstdc++/78442] [variant] std::get<...>(Variant) is not constexpr.

2016-11-21 Thread timshen at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78442

Tim Shen  changed:

   What|Removed |Added

 CC||timshen at gcc dot gnu.org

--- Comment #1 from Tim Shen  ---
I'm not sure whether the test case is valid.

A similar test case like this for  doesn't compile:

#include 

constexpr bool test() {
  std::tuple v{42, nullptr};
  auto const& cv = v;
  static_assert(std::get<0>(v) == 42, "");
  static_assert(std::get<0>(cv) == 42, "");
  return true;
}
static_assert(test(), "");

int main() {}

[Bug middle-end/71682] [7 Regression] Several libjava failures on x86_64-apple-darwin15 with -m32 after r237556

2016-11-21 Thread law at redhat dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71682

Jeffrey A. Law  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 CC||law at redhat dot com
 Resolution|--- |WONTFIX

--- Comment #2 from Jeffrey A. Law  ---
GCJ/libjava are dead.

[Bug target/68538] ICE in gen_reg_rtx, at emit-rtl.c:1027 when cross-compiling for cris-linux-gnu target

2016-11-21 Thread law at redhat dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68538

--- Comment #5 from Jeffrey A. Law  ---
No, they are distinct bugs in the target files.  In this BZ it's the fault of
the cris backend.  In 68538, it appears to be a problem in the x86 backend.

[Bug c++/70565] [5/6/7 Regression] ICE at gimplify.c:8832 (cilkplus array extension)

2016-11-21 Thread law at redhat dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70565

Jeffrey A. Law  changed:

   What|Removed |Added

   Priority|P3  |P4

[Bug fortran/68568] ICE with automatic character object and save, in combination with some options

2016-11-21 Thread anlauf at gmx dot de
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68568

Harald Anlauf  changed:

   What|Removed |Added

 CC||anlauf at gmx dot de

--- Comment #4 from Harald Anlauf  ---
(In reply to Gerhard Steinmetz from comment #1)
> And this is detected :
> (The SAVE attribute shall not be specified for an automatic data object.)
> 
> $ cat z1b.f90
> subroutine s(n)
>integer, intent(in) :: n
>character(n), save :: x
>x = 'a'
> end
> 
> $ gfortran -g -O0 -Wall -fcheck=all -c z1b.f90
> z1b.f90:3:26:
> 
> character(n), save :: x
>   1
> Error: Automatic object 'x' at (1) cannot have the SAVE attribute

This is what is specified in the standard. F2015 working document:

C860 The SAVE attribute shall not be specified for a dummy argument, a function
 result, an automatic data object, or an object that is in a common block.

So it's an ICE on valid code.

[Bug tree-optimization/70586] [7 Regression] wrong code at -O2 and -O3 on x86_64-linux-gnu in 32-bit and 64-bit modes

2016-11-21 Thread law at redhat dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70586

Jeffrey A. Law  changed:

   What|Removed |Added

   Priority|P3  |P1
 CC||law at redhat dot com

[Bug libstdc++/78442] [variant] std::get<...>(Variant) is not constexpr.

2016-11-21 Thread eric at efcs dot ca
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78442

--- Comment #2 from Eric Fiselier  ---
I'm sorry your right. That's a garbage reproducer. Here's an actual one:

#include 
#include 

constexpr bool test_tuple() {
 std::tuple t(42);
 return std::get<0>(t) == 42;
}
static_assert(test_tuple(), ""); // OK

constexpr bool test() {
  std::variant v(42);
  auto const& cv = v;
  return std::get<0>(v) == 42 &&
 std::get<0>(cv) == 42; 

}
static_assert(test(), "");

[Bug fortran/66227] [5/6/7 Regression] [OOP] EXTENDS_TYPE_OF n returns wrong result for polymorphic variable allocated to extended type

2016-11-21 Thread law at redhat dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66227

Jeffrey A. Law  changed:

   What|Removed |Added

   Priority|P3  |P4
 CC||law at redhat dot com

[Bug c++/71616] [7 Regression] ICE on valid C++ code at -O1 and above on x86_64-linux-gnu: in binds_to_current_def_p, at symtab.c:2232

2016-11-21 Thread law at redhat dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71616

Jeffrey A. Law  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 CC||law at redhat dot com
 Resolution|--- |DUPLICATE

--- Comment #3 from Jeffrey A. Law  ---
Duplicate

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

[Bug debug/77589] [6/7 Regression] fortran: Missing DW_AT_byte_stride for an array record field selection

2016-11-21 Thread law at redhat dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77589

Jeffrey A. Law  changed:

   What|Removed |Added

   Priority|P3  |P4
 CC||law at redhat dot com

[Bug rtl-optimization/72488] [7 Regression] wrong code (SIGFPE) at -Os and above on x86_64-linux-gnu (in the 64-bit mode)

2016-11-21 Thread law at redhat dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=72488

Jeffrey A. Law  changed:

   What|Removed |Added

   Priority|P3  |P1
 CC||law at redhat dot com

[Bug rtl-optimization/77541] [7 Regression] wrong code with 512bit vectors of int128 @ -O1

2016-11-21 Thread law at redhat dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77541

Jeffrey A. Law  changed:

   What|Removed |Added

   Priority|P3  |P1
 CC||law at redhat dot com

[Bug fortran/78456] [6/7 Regression] 171.swim loops not interchanged, vectorized perf loss on aarch64

2016-11-21 Thread dominiq at lps dot ens.fr
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78456

Dominique d'Humieres  changed:

   What|Removed |Added

 Status|UNCONFIRMED |WAITING
   Last reconfirmed||2016-11-21
 Ever confirmed|0   |1

--- Comment #1 from Dominique d'Humieres  ---
Duplicate of pr68682?

[Bug c++/78457] New: attempt to instantiate unused template

2016-11-21 Thread barry.revzin at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78457

Bug ID: 78457
   Summary: attempt to instantiate unused template
   Product: gcc
   Version: 6.2.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c++
  Assignee: unassigned at gcc dot gnu.org
  Reporter: barry.revzin at gmail dot com
  Target Milestone: ---

The following fails to compile on any version of gcc (or clang) I tried:

#include 

template  struct X;
template  struct X { };

template  struct Y { X x; };

template 
std::ostream& operator<<(std::ostream& os, Y const& ) {
  os << std::endl;
  return os;
}

int main()
{ }

with the error:

prog.cc: In instantiation of 'struct Y<>':
prog.cc:10:16:   required from here
prog.cc:6:44: error: 'Y::x' has incomplete type
 template  struct Y { X x; };
^
prog.cc:3:31: note: declaration of 'struct X<>'
 template  struct X;
   ^

but no instance of Y is ever created, much less Y<> in operator<<. Moreover,
replacing std::endl with '\n' makes the code compile.

[Bug tree-optimization/72835] [7 Regression] Incorrect arithmetic optimization involving bitfield arguments

2016-11-21 Thread kugan at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=72835

kugan at gcc dot gnu.org changed:

   What|Removed |Added

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

--- Comment #6 from kugan at gcc dot gnu.org ---
Fixed in trunk.

[Bug tree-optimization/78455] [7 Regression] ICE in operator[], at vec.h:732

2016-11-21 Thread mpolacek at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78455

Marek Polacek  changed:

   What|Removed |Added

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

--- Comment #3 from Marek Polacek  ---
Testing it.

[Bug target/78458] [7 Regression] LRA ICE building libgcc for powerpc-linux-gnuspe e500v2

2016-11-21 Thread joseph at codesourcery dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78458

--- Comment #2 from joseph at codesourcery dot com  ---
It was r242641.

[Bug fortran/77680] [5/6/7 Regression] [F03] ICE in ctor_for_folding, at varpool.c:419

2016-11-21 Thread law at redhat dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77680

Jeffrey A. Law  changed:

   What|Removed |Added

   Priority|P3  |P4
 CC||law at redhat dot com

[Bug rtl-optimization/71118] [5/6/7 Regression] ftois instruction not emitted for float -> int bitcast

2016-11-21 Thread law at redhat dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71118

Jeffrey A. Law  changed:

   What|Removed |Added

   Priority|P3  |P4
 CC||law at redhat dot com

[Bug bootstrap/71481] [7 regression] ICE during selftest: input.c: test_reading_source_line

2016-11-21 Thread law at redhat dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71481

Jeffrey A. Law  changed:

   What|Removed |Added

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

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

[Bug bootstrap/78453] arm-none-linux-gnueabihf bootstrap failed with revision 242549

2016-11-21 Thread bernd.edlinger at hotmail dot de
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78453

Bernd Edlinger  changed:

   What|Removed |Added

 CC||bernd.edlinger at hotmail dot 
de

--- Comment #2 from Bernd Edlinger  ---
Yes, thanks.

I was using --with-tune=cortex-a9 in my bootstrap.

Therefore I had not seen this in my testing.

Can you post a patch?

[Bug middle-end/77262] [7 regression] Several libjava tests FAIL on 32-bit Solaris/x86

2016-11-21 Thread law at redhat dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77262

Jeffrey A. Law  changed:

   What|Removed |Added

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

--- Comment #5 from Jeffrey A. Law  ---
GCJ/libjava is dead

[Bug fortran/78456] New: [6/7 Regression] 171.swim loops not interchanged, vectorized perf loss on aarch64

2016-11-21 Thread chris_s_jones at yahoo dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78456

Bug ID: 78456
   Summary: [6/7 Regression] 171.swim loops not interchanged,
vectorized perf loss on aarch64
   Product: gcc
   Version: 6.2.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: fortran
  Assignee: unassigned at gcc dot gnu.org
  Reporter: chris_s_jones at yahoo dot com
  Target Milestone: ---

Created attachment 40102
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=40102=edit
test case

When debugging a perf regression in 171.swim after moving to gfortran 6.2.0, I
notice that a nested loop in MAIN is not being interchanged, causing
sub-optimal vectorization in this case.  A simplified test case is attached
with an excerpt shown here:

  DO 3500 I = 1, MNMIN
   DO 4500 J = 1, MNMIN
 FOO = FOO + ABS(X0(I,J))
 BAR = BAR + ABS(X1(I,J))
 BAZ = BAZ + ABS(X2(I,J))
 4500  CONTINUE
   X1(I,I) = X1(I,I) 
 1  * ( MOD (I, 100) /100.)
 3500 CONTINUE

In 4.8.2, the compiler generates the sequence:
 230:   4cdf7e47ld1 {v7.2d}, [x18], #16
 234:   4cdf7fd0ld1 {v16.2d}, [x30], #16
 238:   4cdf7c34ld1 {v20.2d}, [x1], #16
 23c:   4ee0f8f5fabsv21.2d, v7.2d
 240:   4ee0fa16fabsv22.2d, v16.2d
 244:   4ee0fa97fabsv23.2d, v20.2d
 248:   4e75d400faddv0.2d, v0.2d, v21.2d
 24c:   4e76d421faddv1.2d, v1.2d, v22.2d
 250:   4e77d442faddv2.2d, v2.2d, v23.2d

In 6.2.0 and on the trunk, I'm seeing the values assembled from multiple
locations since the missing loop interchange means it doesn't use adjacent
values:
 2c8:   fc606834ldr d20, [x1,x0]
 2cc:   52800050mov w16, #0x2   // #2
 2d0:   d294dc0emov x14, #0xa6e0// #42720
 2d4:   6b14021fcmp w16, w20
 2d8:   fc606bd6ldr d22, [x30,x0]
 2dc:   fc6068f7ldr d23, [x7,x0]
 2e0:   8b0dadd x0, x0, x13
 2e4:   fd69b835ldr d21, [x1,#21360]
 2e4:   fd69b835ldr d21, [x1,#21360]
 2e8:   6e0806b0mov v16.d[0], v21.d[0]
 2ec:   6e180690mov v16.d[1], v20.d[0]
 2f0:   4ee0fa19fabsv25.2d, v16.2d
 2f4:   fd69bbd8ldr d24, [x30,#21360]
 2f8:   6e080706mov v6.d[0], v24.d[0]
 2fc:   6e1806c6mov v6.d[1], v22.d[0]
 300:   4ee0f8dbfabsv27.2d, v6.2d
 304:   fd69b8fdldr d29, [x7,#21360]
 308:   6e0807a7mov v7.d[0], v29.d[0]
 30c:   6e1806e7mov v7.d[1], v23.d[0]
 310:   4ee0f8fefabsv30.2d, v7.2d
 314:   4e79d75afaddv26.2d, v26.2d, v25.2d
 318:   4e7bd79cfaddv28.2d, v28.2d, v27.2d
 31c:   4e7ed7fffaddv31.2d, v31.2d, v30.2d

Flags used: -O3 -march=armv8-a+crypto -mcpu=cortex-a57+crypto -ffast-math
-funroll-loops -fvect-cost-model=unlimited -floop-interchange -g -c -o sink.o
sink.f

I understand -floop-interchange is now an alias for -floop-nest-optimize but am
wondering why this case wasn't interchanged.  The perf difference seems
significant for this case.  Manually swapping the loop indices in the source
causes the better code sequence to be generated.

Behaves similarly for gfortran 6.2.0 and trunk, built using:
configure 'CFLAGS_FOR_TARGET=-march=armv8-a -mcpu=cortex-a57 -O3'
'CXXFLAGS_FOR_TARGET=-march=armv8-a -mcpu=cortex-a57 -O3'
--prefix=/home/gcc-aarch64/6.2.0-linux-gnu --target=aarch64-linux-gnu
--with-sysroot=/home/gcc-aarch64/6.2.0-linux-gnu/sysroot --enable-__cxa_atexit
--with-gnu-as --with-gnu-ld --enable-shared --disable-libssp
--disable-libmudflap --enable-languages=c,c++,fortran --disable-libsanitizer
--disable-nls

[Bug target/78438] [7 Regression] incorrect comparison optimization

2016-11-21 Thread law at redhat dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78438

Jeffrey A. Law  changed:

   What|Removed |Added

   Priority|P3  |P1
 CC||law at redhat dot com

[Bug tree-optimization/78428] [5/6/7 Regression] wrong code at -O2 and -O3 on x86_64-linux-gnu in 64-bit mode

2016-11-21 Thread law at redhat dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78428

Jeffrey A. Law  changed:

   What|Removed |Added

   Priority|P3  |P1
 CC||law at redhat dot com

[Bug rtl-optimization/78447] [7 Regression] wrong code when combine changes shifts by << 5 and >> 15 to >> 10 at -O

2016-11-21 Thread law at redhat dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78447

Jeffrey A. Law  changed:

   What|Removed |Added

   Priority|P3  |P1
 CC||law at redhat dot com

  1   2   3   >