[Bug preprocessor/70606] new warning for unicode quotes

2016-07-11 Thread pinskia at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70606

Andrew Pinski  changed:

   What|Removed |Added

   Keywords||diagnostic

--- Comment #1 from Andrew Pinski  ---
Confirmed.

[Bug c++/71832] [7 Regression] ICE on invalid C++11 code with incorrect decltype use for non-type template parameter: Segmentation fault

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

Martin Liška  changed:

   What|Removed |Added

   Keywords||ice-on-invalid-code
 Status|UNCONFIRMED |NEW
   Last reconfirmed||2016-07-11
 CC||marxin at gcc dot gnu.org
Summary|ICE on invalid C++11 code   |[7 Regression] ICE on
   |with incorrect decltype use |invalid C++11 code with
   |for non-type template   |incorrect decltype use for
   |parameter: Segmentation |non-type template
   |fault   |parameter: Segmentation
   ||fault
 Ever confirmed|0   |1

--- Comment #1 from Martin Liška  ---
Started to ICE from r236221.

[Bug preprocessor/70606] new warning for unicode quotes

2016-07-11 Thread pinskia at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70606

Andrew Pinski  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2016-07-11
 Ever confirmed|0   |1

--- Comment #2 from Andrew Pinski  ---
.  You might want to add the unicode for non-breaking space and maybe even the
unicode for non-breaking dash (the latter shows up when using outlook in html
mode :) ).

[Bug c++/71832] [7 Regression] ICE on invalid C++11 code with incorrect decltype use for non-type template parameter: Segmentation fault

2016-07-11 Thread pinskia at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71832

Andrew Pinski  changed:

   What|Removed |Added

   Target Milestone|--- |7.0

[Bug c++/71834] [5/6/7 Regression] accepts invalid C++11 code with too few number of template arguments for class template

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

Martin Liška  changed:

   What|Removed |Added

   Keywords||accepts-invalid
 Status|UNCONFIRMED |NEW
   Last reconfirmed||2016-07-11
 CC||marxin at gcc dot gnu.org
   Target Milestone|--- |5.5
Summary|accepts invalid C++11 code  |[5/6/7 Regression] accepts
   |with too few number of  |invalid C++11 code with too
   |template arguments for  |few number of template
   |class template  |arguments for class
   ||template
 Ever confirmed|0   |1

--- Comment #1 from Martin Liška  ---
Confirmed.

[Bug c++/71837] New: ICE on valid C++14 code with initialized lambda capture: in tsubst_pack_expansion, at cp/pt.c:10905

2016-07-11 Thread su at cs dot ucdavis.edu
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71837

Bug ID: 71837
   Summary: ICE on valid C++14 code with initialized lambda
capture: in tsubst_pack_expansion, at cp/pt.c:10905
   Product: gcc
   Version: 7.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c++
  Assignee: unassigned at gcc dot gnu.org
  Reporter: su at cs dot ucdavis.edu
  Target Milestone: ---

The following C++14 code causes an ICE when compiled with the current GCC trunk
on x86_64-linux-gnu in both 32-bit and 64-bit modes.  

It also affects at least 4.9.x, 5.x and 6.x. 

The code is accepted by both Clang and MSVC. 


$ g++-trunk -v
Using built-in specs.
COLLECT_GCC=g++-trunk
COLLECT_LTO_WRAPPER=/usr/local/gcc-trunk/libexec/gcc/x86_64-pc-linux-gnu/7.0.0/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: ../gcc-source-trunk/configure --enable-languages=c,c++,lto
--prefix=/usr/local/gcc-trunk --disable-bootstrap
Thread model: posix
gcc version 7.0.0 20160711 (experimental) [trunk revision 238202] (GCC)
$
$ clang++-3.8 -c -std=c++14 small.cpp
$
$ g++-trunk -c -std=c++14 small.cpp
small.cpp: In instantiation of ‘struct f(Ts ...) [with Ts = {int}]::’:
small.cpp:3:22:   required from ‘void f(Ts ...) [with Ts = {int}]’
small.cpp:8:7:   required from here
small.cpp:3:16: error: invalid use of pack expansion expression
   [ts (args ...)] {} ();
^
small.cpp:3:16: internal compiler error: in tsubst_pack_expansion, at
cp/pt.c:10905
0x6f7d64 tsubst_pack_expansion(tree_node*, tree_node*, int, tree_node*)
../../gcc-source-trunk/gcc/cp/pt.c:10905
0x6e4920 tsubst_copy_and_build(tree_node*, tree_node*, int, tree_node*, bool,
bool)
../../gcc-source-trunk/gcc/cp/pt.c:16780
0x71da10 instantiate_class_template_1
../../gcc-source-trunk/gcc/cp/pt.c:10359
0x71da10 instantiate_class_template(tree_node*)
../../gcc-source-trunk/gcc/cp/pt.c:10417
0x7c0973 complete_type(tree_node*)
../../gcc-source-trunk/gcc/cp/typeck.c:133
0x6e243c tsubst_copy_and_build(tree_node*, tree_node*, int, tree_node*, bool,
bool)
../../gcc-source-trunk/gcc/cp/pt.c:17194
0x6e48aa tsubst_copy_and_build(tree_node*, tree_node*, int, tree_node*, bool,
bool)
../../gcc-source-trunk/gcc/cp/pt.c:16536
0x6d6cbf tsubst_expr(tree_node*, tree_node*, int, tree_node*, bool)
../../gcc-source-trunk/gcc/cp/pt.c:15868
0x6d735a tsubst_expr(tree_node*, tree_node*, int, tree_node*, bool)
../../gcc-source-trunk/gcc/cp/pt.c:15180
0x6d66b3 tsubst_expr(tree_node*, tree_node*, int, tree_node*, bool)
../../gcc-source-trunk/gcc/cp/pt.c:15166
0x6d81f0 tsubst_expr(tree_node*, tree_node*, int, tree_node*, bool)
../../gcc-source-trunk/gcc/cp/pt.c:15351
0x6d4bf5 instantiate_decl(tree_node*, int, bool)
../../gcc-source-trunk/gcc/cp/pt.c:22095
0x7218d2 instantiate_pending_templates(int)
../../gcc-source-trunk/gcc/cp/pt.c:22214
0x764a05 c_parse_final_cleanups()
../../gcc-source-trunk/gcc/cp/decl2.c:4600
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <http://gcc.gnu.org/bugs.html> for instructions.
$





template < typename ... Ts > void f (Ts ... args)
{ 
  [ts (args ...)] {} ();
}

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

[Bug c++/71835] [6/7 Regression] ICE on invalid C++ code with ambiguous overloaded operators: tree check: expected tree that contains ‘decl minimal’ structure, have ‘pointer_type’ in convert_like_real

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

Martin Liška  changed:

   What|Removed |Added

   Keywords||ice-on-invalid-code
 Status|UNCONFIRMED |NEW
   Last reconfirmed||2016-07-11
 CC||marxin at gcc dot gnu.org
   Target Milestone|--- |6.2
Summary|ICE on invalid C++ code |[6/7 Regression] ICE on
   |with ambiguous overloaded   |invalid C++ code with
   |operators: tree check:  |ambiguous overloaded
   |expected tree that contains |operators: tree check:
   |‘decl minimal’ structure,   |expected tree that contains
   |have ‘pointer_type’ in  |‘decl minimal’ structure,
   |convert_like_real, at   |have ‘pointer_type’ in
   |cp/call.c:6549  |convert_like_real, at
   ||cp/call.c:6549
 Ever confirmed|0   |1

--- Comment #1 from Martin Liška  ---
GCC 6.1.0 works fine, but the head of gcc-6 branch ICEs, same as current trunk.

[Bug tree-optimization/71830] [7 Regression] gcc ICE at -O3 on valid code on x86_64-linux-gnu: verify_gimple failed

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

Martin Liška  changed:

   What|Removed |Added

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

--- Comment #2 from Martin Liška  ---
Confirmed, started with r238078 (which is probably the same revision as in the
dup bug).

[Bug c++/71837] ICE on valid C++14 code with initialized lambda capture: in tsubst_pack_expansion, at cp/pt.c:10905

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

Martin Liška  changed:

   What|Removed |Added

   Keywords||ice-on-valid-code,
   ||rejects-valid
 Status|UNCONFIRMED |NEW
   Last reconfirmed||2016-07-11
 CC||marxin at gcc dot gnu.org
 Ever confirmed|0   |1

--- Comment #1 from Martin Liška  ---
Confirmed, current trunk and gcc-6 branch ICEs on that.

[Bug c++/71820] ICE on valid C++ code: in arg_assoc_type, at cp/name-lookup.c:5583

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

Martin Liška  changed:

   What|Removed |Added

   Keywords||ice-on-valid-code
 Status|UNCONFIRMED |NEW
   Last reconfirmed||2016-07-11
 CC||marxin at gcc dot gnu.org
   Target Milestone|--- |4.9.4
 Ever confirmed|0   |1

--- Comment #1 from Martin Liška  ---
Confirmed, ICEs on all releases since 4.5.0.

[Bug tree-optimization/70600] Missed tree optimization with multiple additions in different types.

2016-07-11 Thread pinskia at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70600

Andrew Pinski  changed:

   What|Removed |Added

   Keywords||missed-optimization
 CC||pinskia at gcc dot gnu.org
   Severity|normal  |enhancement

--- Comment #3 from Andrew Pinski  ---
I have seen other cases which need to be handled by FRE/PRE instead of
reassiocate.

Even the simple:

int f(int a, int b, int d)
{
  unsigned a1 = a;
  unsigned b1 = b;
  unsigned c1 = a + b;
  int c = c1;
  if (d)
c = a + b;
  return c;
}

Note I think FRE handles the above incorrectly as it converts the safe unsigned
addition to non safe signed addition. I will file a different bug about that
issue.

[Bug tree-optimization/70600] Missed tree optimization with multiple additions in different types.

2016-07-11 Thread pinskia at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70600

--- Comment #4 from Andrew Pinski  ---
(In reply to Andrew Pinski from comment #3)
> Note I think FRE handles the above incorrectly as it converts the safe
> unsigned addition to non safe signed addition. I will file a different bug
> about that issue.

Actually I messed up the testcase and there is no bug there :).

But we do need FRE to handle this case rather than just reassoicate:
int f(int a, int b, int d)
{
  unsigned a1 = a;
  unsigned b1 = b;
  unsigned c1 = a1 + b1;
  if (a <= 0 || b <= 0)
return 0;
  int c = c1;
  if (d)
c = a + b;
  return c;
}
--- CUT 
We should also handle cases where the lower sizes are done too (just need to
truncate inside the if).  I have seen both of these before in real code.

[Bug sanitizer/70541] unnoticed invalid dereference when using address sanitizer

2016-07-11 Thread pinskia at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70541

Andrew Pinski  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |FIXED
   Target Milestone|--- |6.0

--- Comment #6 from Andrew Pinski  ---
Fixed.

[Bug ada/71817] [7 regression] suspicious condition in C code

2016-07-11 Thread ebotcazou at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71817

Eric Botcazou  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2016-07-11
 CC||ebotcazou at gcc dot gnu.org
   Target Milestone|--- |7.0
Summary|gcc/ada/adaint.c: 2 *   |[7 regression] suspicious
   |Suspicious condition|condition in C code
 Ever confirmed|0   |1

--- Comment #1 from Eric Botcazou  ---
Recent issue.

[Bug translation/70591] add ability to use a fallback LANGUAGE variable instead of primary language

2016-07-11 Thread pinskia at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70591

Andrew Pinski  changed:

   What|Removed |Added

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

--- Comment #1 from Andrew Pinski  ---
LC_MESSAGES=C
or:
LC_MESSAGES=en

either will work and get you messages in English.

I don't see what else you are asking for.

Also when compiling gcc you can disable all uses by using --disable-nls option
to configure.

[Bug ada/71817] [7 regression] suspicious condition in C code

2016-07-11 Thread ebotcazou at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71817

Eric Botcazou  changed:

   What|Removed |Added

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

--- Comment #2 from Eric Botcazou  ---
Fixing.

[Bug ada/71817] [7 regression] suspicious condition in C code

2016-07-11 Thread ebotcazou at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71817

--- Comment #3 from Eric Botcazou  ---
Author: ebotcazou
Date: Mon Jul 11 07:41:11 2016
New Revision: 238204

URL: https://gcc.gnu.org/viewcvs?rev=238204&root=gcc&view=rev
Log:
PR ada/71817
* adaint.c (__gnat_is_read_accessible_file): Add parentheses.
(__gnat_is_write_accessible_file): Likewise.

Modified:
trunk/gcc/ada/ChangeLog
trunk/gcc/ada/adaint.c

[Bug ada/71817] [7 regression] suspicious condition in C code

2016-07-11 Thread ebotcazou at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71817

Eric Botcazou  changed:

   What|Removed |Added

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

--- Comment #4 from Eric Botcazou  ---
.

[Bug tree-optimization/71831] __builtin_object_size poor results with no optimization

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

Jakub Jelinek  changed:

   What|Removed |Added

 CC||jakub at gcc dot gnu.org

--- Comment #1 from Jakub Jelinek  ---
That is by design.  -D_FORTIFY_SOURCE=* does nothing if not __OPTIMIZE__.

[Bug target/59833] ARM soft-float extendsfdf2 fails to quiet signaling NaN

2016-07-11 Thread ramana at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=59833

--- Comment #6 from Ramana Radhakrishnan  ---
(In reply to Aurelien Jarno from comment #5)
> (In reply to Ramana Radhakrishnan from comment #4)
> > Need to apply Aurelien's patch - looks like that's slipped through the
> > cracks.
> 
> What was missing to the patch was a testcase which compiles on all platform.
> This has happened recently, as part of the testcase for PR61441. I therefore
> guess this patch can now be applied.

Do you mind pinging it after another round of testing ? 

Thanks,
Ramana

[Bug c++/71820] ICE on valid C++ code: in arg_assoc_type, at cp/name-lookup.c:5583

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

Jakub Jelinek  changed:

   What|Removed |Added

 CC||jakub at gcc dot gnu.org

--- Comment #2 from Jakub Jelinek  ---
Indeed, ICEs already with r7.

[Bug c++/71821] [5/6/7 regression] ICE on invalid C++11 code (incorrect argument for alignas): unexpected expression ‘f’ of kind template_id_expr

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

Jakub Jelinek  changed:

   What|Removed |Added

 CC||dodji at gcc dot gnu.org,
   ||jakub at gcc dot gnu.org,
   ||jason at gcc dot gnu.org

--- Comment #2 from Jakub Jelinek  ---
If I slightly modify the testcase:
template < typename > constexpr int f () {  return 4; }
char c alignas (f );
the ICE starts with r192199.

[Bug c++/71822] [6/7 Regression] ICE: in gimplify_expr, at gimplify.c:11025

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

Jakub Jelinek  changed:

   What|Removed |Added

 CC||jakub at gcc dot gnu.org,
   ||jason at gcc dot gnu.org

--- Comment #3 from Jakub Jelinek  ---
template 
struct A {};
struct B
{
  static B & foo () {}
  template  A  bar (unsigned) {}
};
template  struct C {};
template  struct D
{
  typedef C  U;
  explicit D (A  x = B::foo ().bar (sizeof (U))) {}
};
struct E
{
  void baz ();
  D  e[1];
};
struct F
{
  bool baz ();
};
bool F::baz ()
{
  E ().baz ();
}

[Bug fortran/71838] New: ICE with OpenCoarrays on submodule

2016-07-11 Thread mexas at bristol dot ac.uk
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71838

Bug ID: 71838
   Summary: ICE with OpenCoarrays on submodule
   Product: gcc
   Version: 6.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: fortran
  Assignee: unassigned at gcc dot gnu.org
  Reporter: mexas at bristol dot ac.uk
  Target Milestone: ---

‘
in pp_string, at pretty-print.c:928
0x1346eab pp_string(pretty_printer*, char const*)
   
/panfs/panasas01/mech/mexas/gcc-6-20160410-obj/../gcc-6-20160410/gcc/pretty-print.c:928
0x134789f pp_format(pretty_printer*, text_info*)
   
/panfs/panasas01/mech/mexas/gcc-6-20160410-obj/../gcc-6-20160410/gcc/pretty-print.c:570
0x1342da8 diagnostic_report_diagnostic(diagnostic_context*, diagnostic_info*)
   
/panfs/panasas01/mech/mexas/gcc-6-20160410-obj/../gcc-6-20160410/gcc/diagnostic.c:825
0x63bbb8 gfc_error_now(char const*, ...)
   
/panfs/panasas01/mech/mexas/gcc-6-20160410-obj/../gcc-6-20160410/gcc/fortran/error.c:1179
0x6ba236 check_conflict
   
/panfs/panasas01/mech/mexas/gcc-6-20160410-obj/../gcc-6-20160410/gcc/fortran/symbol.c:469
0x6be0d6 gfc_copy_attr(symbol_attribute*, symbol_attribute*, locus*)
   
/panfs/panasas01/mech/mexas/gcc-6-20160410-obj/../gcc-6-20160410/gcc/fortran/symbol.c:1939
0x6bf1d5 gfc_copy_dummy_sym(gfc_symbol**, gfc_symbol*, int)
   
/panfs/panasas01/mech/mexas/gcc-6-20160410-obj/../gcc-6-20160410/gcc/fortran/symbol.c:2011
0x632ecb gfc_match_submod_proc()
   
/panfs/panasas01/mech/mexas/gcc-6-20160410-obj/../gcc-6-20160410/gcc/fortran/decl.c:7765
0x685d2d decode_statement
   
/panfs/panasas01/mech/mexas/gcc-6-20160410-obj/../gcc-6-20160410/gcc/fortran/parse.c:383
0x687834 next_free
   
/panfs/panasas01/mech/mexas/gcc-6-20160410-obj/../gcc-6-20160410/gcc/fortran/parse.c:1076
0x687834 next_statement
   
/panfs/panasas01/mech/mexas/gcc-6-20160410-obj/../gcc-6-20160410/gcc/fortran/parse.c:1310
0x68b42c parse_contained
   
/panfs/panasas01/mech/mexas/gcc-6-20160410-obj/../gcc-6-20160410/gcc/fortran/parse.c:5039
0x68c269 parse_module
   
/panfs/panasas01/mech/mexas/gcc-6-20160410-obj/../gcc-6-20160410/gcc/fortran/parse.c:5432
0x68cc39 gfc_parse_file()
   
/panfs/panasas01/mech/mexas/gcc-6-20160410-obj/../gcc-6-20160410/gcc/fortran/parse.c:5738
0x6ce875 gfc_be_parse_file
   
/panfs/panasas01/mech/mexas/gcc-6-20160410-obj/../gcc-6-20160410/gcc/fortran/f95-lang.c:201
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See  for instructions.
make: *** [m3clvg_sm3.o] Error 1

The source file is a submodue:

 https://sourceforge.net/p/cgpack/code/HEAD/tree/head/m3clvg_sm3.f90

The module is:

 https://sourceforge.net/p/cgpack/code/HEAD/tree/head/cgca_m3clvg.f90

The Makefile is:

https://sourceforge.net/p/cgpack/code/HEAD/tree/head/Makefile-bc3-oca

$ caf --version

OpenCoarrays Coarray Fortran Compiler Wrapper (caf version 1.4.0)
Copyright (C) 2015-2016 Sourcery, Inc.

[Bug c++/71822] [6/7 Regression] ICE: in gimplify_expr, at gimplify.c:11025

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

Jakub Jelinek  changed:

   What|Removed |Added

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

--- Comment #4 from Jakub Jelinek  ---
Created attachment 38868
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=38868&action=edit
gcc7-pr71822.patch

Untested fix.

[Bug tree-optimization/71823] [6/7 Regression] g++ segfaults with -mfma and -ftree-slp-vectorize

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

Jakub Jelinek  changed:

   What|Removed |Added

 CC||jakub at gcc dot gnu.org

--- Comment #2 from Jakub Jelinek  ---
Reduced testcase:
float a[4], b[4];

int
main ()
{
  int i;
  for (i = 0; i < 4; ++i)
b[i] = __builtin_fma (0.0f, 0.0f, a[i]);
  return 0;
}

[Bug tree-optimization/71823] [6/7 Regression] g++ segfaults with -mfma and -ftree-slp-vectorize

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

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

[Bug fortran/71758] [7 Regression] ICE in verify_gimple_in_cfg, at tree-cfg.c:5212

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

Dominique d'Humieres  changed:

   What|Removed |Added

 CC||jakub at gcc dot gnu.org

--- Comment #4 from Dominique d'Humieres  ---
> Confirmed on trunk, all previous releases do not ICE.

The ICE occurs if gcc is configured with --enable-checking=yes, but not if it
is configured with --enable-checking=release. I see the ICE with 5.0.0 20150219
(experimental) r220825 and 6.0.0 20160415 (experimental) r235027.

With gcc version 4.9.0 20140411 (experimental) r209304, I get

pr71758_1.f90:8.10:

!$omp target device(i-1) map(from: offload(i:i))
  1
Error: Unclassifiable OpenMP directive at (1)
pr71758_1.f90:10.10:

!$omp end target
  1
Error: Unclassifiable OpenMP directive at (1)

So I doubt this PR is really a regression.

[Bug target/69880] Linking Windows resource + implicit 'default-manifest.o' creates bad .exe

2016-07-11 Thread nickc at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69880

Nick Clifton  changed:

   What|Removed |Added

 CC||nickc at gcc dot gnu.org

--- Comment #2 from Nick Clifton  ---
Hi Boris,

  Which version of the linker are you using ?  I ask because there have been
  several bugs reported with merging windows resources, but I think that these
  have all been fixed now.

> But, the way these two objects are linked also causes the second instance 
> to be apparently "orphaned" between two valid sections (.rsrc and .reloc 
> in my particular case) of the executable.

  If you are using the latest version of the linker and this is still happening
  then it would definitely seem to be a linker bug.  If so, it would be useful
  if you could report this on the binutils bugzilla system, and provide a test
  case that demonstrates the problem.


> Which suggests one possible way to support disabling this functionality:
> change default-manifest.o to libdefault-manifest.a and use the standard
> -ldefault-manifest logic to link it. This way the user will be able to
> provide their own (potentially empty) version.

  Personally I have no objections to this idea.  It would be nice however if
  one of the Cygwin maintainers could check it out and make sure that it does
  not stop default manifects from working in the way that they want.

Cheers
  Nick

[Bug tree-optimization/71823] [6/7 Regression] g++ segfaults with -mfma and -ftree-slp-vectorize

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

--- Comment #4 from Jakub Jelinek  ---
Created attachment 38869
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=38869&action=edit
gcc7-pr71823.patch

Untested fix.

[Bug c++/71834] [5/6/7 Regression] accepts invalid C++11 code with too few number of template arguments for class template

2016-07-11 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71834

Jonathan Wakely  changed:

   What|Removed |Added

  Known to work||4.9.3

--- Comment #2 from Jonathan Wakely  ---
Older versions rejected it for different reasons:

g++4.8.5 -std=c++11 v.cc 
v.cc:3:42: error: parameter pack ‘’ must be at the end of the
template parameter list
   template < Ts ..., typename U > struct B {};
  ^
v.cc:7:1: error: ‘B’ in ‘struct A’ does not name a type
 A < int >::B < 0 > e;
 ^


g++-4.9.3 -std=c++11 v.cc

v.cc:7:21: error: invalid type in declaration before ‘;’ token
 A < int >::B < 0 > e;
 ^

Neither of those is a very useful diagnostic.

[Bug fortran/71759] [7 Regression] ICE in enforce_single_undo_checkpoint, at fortran/symbol.c:3478

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

--- Comment #3 from Dominique d'Humieres  ---
> Confirmed on current trunk.

I also see the same ICE with gcc version 4.9.0 20140411 (experimental) r209304,
5.0.0 20150219 (experimental) r220825, and 6.0.0 20160415 (experimental)
r235027. I don't see the ICE with compilers configured with
--enable-checking=release.

[Bug bootstrap/71816] [7 Regression] bootstrap broken on multiple targets

2016-07-11 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71816

Richard Biener  changed:

   What|Removed |Added

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

--- Comment #12 from Richard Biener  ---
Mine.  I'll quickly investigate but likely revert for the time being.

[Bug bootstrap/71816] [7 Regression] bootstrap broken on multiple targets

2016-07-11 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71816

--- Comment #13 from Richard Biener  ---
Btw, preprocessed source for the bootstrap issue is still appreciated (plus
mentioning the exact target triplet so I can verify with a cross).

[Bug libstdc++/70794] vector.push_back() crashes with std::bad_alloc after 2^32 calls

2016-07-11 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70794

Jonathan Wakely  changed:

   What|Removed |Added

 Status|WAITING |RESOLVED
 Resolution|--- |INVALID

--- Comment #8 from Jonathan Wakely  ---
You're running out of memory. Growing beyond 4294967297 chars will double the
vector's size, which will allocate 8GiB in addition to the 4GiB already used by
the vector. Before it can copy the elements to the new storage and free the old
4GiB it runs out of memory.

[Bug c++/71826] [7 Regression] ICE on valid C++ code with ambiguous member lookup: tree check: expected baselink, have error_mark in tsubst_baselink, at cp/pt.c:13737

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

Jakub Jelinek  changed:

   What|Removed |Added

 CC||jakub at gcc dot gnu.org
   Target Milestone|--- |7.0
Summary|ICE on valid C++ code with  |[7 Regression] ICE on valid
   |ambiguous member lookup:|C++ code with ambiguous
   |tree check: expected|member lookup: tree check:
   |baselink, have error_mark   |expected baselink, have
   |in tsubst_baselink, at  |error_mark in
   |cp/pt.c:13737   |tsubst_baselink, at
   ||cp/pt.c:13737

[Bug bootstrap/71816] [7 Regression] bootstrap broken on multiple targets

2016-07-11 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71816

--- Comment #14 from Richard Biener  ---
Created attachment 38870
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=38870&action=edit
untested patch

I am testing this patch, it was a bit optimistic to simply replace refs I
guess.

[Bug c++/71826] [7 Regression] ICE on valid C++ code with ambiguous member lookup: tree check: expected baselink, have error_mark in tsubst_baselink, at cp/pt.c:13737

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

Jakub Jelinek  changed:

   What|Removed |Added

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

--- Comment #5 from Jakub Jelinek  ---
Created attachment 38871
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=38871&action=edit
gcc7-pr71826.patch

Untested fix for the ICE.

[Bug c++/71827] [4.9/5/6/7 Regression] ICE on invalid C++11 code with non constant diff between two labels

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

Jakub Jelinek  changed:

   What|Removed |Added

 CC||jakub at gcc dot gnu.org,
   ||jason at gcc dot gnu.org
   Target Milestone|6.2 |4.9.4
Summary|[6/7 Regression] ICE on |[4.9/5/6/7 Regression] ICE
   |invalid C++11 code with non |on invalid C++11 code with
   |constant diff between two   |non constant diff between
   |labels  |two labels

--- Comment #2 from Jakub Jelinek  ---
No, that appears only because 6+ defaults to -std=c++14.  With -std=c++0x this
ICEs back to r174891, r174880 rejects it.
template  struct A {};

void
foo () 
{
  m: n: A  a;
}

[Bug fortran/71838] ICE with OpenCoarrays on submodule

2016-07-11 Thread mexas at bristol dot ac.uk
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71838

--- Comment #1 from Anton Shterenlikht  ---
with OpenCoarrays-1.6.0 I just get:

caf -c -Wall -g -fbacktrace -fcheck-array-temporaries  m3clvg_sm3.f90
'
(null):0: confused by earlier errors, bailing out
make: *** [m3clvg_sm3.o] Error 1


But there are no "earlier errors" reported.

[Bug fortran/71838] ICE with OpenCoarrays on submodule

2016-07-11 Thread mexas at bristol dot ac.uk
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71838

--- Comment #2 from Anton Shterenlikht  ---
forgot to add that this is now with gcc-6.1:

$ caf --version

OpenCoarrays Coarray Fortran Compiler Wrapper (caf version 1.6.0)
Copyright (C) 2015-2016 Sourcery, Inc.

$ mpif90 --version
GNU Fortran (GCC) 6.1.0

[Bug fortran/71839] New: undefined reference to `_gfortran_caf_stop_str'

2016-07-11 Thread mexas at bristol dot ac.uk
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71839

Bug ID: 71839
   Summary: undefined reference to `_gfortran_caf_stop_str'
   Product: gcc
   Version: 6.1.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: fortran
  Assignee: unassigned at gcc dot gnu.org
  Reporter: mexas at bristol dot ac.uk
  Target Milestone: ---

$ caf --version

OpenCoarrays Coarray Fortran Compiler Wrapper (caf version 1.6.0)
Copyright (C) 2015-2016 Sourcery, Inc.

$ mpif90 --version
GNU Fortran (GCC) 6.1.0


caf  -c testAAF.f90 -Wall -I. -I/panfs/panasas01/mech/mexas/mod -g
-fbacktrace -fcheck-array-temporaries 
caf  -o testAAF.x testAAF.o testaux.o -L/panfs/panasas01/mech/mexas/lib
-lcgpack
testAAF.o: In function `MAIN__':
testAAF.f90:(.text+0x846): undefined reference to `_gfortran_caf_stop_str'
testAAF.f90:(.text+0x926): undefined reference to `_gfortran_caf_stop_str'
collect2: error: ld returned 1 exit status
make: *** [testAAF.x] Error 1

cgpack is my coarray library:

$ nm ~/lib/libcgpack.a |grep stop_str
 U _gfortran_caf_error_stop_str
 U _gfortran_caf_error_stop_str

It seems ERROR STOP is ok, but STOP is not.

[Bug tree-optimization/71823] [6/7 Regression] g++ segfaults with -mfma and -ftree-slp-vectorize

2016-07-11 Thread glisse at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71823

--- Comment #5 from Marc Glisse  ---
(In reply to Jakub Jelinek from comment #2)
> b[i] = __builtin_fma (0.0f, 0.0f, a[i]);

I am surprised we don't optimize that line, at least with -fno-signed-zeros. If
the testcase still works with less trivial numbers, that might be better, in
case we add such optimizations in the future?

[Bug tree-optimization/71840] New: [7 Regression] internal compiler error: Segmentation fault in compute_avail

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

Bug ID: 71840
   Summary: [7 Regression] internal compiler error: Segmentation
fault in compute_avail
   Product: gcc
   Version: 7.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: tree-optimization
  Assignee: unassigned at gcc dot gnu.org
  Reporter: mpolacek at gcc dot gnu.org
  Target Milestone: ---

With the following testcase (derived from libgcc/config/libbid/bid128_fma.c) on
x86_64-pc-linux-gnu I get 

$ ./cc1 -quiet -O2 x.c
x.c: In function ‘foo’:
x.c:24:8: warning: assignment makes integer from pointer without a cast
[-Wint-conversion]
 *p = res;
^
x.c:17:1: internal compiler error: Segmentation fault
 foo (S c, int *p)
 ^~~
0xb8566f crash_signal
/home/marek/src/gcc/gcc/toplev.c:335
0xd1d174 contains_struct_check(tree_node*, tree_node_structure_enum, char
const*, int, char const*)
/home/marek/src/gcc/gcc/tree.h:3143
0xd1d174 compute_avail
/home/marek/src/gcc/gcc/tree-ssa-pre.c:3811
0xd1d174 execute
/home/marek/src/gcc/gcc/tree-ssa-pre.c:4846
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See  for instructions.


typedef struct
{
  int w[4];
} S;

extern void res (S *);

void
bar (S x, S *p)
{
  S z;
  if (x.w[2])
*p = z;
}

void
foo (S c, int *p)
{
  S s;
  res (&s);
  if (c.w[2] || s.w[2])
bar (s, &s);
  if (s.w[0])
*p = res;
}

[Bug c++/71828] [6/7 regression] ICE on valid C++11 code with constexpr __Complex int variable declaration: in operand_equal_p, at fold-const.c:2790

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

Jakub Jelinek  changed:

   What|Removed |Added

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

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

Untested fix.

[Bug tree-optimization/71840] [7 Regression] internal compiler error: Segmentation fault in compute_avail

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

--- Comment #1 from Marek Polacek  ---
I think this started with

commit e1bba98001be7ab89d5734ae0fdfe3996b4281a7
Author: rguenth 
Date:   Thu Jul 7 07:43:35 2016 +

2016-07-07  Richard Biener  

* tree-ssa-pre.c: Include alias.h.
(compute_avail): If we have multiple VN_REFERENCEs with the
same hashtable entry adjust that to make it a valid replacement
for all of them with respect to alignment and aliasing
when doing insertion.
* tree-ssa-sccvn.h (vn_reference_operands_for_lookup): Declare.
* tree-ssa-sccvn.c (vn_reference_operands_for_lookup): New function.


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

(but doesn't look like a dup of PR71816).

[Bug bootstrap/71816] [7 Regression] bootstrap broken on multiple targets

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

Bernd Edlinger  changed:

   What|Removed |Added

 CC||bernd.edlinger at hotmail dot 
de

--- Comment #15 from Bernd Edlinger  ---
Created attachment 38873
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=38873&action=edit
preprocessed boot-strap source

(In reply to Richard Biener from comment #13)
> Btw, preprocessed source for the bootstrap issue is still appreciated (plus
> mentioning the exact target triplet so I can verify with a cross).

No problem, Richard.

cross-build was configured with:

../gcc-7-20160710/configure --prefix=/home/ed/gnu/arm-linux-gnueabihf-cross
--host=arm-linux-gnueabihf --target=arm-linux-gnueabihf
--enable-languages=c,c++,fortran,ada --with-arch=armv7-a --with-tune=cortex-a9
--with-fpu=vfpv3-d16 --with-float=hard

[Bug tree-optimization/71823] [6/7 Regression] g++ segfaults with -mfma and -ftree-slp-vectorize

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

--- Comment #6 from Jakub Jelinek  ---
(In reply to Marc Glisse from comment #5)
> (In reply to Jakub Jelinek from comment #2)
> > b[i] = __builtin_fma (0.0f, 0.0f, a[i]);
> 
> I am surprised we don't optimize that line, at least with -fno-signed-zeros.
> If the testcase still works with less trivial numbers, that might be better,
> in case we add such optimizations in the future?

I've changed the testcase to
__builtin_fma (1024.0f, 1024.0f, a[i]);
which ICEs without the patch the same way.

Feel free to open an enhancement PR for the fma (0, 0, ...) or fma (..., ...,
0)
cases which indeed could be folded at least for -ffast-math to the last
argument or multiplication of the first two arguments.

[Bug c++/71832] [7 Regression] ICE on invalid C++11 code with incorrect decltype use for non-type template parameter: Segmentation fault

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

Jakub Jelinek  changed:

   What|Removed |Added

   Keywords||error-recovery
   Priority|P3  |P4
 CC||jakub at gcc dot gnu.org,
   ||jason at gcc dot gnu.org

[Bug fortran/71838] ICE with OpenCoarrays on submodule

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

Dominique d'Humieres  changed:

   What|Removed |Added

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

--- Comment #3 from Dominique d'Humieres  ---
> The module is:
> https://sourceforge.net/p/cgpack/code/HEAD/tree/head/cgca_m3clvg.f90

This module uses several other modules.

> (null):0: confused by earlier errors, bailing out

This occurs when using a compiler configures with --enable-checking=release
(default for releases).

[Bug c++/71833] [4.9/5/6/7 regression] ICE on valid C++11 code with nested variadic templates: tree check: accessed elt 0 of tree_vec with 1 elts in coerce_template_parameter_pack, at cp/pt.c:7439

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

Jakub Jelinek  changed:

   What|Removed |Added

 CC||jakub at gcc dot gnu.org,
   ||jason at gcc dot gnu.org
   Target Milestone|--- |4.9.4
Summary|[5/6/7 regression] ICE on   |[4.9/5/6/7 regression] ICE
   |valid C++11 code with   |on valid C++11 code with
   |nested variadic templates:  |nested variadic templates:
   |tree check: accessed elt 0  |tree check: accessed elt 0
   |of tree_vec with 1 elts in  |of tree_vec with 1 elts in
   |coerce_template_parameter_p |coerce_template_parameter_p
   |ack, at cp/pt.c:7439|ack, at cp/pt.c:7439

[Bug fortran/71839] undefined reference to `_gfortran_caf_stop_str'

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

Dominique d'Humieres  changed:

   What|Removed |Added

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

--- Comment #1 from Dominique d'Humieres  ---
Please provide testAAF.f90 and the files needed to compile it.

[Bug fortran/71565] INTENT(IN) polymorphic argument with pointer components - reject valid code

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

Dominique d'Humieres  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2016-07-11
 Ever confirmed|0   |1

--- Comment #1 from Dominique d'Humieres  ---
Confirmed from 4.8 up to trunk (7.0).

[Bug c++/71834] [5/6/7 Regression] accepts invalid C++11 code with too few number of template arguments for class template

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

Jakub Jelinek  changed:

   What|Removed |Added

 CC||jakub at gcc dot gnu.org,
   ||paolo at gcc dot gnu.org

--- Comment #3 from Jakub Jelinek  ---
This started to be accepted with r213952.

[Bug c++/71835] [6/7 Regression] ICE on invalid C++ code with ambiguous overloaded operators: tree check: expected tree that contains ‘decl minimal’ structure, have ‘pointer_type’ in convert_like_real

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

Jakub Jelinek  changed:

   What|Removed |Added

   Keywords||error-recovery
   Priority|P3  |P4
 CC||jakub at gcc dot gnu.org,
   ||paolo at gcc dot gnu.org

--- Comment #2 from Jakub Jelinek  ---
Started with r226308.

[Bug c++/71841] New: variadic template can't cast to base class

2016-07-11 Thread johan.leroy at openehs dot co.uk
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71841

Bug ID: 71841
   Summary: variadic template can't cast to base class
   Product: gcc
   Version: 5.4.1
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c++
  Assignee: unassigned at gcc dot gnu.org
  Reporter: johan.leroy at openehs dot co.uk
  Target Milestone: ---

Also with version 6.0

Following example compiles and run on Visual Studio and CLang

template
class Item : public IItem
{
private:
static constexpr size_t c_NumberOfChilderen = (sizeof...(aItem) > 0 ?
sizeof...(aItem) : 1);
public:
IItem* RootItem;
IItem* ChildItem[c_NumberOfChilderen] = { aItem... };

Item()
{
for (size_t x = 0; x < sizeof...(aItem); x++)
{
ChildItem[x]->SetRoot(this);
}
}

void printTree(int level)
{
for (int y = 0; y < level; y++)
printf("\t");
printf("%p\n", this);
for (size_t x = 0; x < sizeof...(aItem); x++)
{
ChildItem[x]->printTree(level + 1);
}
}
void SetRoot(IItem* RootItem)
{
RootItem = RootItem;
}
private:

};




Item<> Level10;
Item<> Level11;
Item(&Level11), reinterpret_cast(&Level10)>
ItemLevel00;

int main()
{
ItemLevel00.printTree(0);
return 0;
}


//Error from GCC

../src/main.cpp:53:76: error: could not convert template argument '(IItem*)(&
Level11)' to 'IItem*'
 Item(&Level11), reinterpret_cast(&Level10)>
ItemLevel00;
^
../src/main.cpp:53:76: error: could not convert template argument '(IItem*)(&
Level10)' to 'IItem*'
../src/main.cpp: In function 'int main()':
../src/main.cpp:57:14: error: request for member 'printTree' in 'ItemLevel00',
which is of non-class type 'int'
  ItemLevel00.printTree(0);

[Bug tree-optimization/71842] New: Optimize FMA when some arguments are simple constants

2016-07-11 Thread glisse at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71842

Bug ID: 71842
   Summary: Optimize FMA when some arguments are simple constants
   Product: gcc
   Version: 7.0
Status: UNCONFIRMED
  Keywords: missed-optimization
  Severity: enhancement
  Priority: P3
 Component: tree-optimization
  Assignee: unassigned at gcc dot gnu.org
  Reporter: glisse at gcc dot gnu.org
  Target Milestone: ---

#include 
double f(double x, double y){ return fma(x, y, 0.); }
double g(double x, double y){ return fma(0., x, y); }
double h(double x){ return fma(3., 4., x); }

Depending on compiler options, we could optimize those to x*y, y and 12.+x.
fma(1,x,y) might also be x+y.

[Bug bootstrap/71816] [7 Regression] bootstrap broken on multiple targets

2016-07-11 Thread ktkachov at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71816

--- Comment #16 from ktkachov at gcc dot gnu.org ---
The following is reduced from the genattrtab.c ICE when bootstrapping on
arm-none-linux-gnueabihf:

typedef struct rtx_def *rtx;
union rtunion {
  int rt_int;
  rtx rt_rtx;
};
struct rtx_def {
  struct {
rtunion fld[1];
long long hwint;
  } u;
};
rtx a, b, c;
static bool fn1(rtx, rtx p2) { return p2->u.fld[0].rt_int; }

void fn2() {
  if (c && c->u.fld[0].rt_rtx)
;
  else if (fn1(b, c))
c = a;
}


ICEs for me at -O2 -march=armv7-a -mfloat-abi=hard -mfpu=neon-vfpv4, for
example

[Bug c++/71835] [6/7 Regression] ICE on invalid C++ code with ambiguous overloaded operators: tree check: expected tree that contains ‘decl minimal’ structure, have ‘pointer_type’ in convert_like_real

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

Jakub Jelinek  changed:

   What|Removed |Added

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

--- Comment #3 from Jakub Jelinek  ---
Created attachment 38874
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=38874&action=edit
gcc7-pr71835.patch

Untested fix.

[Bug c++/71837] [4.9/5/6/7 Regression] ICE on valid C++14 code with initialized lambda capture: in tsubst_pack_expansion, at cp/pt.c:10905

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

Jakub Jelinek  changed:

   What|Removed |Added

 CC||jakub at gcc dot gnu.org,
   ||jason at gcc dot gnu.org
   Target Milestone|--- |4.9.4
Summary|ICE on valid C++14 code |[4.9/5/6/7 Regression] ICE
   |with initialized lambda |on valid C++14 code with
   |capture: in |initialized lambda capture:
   |tsubst_pack_expansion, at   |in tsubst_pack_expansion,
   |cp/pt.c:10905   |at cp/pt.c:10905

--- Comment #2 from Jakub Jelinek  ---
ICE started with r198246.

[Bug middle-end/69526] ivopts candidate strangeness

2016-07-11 Thread rdapp at linux dot vnet.ibm.com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69526

--- Comment #25 from rdapp at linux dot vnet.ibm.com ---
Created attachment 38875
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=38875&action=edit
Updated patch and test, math.pd/VRP

Some cleanups and fixes, the patch can now handle more cases in the inner type.
Also added more test cases.

[Bug c++/71843] New: [concepts] Diagnostics issued for constraint satisfaction failure fail to elucidate unsatisfied constraints

2016-07-11 Thread tom at honermann dot net
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71843

Bug ID: 71843
   Summary: [concepts] Diagnostics issued for constraint
satisfaction failure fail to elucidate unsatisfied
constraints
   Product: gcc
   Version: unknown
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c++
  Assignee: unassigned at gcc dot gnu.org
  Reporter: tom at honermann dot net
CC: andrew.n.sutton at gmail dot com, asutton at gcc dot gnu.org
  Target Milestone: ---

The diagnostics emitted when overload resolution fails due to constraint
satisfaction failure do not elucidate the constraints that were not satisfied. 
For non-trivial concepts, it can be difficult and tedious for a user to
determine exactly why a given type did not satisfy a set of constraints.

For example, using gcc 6.1.0:

$ cat t.cpp
template
concept bool C = requires(T t) { t.i; };
template
auto f(T t) {
return t.i;
}
struct S {
};
auto x = f(S{});

$ g++ --version
g++ (GCC) 6.1.0
...

$ g++ -c -std=c++1z -fconcepts t.cpp
t.cpp:9:15: error: cannot call function ‘auto f(T) [with T = S]’
 auto x = f(S{});
   ^
t.cpp:4:6: note:   constraints not satisfied
 auto f(T t) {
  ^
t.cpp:4:6: note:   concept ‘C’ was not satisfied

The error message clearly indicates that S does not satisfy the constraints
associated with concept C, but does not explain that the reason constraint
satisfaction failed is because the expression t.i is ill-formed for an object t
of type S. 

When designing types intended to model a particular concept, it is often useful
to statically assert that the type models the intended concept.  Here too the
error messages are less helpful then desired:

$ cat t2.cpp
template
concept bool C = requires(T t) { t.i; };
struct S {
};
static_assert(C);

$ g++ -c -std=c++1z -fconcepts t2.cpp
t2.cpp:5:1: error: static assertion failed
 static_assert(C);
 ^

[Bug bootstrap/71816] [7 Regression] bootstrap broken on multiple targets

2016-07-11 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71816

--- Comment #17 from Richard Biener  ---
Author: rguenth
Date: Mon Jul 11 13:32:51 2016
New Revision: 238208

URL: https://gcc.gnu.org/viewcvs?rev=238208&root=gcc&view=rev
Log:
2016-07-11  Richard Biener  

PR tree-optimization/71816
* tree-ssa-pre.c (compute_avail): Adjust alignment of ref rather
than replacing all of its operands.

* gcc.dg/torture/pr71816.c: New testcase.

Added:
trunk/gcc/testsuite/gcc.dg/torture/pr71816.c
Modified:
trunk/gcc/ChangeLog
trunk/gcc/testsuite/ChangeLog
trunk/gcc/tree-ssa-pre.c

[Bug fortran/71838] ICE with OpenCoarrays on submodule

2016-07-11 Thread mexas at bristol dot ac.uk
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71838

--- Comment #4 from Anton Shterenlikht  ---
Yes, it's a library:
 https://sourceforge.net/p/cgpack/code/HEAD/tree/head/

I'll try to reduce the problem case to something smaller.

[Bug fortran/71839] undefined reference to `_gfortran_caf_stop_str'

2016-07-11 Thread mexas at bristol dot ac.uk
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71839

--- Comment #2 from Anton Shterenlikht  ---
https://sourceforge.net/p/cgpack/code/HEAD/tree/head/tests/testAAF.f90

One would need to build the library first:

https://sourceforge.net/p/cgpack/code/HEAD/tree/head/

I'll try to reduce the problem case.

[Bug c++/71843] [concepts] Diagnostics issued for constraint satisfaction failure fail to elucidate unsatisfied constraints

2016-07-11 Thread tom at honermann dot net
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71843

--- Comment #1 from Tom Honermann  ---
Created attachment 38876
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=38876&action=edit
Patch to elucidate failed constraints

The attached patch was provided to me by Andrew Sutton earlier this year and
applies cleanly to gcc 6 trunk (r238201).

The patch modifies the error messages emitted for constraint satisfaction
failures so that the specific constraints that were not satisfied will be
listed, up to a maximum of 7 constraints for each overload candidate.

Ideally, the number of constraints to list would be controlled by command line
options, but the patch does not currently provide such control.

Example diagnostics provided by this patch:

$ cat t.cpp
template
concept bool C = requires(T t) {
typename T::type;
t.i;
t.i2;
t.i3;
t.i4;
t.i5;
t.i6;
t.i7;
t.i8;
};
template
auto f(T t) {
return t.i;
}
struct S {
};
auto x = f(S{});

$ g++ -c -std=c++1z -fconcepts t.cpp
t.cpp:19:15: error: cannot call function ‘auto f(T) [with T = S]’
 auto x = f(S{});
   ^
t.cpp:14:6: note:   constraints not satisfied
 auto f(T t) {
  ^
t.cpp:14:6: note:   concept ‘C’ was not satisfied
t.cpp:2:14: note: within the concept template constexpr const bool
C [with T = S]
 concept bool C = requires(T t) {
  ^
t.cpp:2:14: note:   the required type ‘typename T::type’ would be ill-formed
t.cpp:2:14: note:   the required expression ‘t.i’ would be ill-formed
t.cpp:2:14: note:   the required expression ‘t.i2’ would be ill-formed
t.cpp:2:14: note:   the required expression ‘t.i3’ would be ill-formed
t.cpp:2:14: note:   the required expression ‘t.i4’ would be ill-formed
t.cpp:2:14: note:   the required expression ‘t.i5’ would be ill-formed
t.cpp:14:6: note: ... 2 constraint errors not shown
 auto f(T t) {
  ^

This patch does not affect the diagnostics produced for failed static
assertions of constraint satisfaction.  Ideally, those diagnostics would be
improved to list specific constraints as well.

[Bug c++/71784] [4.9/5/6/7 Regression] ICE on invalid code in push_access_scope, at cp/pt.c:229

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

Jakub Jelinek  changed:

   What|Removed |Added

   Keywords|ice-on-invalid-code |
 CC||jakub at gcc dot gnu.org,
   ||jason at gcc dot gnu.org
   Target Milestone|6.2 |4.9.4
Summary|[6/7 Regression] ICE on |[4.9/5/6/7 Regression] ICE
   |invalid code in |on invalid code in
   |push_access_scope, at   |push_access_scope, at
   |cp/pt.c:229 |cp/pt.c:229

--- Comment #11 from Jakub Jelinek  ---
template struct A {
  template
  void f(U const&) &;
  template
  void f(U const&) &&;
};
template
template
void A::f(U const& x) & {}
template
template
void A::f(U const& x) && {}
template class A;
template void A::f(int const&) &;
template void A::f(int const&) &&;
int main(){
  A a;
  a.f(2);
  A().f(1); 
}

ICEs starting with r198843, before it has been rejected (with -std=c++0x), and
indeed this (unlike your #c0) is accepted by clang++ 3.8.

[Bug c++/71774] [4.9/5/6/7 regression] Bogus "is protected" error when list-initializing a base class with a defaulted protected constructor and a virtual function

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

Jakub Jelinek  changed:

   What|Removed |Added

 CC||jakub at gcc dot gnu.org,
   ||jason at gcc dot gnu.org
   Target Milestone|5.5 |4.9.4
Summary|[5/6/7 regression] Bogus|[4.9/5/6/7 regression]
   |"is protected" error when   |Bogus "is protected" error
   |list-initializing a base|when list-initializing a
   |class with a defaulted  |base class with a defaulted
   |protected constructor and a |protected constructor and a
   |virtual function|virtual function

[Bug middle-end/71732] FAIL: gcc.dg/torture/pr71532.c at -O2 and above

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

--- Comment #8 from Jakub Jelinek  ---
Well, instead of if (RTL_CONST_OR_PURE_CALL_P (insn)) you should certainly use
else instead.  If you invalidate all memory already, there is no point to
invalidate the arguments, e.g. for looping const/pure fn call.

[Bug libgomp/71844] New: Data mapping of an array section in the target construct

2016-07-11 Thread ka6ash at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71844

Bug ID: 71844
   Summary: Data mapping of an array section in the target
construct
   Product: gcc
   Version: 7.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: libgomp
  Assignee: unassigned at gcc dot gnu.org
  Reporter: ka6ash at gmail dot com
CC: jakub at gcc dot gnu.org
  Target Milestone: ---

Hi,

the following code from OpenMP examples 4.0.2(Section 58.3) causes an execution
error. I suppose the problem is that the _target_ construct tries to map A[30]
instead of using A[0:4]. 

The testsuit for libgomp contains a similar testcase but it has an additional
_map_ clause for A:

libgomp/testsuite/libgomp.c/examples-4/array_sections-4.c

#pragma omp target map(p[7:20]) map(A[0:4])

*** Example code
void foo ()
{
  int A[30], *p;
  #pragma omp target data map(A[0:4])
{
  p = &A[0];
  #pragma omp target map(p[7:20])
{
  A[2] = 777;
  p[8] = 777;
}
}

  if (A[2] != 777 || A[8] != 777)
printf("FAIL\n");
}

*** Compilation flags
$ x86_64-pc-linux-gnu-gcc -O2 -fopenmp source.c

*** Error message
libgomp: Trying to map into device [0x7fff9538a420..0x7fff9538a498) object when
[0x7fff9538a420..0x7fff9538a430) is already mapped

*** GCC 
$x86_64-pc-linux-gnu-gcc -v
Using built-in specs.
COLLECT_GCC=/install/bin/x86_64-pc-linux-gnu-gcc
COLLECT_LTO_WRAPPER=/install/libexec/gcc/x86_64-pc-linux-gnu/7.0.0/lto-wrapper
OFFLOAD_TARGET_NAMES=x86_64-intelmicemul-linux-gnu
Target: x86_64-pc-linux-gnu
Configured with: ../configure --disable-multilib
--enable-languages=c,c++,fortran,lto --build=x86_64-pc-linux-gnu
--host=x86_64-pc-linux-gnu --target=x86_64-pc-linux-gnu
--enable-offload-targets=x86_64-intelmicemul-linux-gnu --disable-bootstrap
Thread model: posix
gcc version 7.0.0 20160711 (experimental) (GCC)

[Bug tree-optimization/71823] [6/7 Regression] g++ segfaults with -mfma and -ftree-slp-vectorize

2016-07-11 Thread nicolas.stinus at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71823

--- Comment #7 from Nicolas Stinus  ---
(In reply to Martin Liška from comment #1)
> Confirmed, it's ICE since GCC 6.1.x.

I am not sure it is only ICE-on-invalid-code.
In my initial source, it crashed on fma(b[i], b[i], a[i]).

Thanks anyway for confirming the issue!

[Bug middle-end/71732] FAIL: gcc.dg/torture/pr71532.c at -O2 and above

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

Jeffrey A. Law  changed:

   What|Removed |Added

 CC||law at redhat dot com

--- Comment #7 from Jeffrey A. Law  ---
The patch seems reasonable.  I assume you're going to officially submit it
after some further testing?

[Bug c++/71841] variadic template can't cast to base class

2016-07-11 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71841

Jonathan Wakely  changed:

   What|Removed |Added

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

--- Comment #1 from Jonathan Wakely  ---
Please provide a complete testcase and the other information requested by the
page you were asked to read when submitting: https://gcc.gnu.org/bugs

[Bug bootstrap/71816] [7 Regression] bootstrap broken on multiple targets

2016-07-11 Thread ro at CeBiTec dot Uni-Bielefeld.DE
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71816

--- Comment #18 from ro at CeBiTec dot Uni-Bielefeld.DE  ---
> --- Comment #14 from Richard Biener  ---
> Created attachment 38870
>   --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=38870&action=edit
> untested patch
>
> I am testing this patch, it was a bit optimistic to simply replace refs I
> guess.

FTR, sparc-sun-solaris2.12 bootstrap with this patch succeeded.

Thanks.
Rainer

[Bug c++/71784] [4.9/5/6/7 Regression] ICE on invalid code in push_access_scope, at cp/pt.c:229

2016-07-11 Thread mct_ancs at yahoo dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71784

--- Comment #12 from Ela  ---

 Example:

  When an usual member function is missing (say template class
 instantiated with extern), the compiler (4.9.3, 6.1) will complain
 in_clear about the missing function.

  When a ref-qual'ed one is missing it will show some mangle _Z-etc-etc
 as missing.

  If it's just the class templated, then letting the class instantiate
 its own functions => will work.

  If the function is nested templated, then it has to be explicitly 
 instantiated and again ICE.

[Bug target/71801] [7 Regression] ice in fix_debug_reg_uses

2016-07-11 Thread hjl at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71801

--- Comment #3 from hjl at gcc dot gnu.org  ---
Author: hjl
Date: Mon Jul 11 15:13:56 2016
New Revision: 238211

URL: https://gcc.gnu.org/viewcvs?rev=238211&root=gcc&view=rev
Log:
Don't convert TImode in debug insn

When converting V1TImode register in debug insn, check if it has been
converted to TImode already.

gcc/

PR target/71801
* config/i386/i386.c (timode_scalar_chain::fix_debug_reg_uses):
Don't convert TImode in debug insn.

gcc/testsuite/

PR target/71801
* gcc.target/i386/pr71801.c: New test.

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

[Bug target/71801] [7 Regression] ice in fix_debug_reg_uses

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

H.J. Lu  changed:

   What|Removed |Added

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

--- Comment #4 from H.J. Lu  ---
Fixed.

[Bug fortran/71838] ICE with OpenCoarrays on submodule

2016-07-11 Thread mexas at bristol dot ac.uk
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71838

--- Comment #5 from Anton Shterenlikht  ---
I reduced the case to 8 Fortran files:
http://eis.bris.ac.uk/~mexas/0.txz

Untar the file
cd zproblem
make

caf  -c -Wall -g -fbacktrace -fcheck-array-temporaries  cgca_m1co.f90
caf  -c -Wall -g -fbacktrace -fcheck-array-temporaries  cgca_m2gb.f90
caf  -c -Wall -g -fbacktrace -fcheck-array-temporaries  cgca_m2glm.f90
caf  -c -Wall -g -fbacktrace -fcheck-array-temporaries  cgca_m2hx.f90
caf  -c -Wall -g -fbacktrace -fcheck-array-temporaries  cgca_m2rot.f90
caf  -c -Wall -g -fbacktrace -fcheck-array-temporaries  cgca_m2rnd.f90
caf  -c -Wall -g -fbacktrace -fcheck-array-temporaries  cgca_m3clvg.f90
caf  -c -Wall -g -fbacktrace -fcheck-array-temporaries  m3clvg_sm3.f90
'
(null):0: confused by earlier errors, bailing out
make: *** [m3clvg_sm3.o] Error 1

[Bug tree-optimization/71518] [6 Regression] wrong code at -O3 on x86_64-linux-gnu in 64-bit mode (not in 32-bit mode)

2016-07-11 Thread ienkovich at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71518

--- Comment #4 from Ilya Enkovich  ---
Author: ienkovich
Date: Mon Jul 11 15:21:20 2016
New Revision: 238212

URL: https://gcc.gnu.org/viewcvs?rev=238212&root=gcc&view=rev
Log:
2016-07-11  Yuri Rumyantsev  

Backport from mainline r238055.
2016-07-06  Yuri Rumyantsev  

PR tree-optimization/71518
* tree-vect-data-refs.c (vect_compute_data_ref_alignment): Adjust
misalign also for outer loops with negative step.

gcc/testsuite/

2016-07-11  Yuri Rumyantsev  

Backport from mainline r238055.
2016-07-06  Yuri Rumyantsev  

PR tree-optimization/71518
* gcc.dg/pr71518.c: New test.

Added:
branches/gcc-6-branch/gcc/testsuite/gcc.dg/pr71518.c
Modified:
branches/gcc-6-branch/gcc/ChangeLog
branches/gcc-6-branch/gcc/testsuite/ChangeLog
branches/gcc-6-branch/gcc/tree-vect-data-refs.c

[Bug fortran/71838] ICE with OpenCoarrays on submodule

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

Dominique d'Humieres  changed:

   What|Removed |Added

 CC||pault at gcc dot gnu.org

--- Comment #6 from Dominique d'Humieres  ---
I get the ICE with the following trivial submodule

submodule ( cgca_m3clvg ) m3clvg_sm3

implicit none

contains

module procedure cgca_clvgp

end procedure cgca_clvgp

end submodule m3clvg_sm3

!-(

[Bug fortran/62125] Nested select type not accepted (rejects valid)

2016-07-11 Thread mrestelli at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=62125

--- Comment #5 from mrestelli  ---
I think the following patch could solve the problem:


Index: gcc/fortran/symbol.c
===
--- gcc/fortran/symbol.c(revision 238083)
+++ gcc/fortran/symbol.c(working copy)
@@ -2930,7 +2930,11 @@
   gfc_select_type_stack *stack = select_type_stack;
   for (; stack; stack = stack->prev)
 if ((*st)->n.sym == stack->selector && stack->tmp)
-  *st = stack->tmp;
+  {
+*st = stack->tmp;
+select_type_insert_tmp (st);
+return;
+  }
 }


The idea is that now a variable acting as selector in a SELECT TYPE is
"promoted" to a tmp variable only once; this change does it
recursively.

(I don't know whether this breaks anything, I don't know how to run
the regression tests myself)

[Bug target/69880] Linking Windows resource + implicit 'default-manifest.o' creates bad .exe

2016-07-11 Thread boris at kolpackov dot net
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69880

--- Comment #3 from Boris Kolpackov  ---
Ok, I've added support for embedding custom manifests in build2. The resulting
.exe's work as expected: custom manifest is used instead of (or in addition to)
the default one. However, with grep I can still see both manifests being
present in the executable (which seems to be the problem the original reporter
is experiencing).

ld --version
GNU ld (GNU Binutils) 2.25.1

I see this is not the latest generally, but it is the latest available from the
MSYS2 repositories. The last commit here says 2.26 is still no usable:

https://github.com/Alexpux/MSYS2-packages/tree/master/binutils

Does it still make sense to file a binutils bug report?

[Bug middle-end/71758] [7 Regression] ICE in verify_gimple_in_cfg, at tree-cfg.c:5212

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

Jakub Jelinek  changed:

   What|Removed |Added

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

--- Comment #5 from Jakub Jelinek  ---
Created attachment 38877
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=38877&action=edit
gcc7-pr71758.patch

Untested fix.

[Bug tree-optimization/71830] [7 Regression] gcc ICE at -O3 on valid code on x86_64-linux-gnu: verify_gimple failed

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

Markus Trippelsdorf  changed:

   What|Removed |Added

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

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

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

[Bug bootstrap/71816] [7 Regression] bootstrap broken on multiple targets

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

Markus Trippelsdorf  changed:

   What|Removed |Added

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

--- Comment #20 from Markus Trippelsdorf  ---
fixed.

[Bug bootstrap/71816] [7 Regression] bootstrap broken on multiple targets

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

Markus Trippelsdorf  changed:

   What|Removed |Added

 CC||helloqirun at gmail dot com

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

[Bug c++/71756] [5/6/7 Regression] internal compiler error: in ~saved_token_sentinel, at cp/parser.c:1228

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

Jakub Jelinek  changed:

   What|Removed |Added

 CC||jakub at gcc dot gnu.org,
   ||jason at gcc dot gnu.org
   Target Milestone|6.2 |5.5
Summary|[6/7 Regression] internal   |[5/6/7 Regression] internal
   |compiler error: in  |compiler error: in
   |~saved_token_sentinel, at   |~saved_token_sentinel, at
   |cp/parser.c:1228|cp/parser.c:1228

[Bug target/69880] Linking Windows resource + implicit 'default-manifest.o' creates bad .exe

2016-07-11 Thread nickc at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69880

--- Comment #4 from Nick Clifton  ---
(In reply to Boris Kolpackov from comment #3)

> I see this is not the latest generally, but it is the latest available from
> the MSYS2 repositories. The last commit here says 2.26 is still no usable:

It is a shame that the commit does not say why 2.26 is unusable.  A reference
to a bug report would be very helpful.

> https://github.com/Alexpux/MSYS2-packages/tree/master/binutils
> 
> Does it still make sense to file a binutils bug report?

Yes, if the resource merge code is putting "orphaned" code in between sections
then this is definitely a bug and I would like to fix it.  A test case would be
a real help as well.

[Bug c++/71756] [5/6/7 Regression] internal compiler error: in ~saved_token_sentinel, at cp/parser.c:1228

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

--- Comment #3 from Jakub Jelinek  ---
In
if (!cp_parser_error_occurred (parser)
&& cp_lexer_next_token_is (parser->lexer, CPP_OPEN_BRACE)
&& cp_parser_start_tentative_firewall (parser))
  start = token;
cp_parser_lambda_body (parser, lambda_expr);
cp_parser_error_occurred (parser)
is true (because cp_parser_identifier called during
cp_parser_lambda_introducer:
9886  capture_token = cp_lexer_peek_token (parser->lexer);
9887  capture_id = cp_parser_identifier (parser);
failed cp_parser_require), which means the tentative firewall is not added, but
the lambda body is parsed.  Dunno if the tentative firewall just shouldn't be
added in that case unconditionally, or if instead the lambda body shouldn't be
parsed and we should return earlier, ...

[Bug tree-optimization/71736] [7 Regression] ICE in verify_ssa

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

Jakub Jelinek  changed:

   What|Removed |Added

 CC||jakub at gcc dot gnu.org

--- Comment #6 from Jakub Jelinek  ---
Started with r235817.

[Bug c++/59832] [c++11] ICE in reshape_init_class with initializer list

2016-07-11 Thread gcc-bugzilla at zulan dot net
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=59832

gcc-bugzilla at zulan dot net changed:

   What|Removed |Added

 CC||gcc-bugzilla at zulan dot net

--- Comment #12 from gcc-bugzilla at zulan dot net ---
This shows the same error (tested with gcc 6.1.1):

#include

template
void foo(T bar) {
constexpr auto baz = std::array{{1}};
}

int main() {
foo(13);
}

[Bug c++/71173] [6/7 regression] Qualified name lookup

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

Jakub Jelinek  changed:

   What|Removed |Added

 CC||jakub at gcc dot gnu.org

--- Comment #5 from Jakub Jelinek  ---
Is this fixed now?

[Bug target/69880] Linking Windows resource + implicit 'default-manifest.o' creates bad .exe

2016-07-11 Thread vsz.bugzilla at emailuser dot net
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69880

--- Comment #5 from vsz.bugzilla at emailuser dot net ---
You may find a self-contained example under the GitHub link included in the
original report. Direct link:

https://github.com/Alexpux/MSYS2-packages/issues/454#issuecomment-186433276

(This reproduced the problem at the time of the post, using the then recent
MSYS2.)

[Bug c++/71173] [6/7 regression] Qualified name lookup

2016-07-11 Thread gcc-bugzilla at zulan dot net
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71173

--- Comment #6 from gcc-bugzilla at zulan dot net ---
As far as I can tell it is fixed. Tested with Archlinux "6.1.1" which seems to
be git/1bbd3999).

[Bug libgomp/71844] Data mapping of an array section in the target construct

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

Jakub Jelinek  changed:

   What|Removed |Added

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

--- Comment #1 from Jakub Jelinek  ---
This is invalid OpenMP.
As you are mentioning A in the target body, but not in its clauses, and as it
is not a scalar (new In OpenMP 4.5), it is implicitly map(tofrom:A).
And, as you mapped just a portion of the array earlier, and trying this
implicit
map of the whole array which also overlaps the explicit p[7:20] array section,
you are violating several restrictions, e.g. OpenMP 4.0:
- List items of map clauses in the same construct must not share original
storage.
- If any part of the original storage of a list item has corresponding storage
in the enclosing device data environment, all of the original storage must have
corresponding storage in the enclosing device data environment.

The first one that map(p[7:20]) and map(tofrom:A) share original storage, and
the second one that A[0:4] is already mapped, and you are mapping whole A.

The fix is simple, add map(A[0:4]) to omp target.  It really will not map
anything, just bump the reference counts, because it is already mapped, but
will avoid the implicit mapping of the whole A.

[Bug libgomp/71844] Data mapping of an array section in the target construct

2016-07-11 Thread amonakov at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71844

--- Comment #2 from Alexander Monakov  ---
Jakub, this code is taken verbatim from the openmp-examples document. Should we
report it at their github issue tracker? The example in their public git has
always been without the A[0:4] map on 'omp target' as quoted by Eugene.

GCC's testcase, on the other hand, had the map clause from day 1. This is a bit
strange; assuming GCC didn't change the example code when importing, it
suggests that the published openmp-examples text changed the example after GCC
imported an earlier version.

[Bug c++/70869] [6 Regression] internal compiler error: Segmentation fault on array of pointer to function members

2016-07-11 Thread jason at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70869

Jason Merrill  changed:

   What|Removed |Added

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

[Bug tree-optimization/60172] [4.9/5/6/7 Regression] ARM performance regression from trunk@207239

2016-07-11 Thread thopre01 at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=60172

Thomas Preud'homme  changed:

   What|Removed |Added

 CC||thopre01 at gcc dot gnu.org

--- Comment #29 from Thomas Preud'homme  ---
(In reply to Richard Biener from comment #28)
> For GCC 6 we now have a DCE right before RTL expansion so what's the status
> of this bug for GCC6/7?

The RTL expansion looks better with:


20: r127=r132<<0x2

21: r137=r125+r127
22: r126=r131+r137  // r126=r131+r125+r127

29: r140=r131+r125
30: r141=r140+r127  // r141=r131+r125+r127
31: r142=r141+1000
32: [r142+20]=r123

So there should be a clear CSE opportunity to replace r141 by r126. Yet this
does not happen at cse1. Beside, gimple before expand is different so I cannot
really confirmed that the changes at expand actually fixed the issue.

I think the ticket can be closed and we'll reopen it if needed.

Best regards,

Thomas

[Bug tree-optimization/71840] [7 Regression] internal compiler error: Segmentation fault in compute_avail

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

Marek Polacek  changed:

   What|Removed |Added

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

--- Comment #2 from Marek Polacek  ---
Ok, seems to be fixed in r238208.

[Bug fortran/71839] undefined reference to `_gfortran_caf_stop_str'

2016-07-11 Thread mexas at bristol dot ac.uk
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71839

--- Comment #3 from Anton Shterenlikht  ---
In the end I reduced the program to:

use cgca
if (.true.) stop
end

The problem seems to appear if I move the
static library from where it was built to another location.

E.g if I build my library, and the program, in some directory,
then all is fine:

$ ls libcgpack.a
libcgpack.a
$ caf -c z.f90 -I .
$ caf z.o -L . -lcgpack
$ ./a.out 
STOP 

However, if I move the library to another place, then I get this error:

$ cp libcgpack.a ~/lib/
$ caf z.o -L ~/lib/ -lcgpack
z.o: In function `MAIN__':
z.f90:(.text+0xf): undefined reference to `_gfortran_caf_stop_str'
collect2: error: ld returned 1 exit status

Does this look like a binutils problem?
Or am I making some mistake in creating the library?

  1   2   >