[Bug target/61729] FAIL: g++.dg/abi/scoped1.C -std=gnu++11 execution test

2017-01-14 Thread segher at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61729

--- Comment #1 from Segher Boessenkool  ---
This testcase uses a 2-byte scoped enum, which doesn't get the integer
promotions if I read the C++ standard correctly -- but it is passed via
varargs, and the target code expects that to be promoted always.  The
-m64 code works correctly (it uses the generic varargs expansion code),
but it is less efficient than it would be for promoted args as well.

Should varargs in C++ get the integer promotions (like in C), or do we
need to extend many ABIs to work with C++?

[Bug translation/79093] Hard coded plural in builtins.c:3203

2017-01-14 Thread joseph at codesourcery dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79093

--- Comment #1 from joseph at codesourcery dot com  ---
We don't seem to have warning_at_n (only inform_n, warning_at_rich_loc_n, 
warning_n, error_n) but it could easily be added to handle this properly.

[Bug fortran/68887] [6/7 regression] gfortran.dg/coarray/event_[12].f90 -fcoarray=lib -O2 -lcaf_single -latomic fails

2017-01-14 Thread dominiq at lps dot ens.fr
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68887

Dominique d'Humieres  changed:

   What|Removed |Added

 CC||vehre at gcc dot gnu.org

--- Comment #12 from Dominique d'Humieres  ---
The tests compiled with an instrumented revision r28 now succeeds. Could
you please test SPARC after revision r244407?

[Bug c/78768] -Walloca-larger-than and -Wformat-length warnings disabled by -flto

2017-01-14 Thread pinskia at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78768

--- Comment #8 from Andrew Pinski  ---
This testcase fails on aarch64-linux-gnu.

[Bug translation/79093] New: Hard coded plural in builtins.c:3203

2017-01-14 Thread fmarchal at perso dot be
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79093

Bug ID: 79093
   Summary: Hard coded plural in builtins.c:3203
   Product: gcc
   Version: 7.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: translation
  Assignee: unassigned at gcc dot gnu.org
  Reporter: fmarchal at perso dot be
  Target Milestone: ---

The following code is found in builtins.c:

warning_at (loc, opt,
(uwir0 == 1
 ? G_("%K%qD: writing %wu byte into a region "
  "of size %wu overflows the destination")
 : G_("%K%qD writing %wu bytes into a region "
  "of size %wu overflows the destination")),
exp, get_callee_fndecl (exp), uwir0,
tree_to_uhwi (objsize));

Assuming singular is only for a quantity == 1 is wrong. See
https://www.gnu.org/savannah-checkouts/gnu/gettext/manual/html_node/Plural-forms.html.

If ngettext can't be used, please use only one string for both singular and
plural, like this: "%K%qD: writing %wu byte(s) into a region ".

BTW, the plural lacks a colon after %K%qD.

[Bug testsuite/70583] [6/7 Regression] FAIL: g++.old-deja/g++.abi/vtable2.C -std=gnu++98 execution test

2017-01-14 Thread danglin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70583

John David Anglin  changed:

   What|Removed |Added

  Component|ipa |testsuite

--- Comment #9 from John David Anglin  ---
Like ia64, hppa uses function descriptors not function pointers in its vtables.

[Bug c/78304] [7 Regression] -Wformat doesn't warn anymore for inttypes.h format string argument type mismatches

2017-01-14 Thread sch...@linux-m68k.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78304

Andreas Schwab  changed:

   What|Removed |Added

 Status|RESOLVED|REOPENED
 Resolution|FIXED   |---

--- Comment #8 from Andreas Schwab  ---
The test fails on m68k.

[Bug c++/56973] crash when capturing variables in nested lambdas

2017-01-14 Thread msebor at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=56973

Martin Sebor  changed:

   What|Removed |Added

   Last reconfirmed|2013-04-24 00:00:00 |2017-1-14
 CC||msebor at gcc dot gnu.org
  Known to fail||6.3.0

--- Comment #3 from Martin Sebor  ---
I still see the crash with GCC 6 (the program runs fine when compiled with
Clang).

$ /build/gcc-6-branch/gcc/xg++ -B /build/gcc-6-branch/gcc -nostdinc++ -I
/build/gcc-6-branch/x86_64-pc-linux-gnu/libstdc++-v3/include/x86_64-pc-linux-gnu
-I /build/gcc-6-branch/x86_64-pc-linux-gnu/libstdc++-v3/include -I
/src/gcc/6-branch/libstdc++-v3/libsupc++ -I
/src/gcc/6-branch/libstdc++-v3/include/backward -I
/src/gcc/6-branch/libstdc++-v3/testsuite/util -L
/build/gcc-6-branch/x86_64-pc-linux-gnu/libstdc++-v3/src/.libs -O1 -g t.C &&
gdb -q -ex 'r e4 e4 e4' -ex bt -ex 'x/i $pc' -ex 'p $rdi' ./a.out
Reading symbols from ./a.out...done.
Starting program: /home/msebor/build/tmp/a.out e4 e4 e4

Program received signal SIGSEGV, Segmentation fault.
0x77336266 in __strcmp_ssse3 () from /lib64/libc.so.6
#0  0x77336266 in __strcmp_ssse3 () from /lib64/libc.so.6
#1  0x00400656 in operator() (s=, 
__closure=) at t.C:19
#2  operator() (s=, __closure=) at t.C:25
#3  test (s=) at t.C:28
#4  0x00400685 in main (argc=, argv=0x7fffdf38)
at t.C:33
=> 0x77336266 <__strcmp_ssse3+22>:  movlpd (%rdi),%xmm1
$1 = 1

GCC 7 fails to compile the test case with the errors below:

t.C: In lambda function:
t.C:24:26: error: no matching function for call to ‘begin(const test(const
char*):: [6])’
  it=std::begin(ar);
  ^
In file included from
/build/gcc-svn/x86_64-pc-linux-gnu/libstdc++-v3/include/bits/range_access.h:36:0,
 from
/build/gcc-svn/x86_64-pc-linux-gnu/libstdc++-v3/include/string:51,
 from
/build/gcc-svn/x86_64-pc-linux-gnu/libstdc++-v3/include/bits/locale_classes.h:40,
 from
/build/gcc-svn/x86_64-pc-linux-gnu/libstdc++-v3/include/bits/ios_base.h:41,
 from
/build/gcc-svn/x86_64-pc-linux-gnu/libstdc++-v3/include/ios:42,
 from
/build/gcc-svn/x86_64-pc-linux-gnu/libstdc++-v3/include/ostream:38,
 from
/build/gcc-svn/x86_64-pc-linux-gnu/libstdc++-v3/include/iterator:64,
 from t.C:3:
/src/gcc/svn/libstdc++-v3/libsupc++/initializer_list:89:5: note: candidate:
template constexpr const _Tp* std::begin(std::initializer_list<_Tp>)
 begin(initializer_list<_Tp> __ils) noexcept
 ^
/src/gcc/svn/libstdc++-v3/libsupc++/initializer_list:89:5: note:   template
argument deduction/substitution failed:
t.C:24:26: note:   mismatched types ‘std::initializer_list<_Tp>’ and ‘const
test(const char*)::*’
  it=std::begin(ar);
  ^
In file included from
/build/gcc-svn/x86_64-pc-linux-gnu/libstdc++-v3/include/string:51:0,
 from
/build/gcc-svn/x86_64-pc-linux-gnu/libstdc++-v3/include/bits/locale_classes.h:40,
 from
/build/gcc-svn/x86_64-pc-linux-gnu/libstdc++-v3/include/bits/ios_base.h:41,
 from
/build/gcc-svn/x86_64-pc-linux-gnu/libstdc++-v3/include/ios:42,
 from
/build/gcc-svn/x86_64-pc-linux-gnu/libstdc++-v3/include/ostream:38,
 from
/build/gcc-svn/x86_64-pc-linux-gnu/libstdc++-v3/include/iterator:64,
 from t.C:3:
/build/gcc-svn/x86_64-pc-linux-gnu/libstdc++-v3/include/bits/range_access.h:48:5:
note: candidate: template decltype (__cont.begin())
std::begin(_Container&)
 begin(_Container& __cont) -> decltype(__cont.begin())
 ^
/build/gcc-svn/x86_64-pc-linux-gnu/libstdc++-v3/include/bits/range_access.h:48:5:
note:   template argument deduction/substitution failed:
/build/gcc-svn/x86_64-pc-linux-gnu/libstdc++-v3/include/bits/range_access.h: In
substitution of ‘template decltype (__cont.begin())
std::begin(_Container&) [with _Container = const test(const char*):: [6]]’:
t.C:24:26:   required from here
/build/gcc-svn/x86_64-pc-linux-gnu/libstdc++-v3/include/bits/range_access.h:48:50:
error: request for member ‘begin’ in ‘__cont’, which is of non-class type
‘const test(const char*):: [6]’
 begin(_Container& __cont) -> decltype(__cont.begin())
   ~~~^
/build/gcc-svn/x86_64-pc-linux-gnu/libstdc++-v3/include/bits/range_access.h:58:5:
note: candidate: template decltype (__cont.begin())
std::begin(const _Container&)
 begin(const _Container& __cont) -> decltype(__cont.begin())
 ^
/build/gcc-svn/x86_64-pc-linux-gnu/libstdc++-v3/include/bits/range_access.h:58:5:
note:   template argument deduction/substitution failed:
/build/gcc-svn/x86_64-pc-linux-gnu/libstdc++-v3/include/bits/range_access.h: In
substitution of ‘template decltype (__cont.begin())

[Bug tree-optimization/79090] [7 regression] DSE wrongly removes store at variable offset

2017-01-14 Thread law at redhat dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79090

Jeffrey A. Law  changed:

   What|Removed |Added

 Status|NEW |ASSIGNED

--- Comment #2 from Jeffrey A. Law  ---
It's a one-liner.  The strange thing is the test that is missing is one I
thought I had in the sources at one time.  Anyway, I'll run it through the
usual testing + ada.

[Bug c++/79092] New: template: type ignored if value already instantiated

2017-01-14 Thread nico at josuttis dot de
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79092

Bug ID: 79092
   Summary: template: type ignored if value already
instantiated
   Product: gcc
   Version: 7.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c++
  Assignee: unassigned at gcc dot gnu.org
  Reporter: nico at josuttis dot de
  Target Milestone: ---

It seems for a template  the type of N is ignored if the value
already was instantiated.

The essence:
 template 
 struct A
 {
   A() {
 std::cout << "A::A(): N is "
   << typeid(N).name() << " with value: " << N << std::endl;
   }
 };

 A<42>(); 
 A<4LL>();   // instantiates A
 A<42LL>();  // instantiates A because we already had A<42>

Full example:
> http://melpon.org/wandbox/permlink/R3Of0JsugjVR6Qmc

[Bug debug/37022] internal compiler error: in compute_barrier_args_size

2017-01-14 Thread msebor at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=37022

Martin Sebor  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 CC||msebor at gcc dot gnu.org
 Resolution|--- |WORKSFORME

--- Comment #19 from Martin Sebor  ---
I cannot reproduce an ICE with any of the test cases attached to this bug with
any optimization options nor do I see the failure in recent test results.  
Resolving as WORKSFORSOME.  Please reopen if the bug persists.

[Bug tree-optimization/33562] [5/6 Regression] aggregate DSE disabled

2017-01-14 Thread msebor at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=33562

--- Comment #31 from Martin Sebor  ---
(In reply to Jeffrey A. Law from comment #29)
> It's still a regression for 5/6, so it should stay open until those releases
> are no longer supported.  Note the "7" in the regression marker is gone.

Sorry, I didn't know about this policy.

[Bug translation/48555] [fr] gibberish warning (déréférencement du pointeur type-punned brisera les strictes d'aliases)

2017-01-14 Thread fmarchal at perso dot be
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=48555

Frederic Marchal  changed:

   What|Removed |Added

 CC||fmarchal at perso dot be

--- Comment #3 from Frederic Marchal  ---
Messages containing "type-punned" have been updated in version 7.1-b20170101
(http://translationproject.org/PO-files/fr/gcc-7.1-b20170101.fr.po) and
backported to version 6.2.0
(http://translationproject.org/PO-files/fr/gcc-6.2.0.fr.po).

It seems "type-punned" is usually referred as "transtypage à la barbare". So,
it is what I used in the three messages using "type-punned".

I also fixed the will/may issue.

[Bug translation/64934] The french text of --version is not proper french

2017-01-14 Thread fmarchal at perso dot be
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64934

Frederic Marchal  changed:

   What|Removed |Added

 CC||fmarchal at perso dot be

--- Comment #3 from Frederic Marchal  ---
I partly changed the French translation as requested by this bug report but I
haven't copy/pasted the official text because I don't want the translation to
change the intent of the original message.

In particular, I haven't added a text saying that the software can be copied,
redistributed and modified. The English message should be modified if it really
is desirable to say so.

The new message is available in version 7.1-b20170101
(http://translationproject.org/PO-files/fr/gcc-7.1-b20170101.fr.po).

It was backported to version 6.2.0
(http://translationproject.org/PO-files/fr/gcc-6.2.0.fr.po).

[Bug rtl-optimization/78727] [7 Regression] ICE in rtl_verify_bb_insns, at cfgrtl.c:2656 (error: flow control insn inside a basic block)

2017-01-14 Thread law at redhat dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78727

Jeffrey A. Law  changed:

   What|Removed |Added

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

--- Comment #7 from Jeffrey A. Law  ---
Fixed by Bernd's patch I installed on the trunk.

[Bug rtl-optimization/78626] [7 Regression] ICE in rtl_verify_bb_insns, at cfgrtl.c:2656 (error: flow control insn inside a basic block)

2017-01-14 Thread law at redhat dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78626

Jeffrey A. Law  changed:

   What|Removed |Added

 Status|REOPENED|RESOLVED
 Resolution|--- |FIXED

--- Comment #16 from Jeffrey A. Law  ---
Fixed by Bernd's patch I installed on the trunk.

[Bug rtl-optimization/78626] [7 Regression] ICE in rtl_verify_bb_insns, at cfgrtl.c:2656 (error: flow control insn inside a basic block)

2017-01-14 Thread law at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78626

--- Comment #15 from Jeffrey A. Law  ---
Author: law
Date: Sat Jan 14 16:52:18 2017
New Revision: 244467

URL: https://gcc.gnu.org/viewcvs?rev=244467=gcc=rev
Log:
PR rtl-optimization/78626
PR rtl-optimization/78727
* cprop.c (one_cprop_pass): Collect unconditional traps in the middle
of a block, and split such blocks after everything else is finished.

PR rtl-optimization/78626
PR rtl-optimization/78727
* gcc.dg/torture/pr78626.c: New test.
* gcc.dg/torture/pr78727.c: New test.

Added:
trunk/gcc/testsuite/gcc.dg/torture/pr78626.c
trunk/gcc/testsuite/gcc.dg/torture/pr78727.c
Modified:
trunk/gcc/ChangeLog
trunk/gcc/cprop.c
trunk/gcc/testsuite/ChangeLog

[Bug rtl-optimization/78727] [7 Regression] ICE in rtl_verify_bb_insns, at cfgrtl.c:2656 (error: flow control insn inside a basic block)

2017-01-14 Thread law at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78727

--- Comment #6 from Jeffrey A. Law  ---
Author: law
Date: Sat Jan 14 16:52:18 2017
New Revision: 244467

URL: https://gcc.gnu.org/viewcvs?rev=244467=gcc=rev
Log:
PR rtl-optimization/78626
PR rtl-optimization/78727
* cprop.c (one_cprop_pass): Collect unconditional traps in the middle
of a block, and split such blocks after everything else is finished.

PR rtl-optimization/78626
PR rtl-optimization/78727
* gcc.dg/torture/pr78626.c: New test.
* gcc.dg/torture/pr78727.c: New test.

Added:
trunk/gcc/testsuite/gcc.dg/torture/pr78626.c
trunk/gcc/testsuite/gcc.dg/torture/pr78727.c
Modified:
trunk/gcc/ChangeLog
trunk/gcc/cprop.c
trunk/gcc/testsuite/ChangeLog

[Bug target/72749] [7 Regression] ICE: verify_flow_info failed (error: wrong amount of branch edges after conditional jump in bb 5) w/ -O2 -fsched2-use-superblocks

2017-01-14 Thread segher at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=72749

--- Comment #13 from Segher Boessenkool  ---
I have a patch bootstrapping, let's not close this yet.

[Bug c/79089] [7 Regression] error: incorrect sharing of tree nodes

2017-01-14 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79089

Jakub Jelinek  changed:

   What|Removed |Added

 CC||jakub at gcc dot gnu.org
   Target Milestone|--- |7.0

--- Comment #2 from Jakub Jelinek  ---
Started with r241647.  I'll have a look on Monday.

[Bug target/78994] -Ofast makes aarch64 C++ benchmark slower for A53

2017-01-14 Thread tulipawn at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78994

--- Comment #6 from PeteVine  ---
It's possible I already had that patch included in my build, but 
in case I didn't, here's a quick addition to the previous result:

http://openbenchmarking.org/result/1701143-TA-GCCCOMPAR66

The c-ray thunderx result suggests A53 codegen is still suboptimal. The patch
has had no effect on the original issue.

[Bug c++/79091] New: [7 regression] ICE in write_unnamed_type

2017-01-14 Thread s...@li-snyder.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79091

Bug ID: 79091
   Summary: [7 regression] ICE in write_unnamed_type
   Product: gcc
   Version: 7.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c++
  Assignee: unassigned at gcc dot gnu.org
  Reporter: s...@li-snyder.org
  Target Milestone: ---

hi -

gcc version 7.0.0 20170111 gives an ICE for this example
(tested on x86_64-pc-linux-gnu):


enum {
  ColMajor = 0
};

template
class Matrix {};

class RotationBase
{
public:
  Matrix<3> toRotationMatrix() const;
};


template
Matrix toRotationMatrix(const RotationBase& r)
{
  return r.toRotationMatrix();
}


class Transform
{
public:
Transform(const RotationBase& r)
  {
toRotationMatrix<3>(r);
  }
};


void localStripPos()
{
  RotationBase t2;
  Transform transfPtr_internalgeo(t2);
}



$ cc1plus -v x.cc 
 Matrix toRotationMatrix(const RotationBase&) Transform::Transform(const
RotationBase&) Matrix<3> Transform::Transform(const RotationBase&)
Transform::Transform(const RotationBase&) void localStripPos() Matrix
toRotationMatrix(const RotationBase&) [with int Dim = 3]
Analyzing compilation unit

x.cc: In instantiation of ‘Matrix toRotationMatrix(const RotationBase&)
[with int Dim = 3]’:
x.cc:17:13: internal compiler error: in write_unnamed_type_name, at
cp/mangle.c:1623
 Matrix toRotationMatrix(const RotationBase& r)
 ^~~~
0xa4755c write_unnamed_type_name
/home/sss/gcc/gcc/gcc/cp/mangle.c:1623
0xa4642a write_unqualified_name
/home/sss/gcc/gcc/gcc/cp/mangle.c:1382
0xa43af6 write_unscoped_name
/home/sss/gcc/gcc/gcc/cp/mangle.c:1007
0xa43857 write_name
/home/sss/gcc/gcc/gcc/cp/mangle.c:939
0xa4dd94 write_class_enum_type
/home/sss/gcc/gcc/gcc/cp/mangle.c:2769
0xa4a825 write_type
/home/sss/gcc/gcc/gcc/cp/mangle.c:2187
0xa51b76 write_template_arg_literal
/home/sss/gcc/gcc/gcc/cp/mangle.c:3341
0xa4e4d6 write_expression
/home/sss/gcc/gcc/gcc/cp/mangle.c:2883
0xa51ac4 write_expression
/home/sss/gcc/gcc/gcc/cp/mangle.c:3324
0xa529ae write_template_arg
/home/sss/gcc/gcc/gcc/cp/mangle.c:3485
0xa4df09 write_template_args
/home/sss/gcc/gcc/gcc/cp/mangle.c:2798
0xa43846 write_name
/home/sss/gcc/gcc/gcc/cp/mangle.c:935
0xa4dd94 write_class_enum_type
/home/sss/gcc/gcc/gcc/cp/mangle.c:2769
0xa4a825 write_type
/home/sss/gcc/gcc/gcc/cp/mangle.c:2187
0xa4da08 write_bare_function_type
/home/sss/gcc/gcc/gcc/cp/mangle.c:2692
0xa431a5 write_encoding
/home/sss/gcc/gcc/gcc/cp/mangle.c:848
0xa42b96 write_mangled_name
/home/sss/gcc/gcc/gcc/cp/mangle.c:788
0xa539a1 mangle_decl_string
/home/sss/gcc/gcc/gcc/cp/mangle.c:3743
0xa539e7 get_mangled_id
/home/sss/gcc/gcc/gcc/cp/mangle.c:3765
0xa53eab mangle_decl(tree_node*)
/home/sss/gcc/gcc/gcc/cp/mangle.c:3835
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See  for instructions.



The assertion that trips is in mangle.c:write_unnamed_type_name, here:

write_unnamed_type_name (const tree type)
{
  int discriminator;
  MANGLE_TRACE_TREE ("unnamed-type-name", type);

  if (TYPE_FUNCTION_SCOPE_P (type))
discriminator = local_class_index (type);
  else if (TYPE_CLASS_SCOPE_P (type))
discriminator = nested_anon_class_index (type);
  else
{
  gcc_assert (no_linkage_check (type, /*relaxed_p=*/true));
  /* Just use the old mangling at namespace scope.  */
  write_source_name (TYPE_IDENTIFIER (type));
  return;
}


where TYPE is

 
unit size 
align 32 symtab 0 alias set -1 canonical type 0x70033dc8 precision
1 min  max >
unsigned type_6 SI size  unit size

align 32 symtab 0 alias set -1 canonical type 0x70033d20 precision 32
min  max 
values 
local bindings <(nil)>>
value 
readonly constant used VOID file x.cc line 2 col 3
align 1 context  initial
 chain >> context

chain >

[Bug c/79027] fold-const.c:11104:1: internal compiler error: Floating point exception

2017-01-14 Thread dave.anglin at bell dot net
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79027

--- Comment #6 from dave.anglin at bell dot net ---
On 2017-01-11, at 8:18 AM, dave.anglin at bell dot net wrote:

> The error doesn't occur if I add
> "--disable-lto --without-cloog
> --without-ppl" to the configure command.  I would suspect ppl.

Adding "--without-ppl" results in a successful build.

--
John David Anglin   dave.ang...@bell.net

[Bug target/72749] [7 Regression] ICE: verify_flow_info failed (error: wrong amount of branch edges after conditional jump in bb 5) w/ -O2 -fsched2-use-superblocks

2017-01-14 Thread amodra at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=72749

Alan Modra  changed:

   What|Removed |Added

 CC|amodra at gcc dot gnu.org  |

--- Comment #12 from Alan Modra  ---
No sure whether we want to close this bug yet.  I'll leave that to Segher or
Jakub.  The patch I committed could be seen a just a workaround, unless we're
willing to say later rtl passes can count on earlier ones removing the
degenerate conditional branches that cause comment #5 problems.

[Bug target/72749] [7 Regression] ICE: verify_flow_info failed (error: wrong amount of branch edges after conditional jump in bb 5) w/ -O2 -fsched2-use-superblocks

2017-01-14 Thread amodra at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=72749

--- Comment #11 from Alan Modra  ---
Author: amodra
Date: Sat Jan 14 13:29:29 2017
New Revision: 244466

URL: https://gcc.gnu.org/viewcvs?rev=244466=gcc=rev
Log:
Testcase from pr72749

PR target/72749
* gcc.c-torture/compile/pr72749.c: New test.


Added:
trunk/gcc/testsuite/gcc.c-torture/compile/pr72749.c
Modified:
trunk/gcc/testsuite/ChangeLog

[Bug target/72749] [7 Regression] ICE: verify_flow_info failed (error: wrong amount of branch edges after conditional jump in bb 5) w/ -O2 -fsched2-use-superblocks

2017-01-14 Thread amodra at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=72749

--- Comment #10 from Alan Modra  ---
Author: amodra
Date: Sat Jan 14 13:24:46 2017
New Revision: 244465

URL: https://gcc.gnu.org/viewcvs?rev=244465=gcc=rev
Log:
Avoid PR72749 by not using unspecs

Rather than using unspecs in doloop insns to stop combine creating
these insns, use legitimate_combined_insn.

PR target/72749
* combine.c (recog_for_combine_1): Set INSN_CODE before calling
target legitimate_combined_insn.
* config/rs6000/rs6000.c (TARGET_LEGITIMATE_COMBINED_INSN): Define.
(rs6000_legitimate_combined_insn): New function.
* config/rs6000/rs6000.md (UNSPEC_DOLOOP): Delete, and remove
all uses.
(ctr_internal3): Rename from *ctr_internal5.
(ctr_internal4): Rename from *ctr_internal6.
(ctr_internal1, ctr_internal2): Remove '*' from name.

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

[Bug c/79089] [7 Regression] error: incorrect sharing of tree nodes

2017-01-14 Thread trippels at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79089

Markus Trippelsdorf  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2017-01-14
 CC||trippels at gcc dot gnu.org
Summary|error: incorrect sharing of |[7 Regression] error:
   |tree nodes  |incorrect sharing of tree
   ||nodes
 Ever confirmed|0   |1

--- Comment #1 from Markus Trippelsdorf  ---
struct {
  struct {
int data;
  } prefix_hash;
} a;
void fn1() {
  ({
(void)0;
a.prefix_hash = (typeof(a.prefix_hash)){};
  });
}

[Bug tree-optimization/79088] wrong code at -O2 on x86_64-linux-gnu

2017-01-14 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79088

Jakub Jelinek  changed:

   What|Removed |Added

   Priority|P3  |P1
 Status|UNCONFIRMED |NEW
   Last reconfirmed||2017-01-14
 CC||jakub at gcc dot gnu.org,
   ||law at gcc dot gnu.org
   Target Milestone|--- |7.0
 Ever confirmed|0   |1

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

[Bug target/78660] [7 Regression] 7.0 bootstrap fail on mips64el-unknow-linux: configure-stage2-target-libgcc' failed

2017-01-14 Thread ebotcazou at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78660

--- Comment #11 from Eric Botcazou  ---
> The key (I think) is that the following sequence of 3 instructions ends up
> being combined into 1 but the resulting instruction leaves the upper 32-bits
> of reg 316 entirely undefined. Eventually this leads to reg 316 being
> spilled to the stack where it is allocated a 64-bit slot but this spill only
> writes 32-bits whereas consumers read 64-bit and even if the value will only
> ever be operated on as 32-bit or less then logical and branch operations on
> the reloaded value will go wrong and normal 32-bit operations will be
> (strictly) undefined.

But MIPS defines LOAD_EXTEND_OP so the 32 upper bits are defined, aren't they?
Maybe the load sign-extends instead of zero-extending as specified initially.

[Bug tree-optimization/79090] [7 regression] DSE wrongly removes store at variable offset

2017-01-14 Thread ebotcazou at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79090

Eric Botcazou  changed:

   What|Removed |Added

   Target Milestone|--- |7.0
Summary|[7 regression] DSE wrongly  |[7 regression] DSE wrongly
   |removing store at variable  |removes store at variable
   |offset  |offset

[Bug tree-optimization/79090] [7 regression] DSE wrongly removing store at variable offset

2017-01-14 Thread dominiq at lps dot ens.fr
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79090

Dominique d'Humieres  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2017-01-14
 Ever confirmed|0   |1

--- Comment #1 from Dominique d'Humieres  ---
Confirmed.

[Bug tree-optimization/79090] New: [7 regression] DSE wrongly removing store at variable offset

2017-01-14 Thread ebotcazou at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79090

Bug ID: 79090
   Summary: [7 regression] DSE wrongly removing store at variable
offset
   Product: gcc
   Version: 7.0
Status: UNCONFIRMED
  Keywords: wrong-code
  Severity: normal
  Priority: P3
 Component: tree-optimization
  Assignee: unassigned at gcc dot gnu.org
  Reporter: ebotcazou at gcc dot gnu.org
CC: law at gcc dot gnu.org
  Target Milestone: ---

Created attachment 40520
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=40520=edit
Reduced testcase

The latest DSE changes introduced a regression in the ACATS testsuite:

=== acats tests ===
FAIL:   c432003

=== acats Summary ===
# of expected passes2319
# of unexpected failures1
Native configuration is x86_64-suse-linux-gnu

Reduced testcase attached, to be compiled like this:

eric@polaris:~/build/gcc/native> gnatchop testcase.txt 
splitting testcase.txt into:
   opt62.adb
   opt62_pkg.ads
eric@polaris:~/build/gcc/native> gnatmake opt62 -O
gcc -c -O opt62.adb
gcc -c -O opt62_pkg.ads
gnatbind -x opt62.ali
gnatlink opt62.ali -O
eric@polaris:~/build/gcc/native> ./opt62 

raised PROGRAM_ERROR : opt62.adb:13 explicit raise

eric@polaris:~/build/gcc/native> gcc/xgcc -Bgcc -S opt62.adb -O
-fdump-tree-dse1-details

This is the wrong store removal:

;; Function Opt62 (_ada_opt62, funcdef_no=1, decl_uid=4169, cgraph_uid=0,
symbol_order=0)

  Deleted dead store: MEM[(struct opt62_pkg__unconstrained_der &)].str1{off:
_17 * 8} = "abcde";

The testcase can be added directly to the gnat.dg testsuite.

[Bug c/79089] New: error: incorrect sharing of tree nodes

2017-01-14 Thread dcb314 at hotmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79089

Bug ID: 79089
   Summary: error: incorrect sharing of tree nodes
   Product: gcc
   Version: 7.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c
  Assignee: unassigned at gcc dot gnu.org
  Reporter: dcb314 at hotmail dot com
  Target Milestone: ---

Created attachment 40519
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=40519=edit
C source code

The attached code, when compiled by today's gcc trunk does this:

$ ../results/bin/gcc -c -w bug329.c
../../../proto/bgp/attrs.c: In function ‘bgp_free_prefix_table’:
../../../proto/bgp/attrs.c:938:1: error: incorrect sharing of tree nodes
p->prefix_hash
D.5411 = p->prefix_hash;
../../../proto/bgp/attrs.c:938:1: internal compiler error: verify_gimple failed
0xcd74b1 verify_gimple_in_cfg(function*, bool)
../../trunk/gcc/tree-cfg.c:5266
0xb812cb execute_function_todo
../../trunk/gcc/passes.c:1965
0xb82528 do_per_function
../../trunk/gcc/passes.c:1649
0xb82528 execute_todo
../../trunk/gcc/passes.c:2015
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See  for instructions.
$

I've also tracked down a range of revisions which bracket the culprit revision:

$ ../results.241433/bin/gcc -c -w bug329.c
$ ../results.242353/bin/gcc -c -w bug329.c
../../../proto/bgp/attrs.c: In function ‘bgp_free_prefix_table’:
../../../proto/bgp/attrs.c:938:1: error: incorrect sharing of tree nodes
p->prefix_hash
D.5411 = p->prefix_hash;
../../../proto/bgp/attrs.c:938:1: internal compiler error: verify_gimple failed
0xc6aa09 verify_gimple_in_cfg(function*, bool)
../../trunk/gcc/tree-cfg.c:5208
0xb1735b execute_function_todo
../../trunk/gcc/passes.c:1965
0xb18578 do_per_function
../../trunk/gcc/passes.c:1649
0xb18578 execute_todo
../../trunk/gcc/passes.c:2015
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See  for instructions.
$

[Bug middle-end/77484] [6/7 Regression] Static branch predictor causes ~6-8% regression of SPEC2000 GAP

2017-01-14 Thread hubicka at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77484

--- Comment #26 from Jan Hubicka  ---
Hello, did the Gap scores on arm too? Both Itanium and PPC testers seems to
show improved gap scores, so hope arm and the other ppc tester too.