[Bug c++/81258] New: ICE on C++1z code with invalid decomposition declaration: in cp_finish_decl, at cp/decl.c:6760

2017-06-29 Thread su at cs dot ucdavis.edu
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81258

Bug ID: 81258
   Summary: ICE on C++1z code with invalid decomposition
declaration: in cp_finish_decl, at cp/decl.c:6760
   Product: gcc
   Version: unknown
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c++
  Assignee: unassigned at gcc dot gnu.org
  Reporter: su at cs dot ucdavis.edu
  Target Milestone: ---

$ 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/8.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 8.0.0 20170630 (experimental) [trunk revision 249826] (GCC)
$
$ g++-trunk -std=c++1z -c small.cpp
small.cpp:1:11: internal compiler error: in cp_finish_decl, at cp/decl.c:6760
 auto [x] ();
   ^
0x74535f cp_finish_decl(tree_node*, tree_node*, bool, tree_node*, int)
../../gcc-source-trunk/gcc/cp/decl.c:6760
0x80b221 cp_parser_decomposition_declaration
../../gcc-source-trunk/gcc/cp/parser.c:13203
0x80b221 cp_parser_simple_declaration
../../gcc-source-trunk/gcc/cp/parser.c:12869
0x80b831 cp_parser_block_declaration
../../gcc-source-trunk/gcc/cp/parser.c:12763
0x813a70 cp_parser_declaration
../../gcc-source-trunk/gcc/cp/parser.c:12660
0x812734 cp_parser_declaration_seq_opt
../../gcc-source-trunk/gcc/cp/parser.c:12536
0x812a78 cp_parser_translation_unit
../../gcc-source-trunk/gcc/cp/parser.c:4386
0x812a78 c_parse_file()
../../gcc-source-trunk/gcc/cp/parser.c:38636
0x959335 c_common_parse_file()
../../gcc-source-trunk/gcc/c-family/c-opts.c:1104
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See  for instructions.
$


--


auto [x] ();

[Bug c++/81257] New: ICE on invalid C++ template code: in make_typename_type, at cp/decl.c:3709

2017-06-29 Thread su at cs dot ucdavis.edu
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81257

Bug ID: 81257
   Summary: ICE on invalid C++ template code: in
make_typename_type, at cp/decl.c:3709
   Product: gcc
   Version: unknown
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c++
  Assignee: unassigned at gcc dot gnu.org
  Reporter: su at cs dot ucdavis.edu
  Target Milestone: ---

$ 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/8.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 8.0.0 20170630 (experimental) [trunk revision 249826] (GCC)
$
$ g++-trunk -c small.cpp
small.cpp:1:40: internal compiler error: in make_typename_type, at
cp/decl.c:3709
 template < typename ::template A < int > >;
^
0x752568 make_typename_type(tree_node*, tree_node*, tag_types, int)
../../gcc-source-trunk/gcc/cp/decl.c:3709
0x7fea55 cp_parser_elaborated_type_specifier
../../gcc-source-trunk/gcc/cp/parser.c:17534
0x7e9d57 cp_parser_type_specifier
../../gcc-source-trunk/gcc/cp/parser.c:16621
0x7fd7ef cp_parser_decl_specifier_seq
../../gcc-source-trunk/gcc/cp/parser.c:13494
0x7f61c5 cp_parser_parameter_declaration
../../gcc-source-trunk/gcc/cp/parser.c:21338
0x805516 cp_parser_template_parameter
../../gcc-source-trunk/gcc/cp/parser.c:15281
0x805516 cp_parser_template_parameter_list
../../gcc-source-trunk/gcc/cp/parser.c:14871
0x809671 cp_parser_explicit_template_declaration
../../gcc-source-trunk/gcc/cp/parser.c:26735
0x809671 cp_parser_template_declaration_after_export
../../gcc-source-trunk/gcc/cp/parser.c:26769
0x813b69 cp_parser_declaration
../../gcc-source-trunk/gcc/cp/parser.c:12609
0x812734 cp_parser_declaration_seq_opt
../../gcc-source-trunk/gcc/cp/parser.c:12536
0x812a78 cp_parser_translation_unit
../../gcc-source-trunk/gcc/cp/parser.c:4386
0x812a78 c_parse_file()
../../gcc-source-trunk/gcc/cp/parser.c:38636
0x959335 c_common_parse_file()
../../gcc-source-trunk/gcc/c-family/c-opts.c:1104
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See  for instructions.
$


--


template < typename ::template A < int > >;

[Bug c++/81250] C++ warnings about unused stl

2017-06-29 Thread msebor at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81250

Martin Sebor  changed:

   What|Removed |Added

 CC||msebor at gcc dot gnu.org

--- Comment #5 from Martin Sebor  ---
In simple cases a ctor only writes into the memory allocated for an object and
doesn't read any of it (after it's been written) I think it should be possible
to detect that none of the object's members is read before its dtor is invoked.
 This is difficult today because, in general, GCC doesn't know whether any
arbitrary function that takes its argument(s) by reference (or pointer) reads
or just writes them.  To tell which it is, GCC needs an annotation (e.g.,
something like attributes "in" and "out", or "write-only" and "read-only") to
mark such arguments.  With such an annotation, if all functions called on an
object between its ctor and dtor were marked write-only, GCC could issue a
warning that the object was not used.  It would be up to the programmer to
annotate each function (or member function).  I have been testing a solution
along these lines but it's not far enough along for me to say for certain that
it will work for std::string.  Even if it does, the -Wsystem-headers problem
will need to be solved for warnings from standard headers to be issued.

[Bug libstdc++/81256] basic_filebuf::close doesn't propagate exceptions

2017-06-29 Thread programmerjake at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81256

--- Comment #1 from programmerjake at gmail dot com ---
assuming this is fixed, basic_filebuf::~basic_filebuf will need to add a
try-catch to ignore exceptions thrown there instead of calling terminate
because it's noexcept.

[Bug libstdc++/81256] New: basic_filebuf::close doesn't propagate exceptions

2017-06-29 Thread programmerjake at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81256

Bug ID: 81256
   Summary: basic_filebuf::close doesn't propagate exceptions
   Product: gcc
   Version: 8.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: libstdc++
  Assignee: unassigned at gcc dot gnu.org
  Reporter: programmerjake at gmail dot com
  Target Milestone: ---

in line 247 of fstream.tcc, basic_filebuf::close ignores exceptions thrown by
_M_terminate_output. _M_terminate_output calls unshift on the codecvt facet
from the imbued locale. unshift might throw if using a custom codecvt facet.

the standard (N4659) says (30.9.2.3.7), referring to calling unshift and other
functions:
If one of these calls throws an exception,
the exception is caught and rethrown after closing the file.

[Bug middle-end/81172] Expected new warning option -Warray-bounds-pointer-arithmetic

2017-06-29 Thread ryxi at stu dot xidian.edu.cn
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81172

Xi Ruoyao  changed:

   What|Removed |Added

Summary|Improve -Warray-bounds for  |Expected new warning option
   |address arithmetic  |-Warray-bounds-pointer-arit
   ||hmetic

--- Comment #3 from Xi Ruoyao  ---
Make a new warning option as Clang does.

[Bug c++/81250] C++ warnings about unused stl

2017-06-29 Thread jg at jguk dot org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81250

--- Comment #4 from Jon Grant  ---
$ cppcheck --enable=all main.cpp
Checking main.cpp...
[main.cpp:12]: (style) Unused variable: unused_str
[main.cpp:17]: (style) Unused variable: unused_var
(information) Cppcheck cannot find all the include files (use --check-config
for details)

[Bug middle-end/81172] Improve -Warray-bounds for address arithmetic

2017-06-29 Thread ryxi at stu dot xidian.edu.cn
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81172

--- Comment #2 from Xi Ruoyao  ---
(In reply to Andrew Pinski from comment #1)
> The first one is well defined by C/C++.

[expr.add] para 4:

When an expression that has integral type is added to or subtracted
from a pointer, the result has the type of the pointer operand. If
the expression P points to element x[i] of an array object x with n
elements, the expressions P + J and J + P (where J has the value j)
point to the (possibly-hypothetical) element x[i + j] if 0 ≤ i + j ≤
n; otherwise, the behavior is undefined. Likewise, the expression P -
J points to the (possibly-hypothetical) element x[i − j] if 0 ≤ i
− j ≤ n; otherwise, the behavior is undefined.

[Bug c++/81250] C++ warnings about unused stl

2017-06-29 Thread jg at jguk dot org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81250

--- Comment #3 from Jon Grant  ---
Thank you for your replies. I can see why it is the way it is.
For the moment we can remove unused std::string via code reviews. Maybe it is
something better suited to a static analysis tool.
Jon

[Bug target/80510] Optimize Power7/power8 Altivec load/stores

2017-06-29 Thread meissner at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80510

--- Comment #9 from Michael Meissner  ---
Author: meissner
Date: Thu Jun 29 22:19:29 2017
New Revision: 249819

URL: https://gcc.gnu.org/viewcvs?rev=249819=gcc=rev
Log:
[gcc]
2017-06-29  Michael Meissner  

Backport from mainline
2017-06-23  Michael Meissner  

PR target/80510
* config/rs6000/rs6000.md (ALTIVEC_DFORM): Do not allow DImode in
32-bit, since indexed is not valid for DImode.
(mov_hardfloat32): Reorder ISA 2.07 load/stores before ISA
3.0 d-form load/stores to be the same as mov_hardfloat64.
(define_peephole2 for Altivec d-form load): Add 32-bit support.
(define_peephole2 for Altivec d-form store): Likewise.

Backport from mainline
2017-06-20  Michael Meissner  

PR target/79799
* config/rs6000/rs6000.c (rs6000_expand_vector_init): Add support
for doing vector set of SFmode on ISA 3.0.
* config/rs6000/vsx.md (vsx_set_v4sf_p9): Likewise.
(vsx_set_v4sf_p9_zero): Special case setting 0.0f to a V4SF
element.
(vsx_insert_extract_v4sf_p9): Add an optimization for inserting a
SFmode value into a V4SF variable that was extracted from another
V4SF variable without converting the element to double precision
and back to single precision vector format.
(vsx_insert_extract_v4sf_p9_2): Likewise.

[gcc/testsuite]
2017-06-29  Michael Meissner  

Backport from mainline
2017-06-23  Michael Meissner  

PR target/80510
* gcc.target/powerpc/pr80510-1.c: Allow test to run on 32-bit.
* gcc.target/powerpc/pr80510-2.c: Likewise.

Backport from mainline
2017-06-20  Michael Meissner  

PR target/79799
* gcc.target/powerpc/pr79799-1.c: New test.
* gcc.target/powerpc/pr79799-2.c: Likewise.
* gcc.target/powerpc/pr79799-3.c: Likewise.
* gcc.target/powerpc/pr79799-4.c: Likewise.
* gcc.target/powerpc/pr79799-5.c: Likewise.


Added:
branches/gcc-7-branch/gcc/testsuite/gcc.target/powerpc/pr79799-1.c
branches/gcc-7-branch/gcc/testsuite/gcc.target/powerpc/pr79799-2.c
branches/gcc-7-branch/gcc/testsuite/gcc.target/powerpc/pr79799-3.c
branches/gcc-7-branch/gcc/testsuite/gcc.target/powerpc/pr79799-4.c
branches/gcc-7-branch/gcc/testsuite/gcc.target/powerpc/pr79799-5.c
Modified:
branches/gcc-7-branch/gcc/ChangeLog
branches/gcc-7-branch/gcc/config/rs6000/rs6000.c
branches/gcc-7-branch/gcc/config/rs6000/rs6000.md
branches/gcc-7-branch/gcc/config/rs6000/vsx.md
branches/gcc-7-branch/gcc/testsuite/ChangeLog
branches/gcc-7-branch/gcc/testsuite/gcc.target/powerpc/pr80510-1.c
branches/gcc-7-branch/gcc/testsuite/gcc.target/powerpc/pr80510-2.c

[Bug target/79799] Improve vec_insert of float on Power9

2017-06-29 Thread meissner at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79799

--- Comment #3 from Michael Meissner  ---
Author: meissner
Date: Thu Jun 29 22:19:29 2017
New Revision: 249819

URL: https://gcc.gnu.org/viewcvs?rev=249819=gcc=rev
Log:
[gcc]
2017-06-29  Michael Meissner  

Backport from mainline
2017-06-23  Michael Meissner  

PR target/80510
* config/rs6000/rs6000.md (ALTIVEC_DFORM): Do not allow DImode in
32-bit, since indexed is not valid for DImode.
(mov_hardfloat32): Reorder ISA 2.07 load/stores before ISA
3.0 d-form load/stores to be the same as mov_hardfloat64.
(define_peephole2 for Altivec d-form load): Add 32-bit support.
(define_peephole2 for Altivec d-form store): Likewise.

Backport from mainline
2017-06-20  Michael Meissner  

PR target/79799
* config/rs6000/rs6000.c (rs6000_expand_vector_init): Add support
for doing vector set of SFmode on ISA 3.0.
* config/rs6000/vsx.md (vsx_set_v4sf_p9): Likewise.
(vsx_set_v4sf_p9_zero): Special case setting 0.0f to a V4SF
element.
(vsx_insert_extract_v4sf_p9): Add an optimization for inserting a
SFmode value into a V4SF variable that was extracted from another
V4SF variable without converting the element to double precision
and back to single precision vector format.
(vsx_insert_extract_v4sf_p9_2): Likewise.

[gcc/testsuite]
2017-06-29  Michael Meissner  

Backport from mainline
2017-06-23  Michael Meissner  

PR target/80510
* gcc.target/powerpc/pr80510-1.c: Allow test to run on 32-bit.
* gcc.target/powerpc/pr80510-2.c: Likewise.

Backport from mainline
2017-06-20  Michael Meissner  

PR target/79799
* gcc.target/powerpc/pr79799-1.c: New test.
* gcc.target/powerpc/pr79799-2.c: Likewise.
* gcc.target/powerpc/pr79799-3.c: Likewise.
* gcc.target/powerpc/pr79799-4.c: Likewise.
* gcc.target/powerpc/pr79799-5.c: Likewise.


Added:
branches/gcc-7-branch/gcc/testsuite/gcc.target/powerpc/pr79799-1.c
branches/gcc-7-branch/gcc/testsuite/gcc.target/powerpc/pr79799-2.c
branches/gcc-7-branch/gcc/testsuite/gcc.target/powerpc/pr79799-3.c
branches/gcc-7-branch/gcc/testsuite/gcc.target/powerpc/pr79799-4.c
branches/gcc-7-branch/gcc/testsuite/gcc.target/powerpc/pr79799-5.c
Modified:
branches/gcc-7-branch/gcc/ChangeLog
branches/gcc-7-branch/gcc/config/rs6000/rs6000.c
branches/gcc-7-branch/gcc/config/rs6000/rs6000.md
branches/gcc-7-branch/gcc/config/rs6000/vsx.md
branches/gcc-7-branch/gcc/testsuite/ChangeLog
branches/gcc-7-branch/gcc/testsuite/gcc.target/powerpc/pr80510-1.c
branches/gcc-7-branch/gcc/testsuite/gcc.target/powerpc/pr80510-2.c

[Bug c++/81180] [7/8 Regression] ICE with class template deduction in nested template class

2017-06-29 Thread jason at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81180

Jason Merrill  changed:

   What|Removed |Added

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

--- Comment #6 from Jason Merrill  ---
Fixed.

[Bug c++/81180] [7/8 Regression] ICE with class template deduction in nested template class

2017-06-29 Thread jason at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81180

--- Comment #5 from Jason Merrill  ---
Author: jason
Date: Thu Jun 29 21:32:20 2017
New Revision: 249817

URL: https://gcc.gnu.org/viewcvs?rev=249817=gcc=rev
Log:
PR c++/81180 - ICE with C++17 deduction of member class template.

* pt.c (build_deduction_guide): Correct member template handling.

Added:
branches/gcc-7-branch/gcc/testsuite/g++.dg/cpp1z/class-deduction40.C
Modified:
branches/gcc-7-branch/gcc/cp/ChangeLog
branches/gcc-7-branch/gcc/cp/pt.c

[Bug c++/81188] [7/8 Regression] decltype(this->member()) raises invalid prototype

2017-06-29 Thread jason at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81188

Jason Merrill  changed:

   What|Removed |Added

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

--- Comment #4 from Jason Merrill  ---
Fixed.

[Bug c++/81180] [7/8 Regression] ICE with class template deduction in nested template class

2017-06-29 Thread jason at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81180

--- Comment #4 from Jason Merrill  ---
Author: jason
Date: Thu Jun 29 21:13:43 2017
New Revision: 249816

URL: https://gcc.gnu.org/viewcvs?rev=249816=gcc=rev
Log:
PR c++/81180 - ICE with C++17 deduction of member class template.

* pt.c (build_deduction_guide): Correct member template handling.

Added:
trunk/gcc/testsuite/g++.dg/cpp1z/class-deduction40.C
Modified:
trunk/gcc/cp/ChangeLog
trunk/gcc/cp/pt.c

[Bug c++/81250] C++ warnings about unused stl

2017-06-29 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81250

--- Comment #2 from Jonathan Wakely  ---
Right, we intentionally don't warn for unused variables with non-trivial
destructors, because the destructor could be doing something useful (like
logging that a scope was exited, or committing a "transaction" of some kind
when leaving the scope). If the destructor does something then the object is
"used", because whether it exists or not has side effects.

[Bug bootstrap/81253] Flags -march and -mtune are ignored

2017-06-29 Thread pinskia at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81253

--- Comment #5 from Andrew Pinski  ---
This does sound like freebsd is not building GMP as a target generic enough.

[Bug bootstrap/81253] Flags -march and -mtune are ignored

2017-06-29 Thread kidon at posteo dot de
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81253

--- Comment #4 from Philipp  ---
I use the official FreeBSD port for building GCC 6:

http://www.freshports.org/lang/gcc6

The dependencies are resolved automatically. I did not recompile them with
altered flags (all libraries are build without additional CFLAGS).

The following options have been used for building GCC 6:

BOOTSTRAP=on (Build using a full bootstrap)
GRAPHITE=off (Support for Graphite loop optimizations)
JAVA=off (Java platform support)

The libraries are linked dynamically.

[Bug bootstrap/81253] Flags -march and -mtune are ignored

2017-06-29 Thread pinskia at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81253

Andrew Pinski  changed:

   What|Removed |Added

 Status|UNCONFIRMED |WAITING
   Last reconfirmed||2017-06-29
  Component|fortran |bootstrap
 Ever confirmed|0   |1

--- Comment #3 from Andrew Pinski  ---
Did you compile GMP/MPFR/libmpc yourself or they as part of the build?
Are they being linked statically?

[Bug tree-optimization/81245] [8 Regression] ICE building calculix with -Ofast

2017-06-29 Thread pinskia at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81245

Andrew Pinski  changed:

   What|Removed |Added

 CC||hjl.tools at gmail dot com

--- Comment #10 from Andrew Pinski  ---
*** Bug 81255 has been marked as a duplicate of this bug. ***

[Bug tree-optimization/81255] r249704 caused umat_single_crystal.f:19:6: internal compiler error: Segmentation fault

2017-06-29 Thread pinskia at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81255

Andrew Pinski  changed:

   What|Removed |Added

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

--- Comment #2 from Andrew Pinski  ---
Dup of bug 81245.  About to submit a patch which fixes this latent bug.

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

[Bug c++/81188] [7/8 Regression] decltype(this->member()) raises invalid prototype

2017-06-29 Thread jason at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81188

--- Comment #3 from Jason Merrill  ---
Author: jason
Date: Thu Jun 29 19:44:58 2017
New Revision: 249814

URL: https://gcc.gnu.org/viewcvs?rev=249814=gcc=rev
Log:
PR c++/81188 - matching decltype of member function call.

* tree.c (cp_tree_equal): Remove COMPONENT_REF special case.

Added:
branches/gcc-7-branch/gcc/testsuite/g++.dg/cpp0x/decltype-call4.C
Modified:
branches/gcc-7-branch/gcc/cp/ChangeLog
branches/gcc-7-branch/gcc/cp/tree.c

[Bug c++/81188] [7/8 Regression] decltype(this->member()) raises invalid prototype

2017-06-29 Thread jason at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81188

--- Comment #2 from Jason Merrill  ---
Author: jason
Date: Thu Jun 29 19:44:12 2017
New Revision: 249813

URL: https://gcc.gnu.org/viewcvs?rev=249813=gcc=rev
Log:
PR c++/81188 - matching decltype of member function call.

* tree.c (cp_tree_equal): Remove COMPONENT_REF special case.

Added:
trunk/gcc/testsuite/g++.dg/cpp0x/decltype-call4.C
Modified:
trunk/gcc/cp/ChangeLog
trunk/gcc/cp/tree.c

[Bug fortran/77765] ICE in gfc_match_oacc_routine, at fortran/openmp.c:1781

2017-06-29 Thread cesar at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77765

--- Comment #3 from cesar at gcc dot gnu.org ---
Author: cesar
Date: Thu Jun 29 19:07:10 2017
New Revision: 249810

URL: https://gcc.gnu.org/viewcvs?rev=249810=gcc=rev
Log:
Backport fix for PR fortran/77765

gcc/fortran/
* openmp.c (gfc_match_oacc_routine): Check if proc_name exist before
comparing the routine name against it.

gcc/testsuite/
* gfortran.dg/goacc/pr77765.f90: New test.

Added:
branches/gomp-4_0-branch/gcc/testsuite/gfortran.dg/goacc/pr77765.f90
Modified:
branches/gomp-4_0-branch/gcc/fortran/ChangeLog.gomp
branches/gomp-4_0-branch/gcc/fortran/openmp.c
branches/gomp-4_0-branch/gcc/testsuite/ChangeLog.gomp

[Bug tree-optimization/81255] r249704 caused umat_single_crystal.f:19:6: internal compiler error: Segmentation fault

2017-06-29 Thread hjl.tools at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81255

--- Comment #1 from H.J. Lu  ---
during GIMPLE pass: vect
umat_single_crystal.f: In function 'umat_single_crystal.constprop':
umat_single_crystal.f:19:6: internal compiler error: Segmentation fault
   subroutine umat_single_crystal(amat,iel,iint,kode,elconloc,eloc,
  ^
0xb5445f crash_signal
../../src-trunk/gcc/toplev.c:338
0x77b0c6 flow_bb_inside_loop_p(loop const*, basic_block_def const*)
../../src-trunk/gcc/cfgloop.c:794
0xd60c35 vect_stmt_relevant_p
../../src-trunk/gcc/tree-vect-stmts.c:326
0xd6169f vect_mark_stmts_to_be_vectorized(_loop_vec_info*)
../../src-trunk/gcc/tree-vect-stmts.c:664
0xd89cb9 vect_analyze_loop_2
../../src-trunk/gcc/tree-vect-loop.c:1944
0xd89cb9 vect_analyze_loop(loop*, _loop_vec_info*)
../../src-trunk/gcc/tree-vect-loop.c:2403
0xd9f397 vectorize_loops()
../../src-trunk/gcc/tree-vectorizer.c:614
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See  for instructions.
make[4]: *** [/tmp/cciw2A2l.ltrans22.ltrans.o] Error 1
lto-wrapper: fatal error: make returned 2 exit status
compilation terminated.
/usr/local/bin/ld: error: lto-wrapper failed
collect2: error: ld returned 1 exit status
specmake[3]: *** [calculix] Error 1

[Bug fortran/77765] ICE in gfc_match_oacc_routine, at fortran/openmp.c:1781

2017-06-29 Thread cesar at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77765

--- Comment #2 from cesar at gcc dot gnu.org ---
Author: cesar
Date: Thu Jun 29 19:03:43 2017
New Revision: 249809

URL: https://gcc.gnu.org/viewcvs?rev=249809=gcc=rev
Log:
PR fortran/77765

gcc/fortran/
* openmp.c (gfc_match_oacc_routine): Check if proc_name exist before
comparing the routine name against it.

gcc/testsuite/
* gfortran.dg/goacc/pr77765.f90: New test.

Added:
trunk/gcc/testsuite/gfortran.dg/goacc/pr77765.f90
Modified:
trunk/gcc/fortran/ChangeLog
trunk/gcc/fortran/openmp.c
trunk/gcc/testsuite/ChangeLog

[Bug target/80618] [8 regression] test case gcc.dg/pr50310-2.c fails with ICE starting with 247544

2017-06-29 Thread seurer at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80618

--- Comment #13 from seurer at gcc dot gnu.org ---
The fortran ones already have their own bugzilla: 
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80946

[Bug sanitizer/78532] [7 Regression] libsanitizer fails to build on sparc64-linux-gnu

2017-06-29 Thread ebotcazou at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78532

--- Comment #12 from Eric Botcazou  ---
Author: ebotcazou
Date: Thu Jun 29 18:57:47 2017
New Revision: 249808

URL: https://gcc.gnu.org/viewcvs?rev=249808=gcc=rev
Log:
Backport from mainline
2017-01-10  James Clarke  

PR sanitizer/78992
* sanitizer_common/sanitizer_platform_limits_posix.h
(struct __sanitizer_sigaction): Cherry-pick upstream r291561.

2016-11-30  Maxim Ostapenko  

PR sanitizer/78532
* sanitizer_common/sanitizer_platform_limits_posix.h
(__sanitizer_sigaction): Adjust for sparc targets and various Glibc
versions.

Modified:
branches/gcc-5-branch/libsanitizer/ChangeLog
   
branches/gcc-5-branch/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.h

[Bug sanitizer/78992] Incorrect sigaction definition on 32-bit sparc

2017-06-29 Thread ebotcazou at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78992

--- Comment #4 from Eric Botcazou  ---
Author: ebotcazou
Date: Thu Jun 29 18:57:47 2017
New Revision: 249808

URL: https://gcc.gnu.org/viewcvs?rev=249808=gcc=rev
Log:
Backport from mainline
2017-01-10  James Clarke  

PR sanitizer/78992
* sanitizer_common/sanitizer_platform_limits_posix.h
(struct __sanitizer_sigaction): Cherry-pick upstream r291561.

2016-11-30  Maxim Ostapenko  

PR sanitizer/78532
* sanitizer_common/sanitizer_platform_limits_posix.h
(__sanitizer_sigaction): Adjust for sparc targets and various Glibc
versions.

Modified:
branches/gcc-5-branch/libsanitizer/ChangeLog
   
branches/gcc-5-branch/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.h

[Bug tree-optimization/81255] New: r249704 caused umat_single_crystal.f:19:6: internal compiler error: Segmentation fault

2017-06-29 Thread hjl.tools at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81255

Bug ID: 81255
   Summary: r249704 caused umat_single_crystal.f:19:6: internal
compiler error: Segmentation fault
   Product: gcc
   Version: 8.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: tree-optimization
  Assignee: unassigned at gcc dot gnu.org
  Reporter: hjl.tools at gmail dot com
CC: pinskia at gcc dot gnu.org
  Target Milestone: ---
Target: x86-64

On x86-64, r249704 caused

gfortran  -O3 -funroll-loops -ffast-math -fwhole-program -flto=jobserver
-fuse-linker-plugin  -DSPEC_CPU_LP64CalculiX.o add_pr.o add_sm_ei.o
add_sm_st.o allocation.o amplitudes.o anisotropic.o beamsections.o bounadd.o
boundaries.o buckles.o calinput.o cfluxes.o changedepterm.o cloads.o
conductivities.o controlss.o couptempdisps.o creeps.o cychards.o cycsymmods.o
dasol.o datest.o datri.o defplasticities.o defplas.o densities.o depvars.o
deuldlag.o dfluxes.o dgesv.o diamtr.o dloads.o dot.o dredu.o dsort.o dynamics.o
dynsolv.o el.o elastics.o elements.o elprints.o envtemp.o equations.o
expansions.o extrapolate.o e_c3d.o e_c3d_th.o e_c3d_rhs.o fcrit.o films.o
finpro.o forcadd.o frd.fppized.o frdclose.o frequencies.o fsub.o fsuper.o
gen3delem.o genran.o getnewline.o graph.o headings.o heattransfers.o hyperel.o
hyperelastics.o hyperfoams.o ident.o ident2.o include.o incplas.o
initialconditions.o inputerror.o isorti.o isortid.o isortidc.o isortii.o
isortiid.o label.o linel.o lintemp.o lintemp_th.o loadadd.o loadaddt.o
mafillpr.o mafillsm.o mafillsmcs.o massflowrates.o matdata_co.o matdata_he.o
matdata_tg.o materialdata.o materials.o modaldampings.o modaldynamics.o mpcs.o
nident.o nident2.o near2d.o noanalysis.o nodalthicknesses.o nodeprints.o
nodes.o noelfiles.o noelsets.o nonlinmpc.o normals.o norshell.o number.o onf.o
op.o openfile.o orientations.o orthonl.o orthotropic.o out.o parser.o
physicalconstants.o planempc.o plastics.o plcopy.o plinterpol.o plmix.o
polynom.o profil.o radflowload.o radiates.o ranewr.o rearrange.o rectcyl.o
renumber.o restartread.o restarts.o restartshort.o restartwrite.o results.o
rhs.o rigidbodies.o rigidmpc.o rootls.o rubber.o saxpb.o selcycsymmods.o
shape3tri.o shape4q.o shape4tet.o shape6tri.o shape6w.o shape8h.o shape8q.o
shape10tet.o shape15w.o shape20h.o shellsections.o skip.o solidsections.o
spcmatch.o specificheats.o statics.o steps.o stiff2mat.o stop.o str2mat.o
straightmpc.o surfaces.o temperatures.o tempload.o ties.o transformatrix.o
transforms.o ucreep.o uhardening.o umat.o umat_aniso_creep.o umat_aniso_plas.o
umat_elastic_fiber.o umat_ideal_gas.o umat_lin_iso_el.o umat_single_crystal.o
umat_tension_only.o umat_user.o umpc_mean_rot.o umpc_user.o usermaterials.o
usermpc.o viscos.o wcoef.o writebv.o writeev.o writeevcs.o writempc.o
writesummary.o cascade.o frdcyc.o insert.o mastruct.o mastructcs.o nonlingeo.o
pcgsolver.o preiter.o prespooles.o profile.o remastruct.o spooles.o strcmp1.o
strcpy1.o u_calloc.o SPOOLES/A2/src/A2_IO.o SPOOLES/A2/src/A2_basics.o
SPOOLES/A2/src/A2_init.o SPOOLES/A2/src/A2_instance.o SPOOLES/A2/src/A2_norms.o
SPOOLES/A2/src/A2_sort.o SPOOLES/A2/src/A2_util.o SPOOLES/BKL/src/BKL_basics.o
SPOOLES/BKL/src/BKL_evalfcn.o SPOOLES/BKL/src/BKL_exhSearch.o
SPOOLES/BKL/src/BKL_fidmat.o SPOOLES/BKL/src/BKL_init.o
SPOOLES/BKL/src/BKL_util.o SPOOLES/BPG/src/BPG_IO.o
SPOOLES/BPG/src/BPG_basics.o SPOOLES/BPG/src/BPG_init.o
SPOOLES/BPG/src/BPG_makeGraphs.o SPOOLES/BPG/src/BPG_pseudo.o
SPOOLES/Chv/src/Chv_IO.o SPOOLES/Chv/src/Chv_assemble.o
SPOOLES/Chv/src/Chv_basics.o SPOOLES/Chv/src/Chv_copy.o
SPOOLES/Chv/src/Chv_factor.o SPOOLES/Chv/src/Chv_findPivot.o
SPOOLES/Chv/src/Chv_init.o SPOOLES/Chv/src/Chv_instance.o
SPOOLES/Chv/src/Chv_search.o SPOOLES/Chv/src/Chv_swap.o
SPOOLES/Chv/src/Chv_update.o SPOOLES/Chv/src/Chv_util.o
SPOOLES/ChvList/src/ChvList_basics.o SPOOLES/ChvList/src/ChvList_init.o
SPOOLES/ChvList/src/ChvList_util.o SPOOLES/ChvManager/src/ChvManager_basics.o
SPOOLES/ChvManager/src/ChvManager_init.o
SPOOLES/ChvManager/src/ChvManager_util.o SPOOLES/DSTree/src/DSTree_basics.o
SPOOLES/DSTree/src/DSTree_init.o SPOOLES/DSTree/src/DSTree_instance.o
SPOOLES/DSTree/src/DSTree_stages.o SPOOLES/DSTree/src/DSTree_util.o
SPOOLES/DV/src/DV_IO.o SPOOLES/DV/src/DV_basics.o SPOOLES/DV/src/DV_init.o
SPOOLES/DV/src/DV_instance.o SPOOLES/DV/src/DV_util.o
SPOOLES/DenseMtx/src/DenseMtx_IO.o SPOOLES/DenseMtx/src/DenseMtx_basics.o
SPOOLES/DenseMtx/src/DenseMtx_init.o SPOOLES/DenseMtx/src/DenseMtx_instance.o
SPOOLES/DenseMtx/src/DenseMtx_permute.o SPOOLES/DenseMtx/src/DenseMtx_util.o
SPOOLES/Drand/src/Drand_basics.o SPOOLES/Drand/src/Drand_init.o
SPOOLES/Drand/src/Drand_util.o SPOOLES/ETree/src/ETree_IO.o
SPOOLES/ETree/src/ETree_basics.o SPOOLES/ETree/src/ETree_compress.o
SPOOLES/ETree/src/ETree_init.o SPOOLES/ETree/src/ETree_instance.o
SPOOLES/ETree/src/ETree_permute.o 

[Bug c++/81252] ICE on valid C++ code: in pop_local_binding, at cp/name-lookup.c:1404

2017-06-29 Thread marxin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81252

Martin Liška  changed:

   What|Removed |Added

   Keywords||ice-on-valid-code
 Status|UNCONFIRMED |NEW
   Last reconfirmed||2017-06-29
 CC||marxin at gcc dot gnu.org
 Ever confirmed|0   |1

--- Comment #1 from Martin Liška  ---
Confirmed, even 4.5.0 fails.

[Bug c++/81229] [8 Regression] ICE in c_tree_chain_next on aarch64

2017-06-29 Thread nathan at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81229

--- Comment #5 from Nathan Sidwell  ---
Reproduced on x86_64-linux native.

[Bug sanitizer/78532] [7 Regression] libsanitizer fails to build on sparc64-linux-gnu

2017-06-29 Thread ebotcazou at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78532

--- Comment #11 from Eric Botcazou  ---
Author: ebotcazou
Date: Thu Jun 29 18:26:45 2017
New Revision: 249807

URL: https://gcc.gnu.org/viewcvs?rev=249807=gcc=rev
Log:
Backport from mainline
2017-01-10  James Clarke  

PR sanitizer/78992
* sanitizer_common/sanitizer_platform_limits_posix.h
(struct __sanitizer_sigaction): Cherry-pick upstream r291561.

2016-11-30  Maxim Ostapenko  

PR sanitizer/78532
* sanitizer_common/sanitizer_platform_limits_posix.h
(__sanitizer_sigaction): Adjust for sparc targets and various Glibc
versions.

Modified:
branches/gcc-6-branch/libsanitizer/ChangeLog
   
branches/gcc-6-branch/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.h

[Bug sanitizer/78992] Incorrect sigaction definition on 32-bit sparc

2017-06-29 Thread ebotcazou at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78992

--- Comment #3 from Eric Botcazou  ---
Author: ebotcazou
Date: Thu Jun 29 18:26:45 2017
New Revision: 249807

URL: https://gcc.gnu.org/viewcvs?rev=249807=gcc=rev
Log:
Backport from mainline
2017-01-10  James Clarke  

PR sanitizer/78992
* sanitizer_common/sanitizer_platform_limits_posix.h
(struct __sanitizer_sigaction): Cherry-pick upstream r291561.

2016-11-30  Maxim Ostapenko  

PR sanitizer/78532
* sanitizer_common/sanitizer_platform_limits_posix.h
(__sanitizer_sigaction): Adjust for sparc targets and various Glibc
versions.

Modified:
branches/gcc-6-branch/libsanitizer/ChangeLog
   
branches/gcc-6-branch/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.h

[Bug c++/81014] [7 Regression] ICE in make_decl_rtl, at varasm.c:1311

2017-06-29 Thread marxin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81014

Martin Liška  changed:

   What|Removed |Added

 Status|WAITING |RESOLVED
  Known to work||6.3.0, 8.0
 Resolution|--- |FIXED
Summary|internal compiler error: in |[7 Regression] ICE in
   |make_decl_rtl, at   |make_decl_rtl, at
   |varasm.c:1311   |varasm.c:1311
  Known to fail||7.1.0

--- Comment #4 from Martin Liška  ---
Confirmed, good reduction job!

So started with r245945.
And disappeared on trunk in r249376.

The patch is applied to GCC 7.x branch, thus closing as resolved.

[Bug c++/81247] [8 Regression] ICE on invalid C++ code with malformed namespace declaration: in do_push_nested_namespace, at cp/name-lookup.c:6002

2017-06-29 Thread nathan at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81247

Nathan Sidwell  changed:

   What|Removed |Added

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

--- Comment #3 from Nathan Sidwell  ---
Fixed r249804.

[Bug c++/81247] [8 Regression] ICE on invalid C++ code with malformed namespace declaration: in do_push_nested_namespace, at cp/name-lookup.c:6002

2017-06-29 Thread nathan at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81247

--- Comment #2 from Nathan Sidwell  ---
Author: nathan
Date: Thu Jun 29 18:20:13 2017
New Revision: 249804

URL: https://gcc.gnu.org/viewcvs?rev=249804=gcc=rev
Log:
PR c++/81247
* parser.c (cp_parser_namespace_definition): Immediately close the
namespace if there's no open-brace.
* name-lookup.c (do_pushdecl): Reset OLD when pushing into new
namespace.

Added:
trunk/gcc/testsuite/g++.dg/parse/pr81247-a.C
trunk/gcc/testsuite/g++.dg/parse/pr81247-b.C
trunk/gcc/testsuite/g++.dg/parse/pr81247-c.C
Modified:
trunk/gcc/cp/ChangeLog
trunk/gcc/cp/name-lookup.c
trunk/gcc/cp/parser.c
trunk/gcc/testsuite/ChangeLog

[Bug c++/81180] [7/8 Regression] ICE with class template deduction in nested template class

2017-06-29 Thread jason at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81180

Jason Merrill  changed:

   What|Removed |Added

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

[Bug debug/81254] New: DWARF debug info for inlined lexical blocks missing range

2017-06-29 Thread zfigura at codeweavers dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81254

Bug ID: 81254
   Summary: DWARF debug info for inlined lexical blocks missing
range
   Product: gcc
   Version: 7.1.1
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: debug
  Assignee: unassigned at gcc dot gnu.org
  Reporter: zfigura at codeweavers dot com
  Target Milestone: ---

Created attachment 41652
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=41652=edit
example program

An inlined function which contains a lexical block (which in turn contains a
variable) generates DW_TAG_lexical_block both in the outer and inner function,
however, the range tags (i.e. DW_AT_low_pc and DW_AT_high_pc) are only
generated for the outer function. Is this valid behaviour? It confuses some
debuggers, which expect range information when reading DW_TAG_lexical_block and
don't get it.

Could be related to https://gcc.gnu.org/bugzilla/show_bug.cgi?id=51902

[Bug fortran/81253] Flags -march and -mtune are ignored

2017-06-29 Thread kidon at posteo dot de
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81253

--- Comment #2 from Philipp  ---
Adding BOOT_CXXFLAGS doesn't help. The same error occurs.

[Bug tree-optimization/81245] [8 Regression] ICE building calculix with -Ofast

2017-06-29 Thread pinskia at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81245

--- Comment #9 from Andrew Pinski  ---
(In reply to Richard Biener from comment #5)
> Actually
> 
>if (fold_stmt (...))
>  update_stmt (gsi_stmt (new_gsi));
> 
> is correct ;)  The old update_stmt was redundant (gsi_insert_before updates
> the stmt already).  fold_stmt may replace the stmt so with your fix you
> might just end up updating a stale one...

Yes, I agree and in fact my testing showed my patch did not work, I am testing
a new patch:
Index: tree-if-conv.c
===
--- tree-if-conv.c  (revision 249769)
+++ tree-if-conv.c  (working copy)
@@ -1853,7 +1853,8 @@
   new_stmt = gimple_build_assign (res, rhs);
   gsi_insert_before (gsi, new_stmt, GSI_SAME_STMT);
   gimple_stmt_iterator new_gsi = gsi_for_stmt (new_stmt);
-  fold_stmt (_gsi, ifcvt_follow_ssa_use_edges);
+  if (fold_stmt (_gsi, ifcvt_follow_ssa_use_edges))
+   new_stmt = gsi_stmt (new_gsi);
   update_stmt (new_stmt);

   if (dump_file && (dump_flags & TDF_DETAILS))
 CUT 
This is so the print below has the correct statement when printing.

[Bug c++/81250] C++ warnings about unused stl

2017-06-29 Thread daniel.kruegler at googlemail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81250

Daniel Krügler  changed:

   What|Removed |Added

 CC||daniel.kruegler@googlemail.
   ||com

--- Comment #1 from Daniel Krügler  ---
The technical reason for that is that according to the language neither all
constructors nor the destructor of std::string are trivial special members. I
think the request as indicated by the title ("unused STL") should be withdrawn,
since there are obvious type (combinations) of the Standard Library that really
should be considered as used just if they are constructed or destructed, such
as std::tuple when SideEffects is a user-defined type whose
construction or destruction has side effects. Another example where a seemingly
"unused" object could exist for some purpose are smart pointers like
shared_ptr, weak_ptr, or unique_ptr, which might be constructed simplify to
define a scope where a contained object exists. Another candidate of an
"unused" object where you really don't want be nagged about is any of the lock
templates, and there are presumably a lot others. When considering to enable
such a warning for selected types, the hard question is: Where do we stop? Is
that a request that will never end? Today std::string, tomorrow ??

[Bug c++/81164] [7/8 Regression] ICE in inherited_ctor_binfo_1 when using virtual inheritance

2017-06-29 Thread jason at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81164

Jason Merrill  changed:

   What|Removed |Added

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

--- Comment #4 from Jason Merrill  ---
Fixed.

[Bug target/80556] [8 Regression] bootstrap failure for Ada compiler

2017-06-29 Thread simon at pushface dot org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80556

--- Comment #43 from simon at pushface dot org ---
Created attachment 41651
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=41651=edit
Patch to gcc/config/darwin.h

Following up on a comment from Jeff Law on gcc-patches@, I replied as
follows (it didn't appear on the archive, so I've re-sent)

> I'm a bit confused here.  Isn't -lSystem included in darwin's
> LIB_SPEC in which case the right things ought to already be
> happening, shouldn't it?

The specs that involve -lSystem are

*link_gcc_c_sequence:
%:version-compare(>= 10.6 mmacosx-version-min= -no_compact_unwind)   
%{!static:%{!static-libgcc:   %:version-compare(>= 10.6
mmacosx-version-min= -lSystem) } }   
%{fno-pic|fno-PIC|fno-pie|fno-PIE|fapple-kext|mkernel|static|mdynamic-no-pic:  
%:version-compare(>= 10.7 mmacosx-version-min= -no_pie) } %G %L

*lib:
%{!static:-lSystem}

but I also see

*libgcc:
%{static-libgcc|static: -lgcc_eh -lgcc; 

which might be the root of the problem?

In comment 39, I report that

   $ gnatmake raiser -largs -static-libgcc -static-libstdc++

resulted in the link command

   /usr/bin/ld -dynamic -arch x86_64 -macosx_version_min 10.12.0
   -weak_reference_mismatches non-weak -o raiser -L./
   -L/opt/gcc-7.1.0/lib/gcc/x86_64-apple-darwin15/7.1.0/adalib/
   -L/opt/gcc-7.1.0/lib/gcc/x86_64-apple-darwin15/7.1.0
   -L/opt/gcc-7.1.0/lib/gcc/x86_64-apple-darwin15/7.1.0/../../.. b~raiser.o
   ./raiser.o -v
   /opt/gcc-7.1.0/lib/gcc/x86_64-apple-darwin15/7.1.0/adalib/libgnat.a
   -no_compact_unwind -lgcc_eh -lgcc -lSystem

i.e. -lSystem is *after* -lgcc, so that its exception handling won't
be invoked.

I don't know what -lgcc_eh does, but my patch would be pretty much
equivalent to changing the libgcc spec above to

*libgcc:
%{static-libgcc|static: -lSystem -lgcc_eh -lgcc; 

and if that would be OK it would obviously be much better.

I've rebuilt gcc-8-20170528 with this, successfully; the last line of
the raiser.adb link command above becomes

   -no_compact_unwind -lSystem -lgcc_eh -lgcc -lSystem

and the exception is properly handled.

Patch attached.

[Bug c++/81164] [7/8 Regression] ICE in inherited_ctor_binfo_1 when using virtual inheritance

2017-06-29 Thread jason at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81164

--- Comment #3 from Jason Merrill  ---
Author: jason
Date: Thu Jun 29 16:46:29 2017
New Revision: 249801

URL: https://gcc.gnu.org/viewcvs?rev=249801=gcc=rev
Log:
PR c++/81164 - ICE with invalid inherited constructor.

* search.c (binfo_direct_p): New.
* name-lookup.c (do_class_using_decl): Use it.

Added:
branches/gcc-7-branch/gcc/testsuite/g++.dg/cpp0x/inh-ctor28.C
Modified:
branches/gcc-7-branch/gcc/cp/ChangeLog
branches/gcc-7-branch/gcc/cp/cp-tree.h
branches/gcc-7-branch/gcc/cp/name-lookup.c
branches/gcc-7-branch/gcc/cp/search.c

[Bug fortran/81253] Flags -march and -mtune are ignored

2017-06-29 Thread pinskia at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81253

--- Comment #1 from Andrew Pinski  ---
BOOT_CFLAGS and BOOT_CXXFLAGS .

[Bug fortran/81253] New: Flags -march and -mtune are ignored

2017-06-29 Thread kidon at posteo dot de
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81253

Bug ID: 81253
   Summary: Flags -march and -mtune are ignored
   Product: gcc
   Version: 6.3.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: fortran
  Assignee: unassigned at gcc dot gnu.org
  Reporter: kidon at posteo dot de
  Target Milestone: ---

I have built GCC 6.3.0 on a Intel Broadwell machine with FreeBSD 11. The binary
package of GCC is used on different client machines (each != Broadwell). Trying
to compile arbitrary Fortran code with GNU Fortran results in an internal
compiler error:

$ gfortran6 test.f08 -o test
: internal compiler error: Illegal instruction

It seems that Broadwell-specific instructions are compiled into GNU Fortran
even if additional flags to prevend this are set:

CFLAGS="-march=x86-64 -mtune=generic"
MAKE_ENV+= BOOT_CFLAGS="-march=x86-64 -mtune=generic"
CONFIGURE_ENV+= BOOT_CFLAGS="-march=x86-64 -mtune=generic"

These flags are ignored after stage 3 of the build process. The same behaviour
can be seen when building GCC 4.9/5.4/7.0.

[Bug c++/81229] [8 Regression] ICE in c_tree_chain_next on aarch64

2017-06-29 Thread nathan at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81229

Nathan Sidwell  changed:

   What|Removed |Added

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

[Bug c++/81229] [8 Regression] ICE in c_tree_chain_next on aarch64

2017-06-29 Thread rearnsha at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81229

Richard Earnshaw  changed:

   What|Removed |Added

 CC||nathan at acm dot org

--- Comment #4 from Richard Earnshaw  ---
Which was one of Nathan's patches

[Bug c++/81164] [7/8 Regression] ICE in inherited_ctor_binfo_1 when using virtual inheritance

2017-06-29 Thread jason at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81164

--- Comment #2 from Jason Merrill  ---
Author: jason
Date: Thu Jun 29 15:30:11 2017
New Revision: 249797

URL: https://gcc.gnu.org/viewcvs?rev=249797=gcc=rev
Log:
PR c++/81164 - ICE with invalid inherited constructor.

* search.c (binfo_direct_p): New.
* name-lookup.c (do_class_using_decl): Use it.

Added:
trunk/gcc/testsuite/g++.dg/cpp0x/inh-ctor28.C
Modified:
trunk/gcc/cp/ChangeLog
trunk/gcc/cp/cp-tree.h
trunk/gcc/cp/name-lookup.c
trunk/gcc/cp/search.c

[Bug c++/81014] internal compiler error: in make_decl_rtl, at varasm.c:1311

2017-06-29 Thread rain.backnet at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81014

--- Comment #3 from SlowRiot  ---
On further deep contemplation, the sqrt was a red herring.  The minimal
testcase is just:

// Crash: g++-7 -fsanitize=float-divide-by-zero -c crash_test.cpp
// internal compiler error: in make_decl_rtl, at varasm.c:1311

class foo {
public:
  foo() {
long double value = 1234;
value = 4321 / value;
// the numbers are arbitrary, bug occurs with any values
  }
};

foo bar;

[Bug fortran/81241] write end of file

2017-06-29 Thread dominiq at lps dot ens.fr
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81241

Dominique d'Humieres  changed:

   What|Removed |Added

 Status|WAITING |RESOLVED
 Resolution|--- |DUPLICATE

--- Comment #7 from Dominique d'Humieres  ---


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

[Bug libfortran/81195] SPEC CPU2017 621.wrf_s failure with 40+ openmp threads

2017-06-29 Thread dominiq at lps dot ens.fr
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81195

Dominique d'Humieres  changed:

   What|Removed |Added

 CC||townsend at astro dot wisc.edu

--- Comment #12 from Dominique d'Humieres  ---
*** Bug 81241 has been marked as a duplicate of this bug. ***

[Bug c++/81014] internal compiler error: in make_decl_rtl, at varasm.c:1311

2017-06-29 Thread rain.backnet at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81014

--- Comment #2 from SlowRiot  ---
Alright, this is the moment.  I have journeyed deep into the mountains and
meditated long on the problem.  I finally managed, after many years of
dedicated effort, to reduce our ~200MB codebase to an isolated example, and
then spent many more years carving down a ~10k LOC minimal example to the
polished, shining gem of a testcase you see below.  Reproducible everywhere on
GCC7 on Linux, this does not cause a problem on GCC6.


// Crash: g++-7 -fsanitize=float-divide-by-zero -c crash_test.cpp
// internal compiler error: in make_decl_rtl, at varasm.c:1311

#include 

class foo {
public:
  foo() {
long double root = std::sqrt(1234);
root = 4321 / root;
// the numbers are arbitrary, bug occurs with any values
  }
};

foo bar;

[Bug c++/81164] [7/8 Regression] ICE in inherited_ctor_binfo_1 when using virtual inheritance

2017-06-29 Thread jason at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81164

Jason Merrill  changed:

   What|Removed |Added

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

[Bug tree-optimization/81192] [8 Regression] gcc ICE at -Os on x86_64-linux-gnu: Segmentation fault

2017-06-29 Thread vries at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81192

Tom de Vries  changed:

   What|Removed |Added

  Attachment #41637|0   |1
is obsolete||

--- Comment #8 from Tom de Vries  ---
Created attachment 41650
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=41650=edit
tentative patch to stop bbs from different loop levels to merge

Updated patch.

[Bug tree-optimization/81192] [8 Regression] gcc ICE at -Os on x86_64-linux-gnu: Segmentation fault

2017-06-29 Thread vries at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81192

--- Comment #7 from Tom de Vries  ---
I used dotfn (based on dot-fn in gdbhooks.py):
...
void
dotfn (const char *name)
{
  FILE *fp = fopen (name, "w");
  if (fp == NULL)
return;

  start_graph_dump (fp, "");
  print_graph_cfg (fp, cfun, dump_flags);
  end_graph_dump (fp);
  fclose (fp);
}
...
to debug this test-case and found that the sigsegv goes away when I use dotfn
before init_worklist.  

As it turns out, draw_cfg_edges calls mark_dfs_back_edges, which sets
EDGE_DFS_BACK for bb4 -> bb5. Consequently, the outgoing edges of bb4 and bb6
don't have the same flags any more, and tail-merge bails out.

[Bug fortran/81241] write end of file

2017-06-29 Thread townsend at astro dot wisc.edu
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81241

--- Comment #6 from Rich Townsend  ---
Jim's patch for pr81195 fixes all the issues we've been experiencing -- so yes,
this counts as a duplicate. Thanks to all for the quick response.

[Bug ipa/80565] [8 Regression] ICE at -O2 and -O3 in 32-bit mode (not 64-bit) on x86_64-linux-gnu (in edge_badness, at ipa-inline.c:1028)

2017-06-29 Thread tetra2005 at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80565

--- Comment #8 from Yuri Gribov  ---
(In reply to H.J. Lu from comment #5)
> Why isn't the testcase checked into gcc testsuite?

Sorry, forgot... Thanks for adding.

[Bug tree-optimization/81162] [8 Regression] UBSAN switch triggers incorrect optimization in SLSR

2017-06-29 Thread wschmidt at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81162

Bill Schmidt  changed:

   What|Removed |Added

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

--- Comment #6 from Bill Schmidt  ---
Hm, thought we had all of these overflow cases sorted out long ago.  I'll have
a look.  I'll be out on vacation shortly so this may not get fixed until second
week of July if it's not immediately obvious.

[Bug fortran/81251] check of logical pointers

2017-06-29 Thread dominiq at lps dot ens.fr
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81251

Dominique d'Humieres  changed:

   What|Removed |Added

 Status|UNCONFIRMED |WAITING
   Last reconfirmed||2017-06-29
 Ever confirmed|0   |1

--- Comment #1 from Dominique d'Humieres  ---
If you compile the test with -Wall you get

   if(l) then

Warning: 'l' is used uninitialized in this function [-Wuninitialized]

On darwin the executable crashes with

Program received signal SIGSEGV: Segmentation fault - invalid memory reference.

IMO this PR should be closed as INVALID.

[Bug c++/81252] New: ICE on valid C++ code: in pop_local_binding, at cp/name-lookup.c:1404

2017-06-29 Thread su at cs dot ucdavis.edu
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81252

Bug ID: 81252
   Summary: ICE on valid C++ code: in pop_local_binding, at
cp/name-lookup.c:1404
   Product: gcc
   Version: unknown
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c++
  Assignee: unassigned at gcc dot gnu.org
  Reporter: su at cs dot ucdavis.edu
  Target Milestone: ---

It affects at least all versions 4.8.x and later. 

$ 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/8.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 8.0.0 20170629 (experimental) [trunk revision 249769] (GCC) 
$ 
$ clang++-4.0.0 -c small.cpp
$ icc -c small.cpp
$ 
$ g++-trunk -c small.cpp
small.cpp: In function ‘void f()’:
small.cpp:9:4: internal compiler error: in pop_local_binding, at
cp/name-lookup.c:1404
   };
^
0x7cdb6a pop_local_binding(tree_node*, tree_node*)
../../gcc-source-trunk/gcc/cp/name-lookup.c:1404
0x75afbb poplevel(int, int, int)
../../gcc-source-trunk/gcc/cp/decl.c:773
0x8a6b83 do_poplevel(tree_node*)
../../gcc-source-trunk/gcc/cp/semantics.c:448
0x8a99e9 finish_compound_stmt(tree_node*)
../../gcc-source-trunk/gcc/cp/semantics.c:1442
0x800727 cp_parser_compound_statement
../../gcc-source-trunk/gcc/cp/parser.c:11132
0x818868 cp_parser_function_body
../../gcc-source-trunk/gcc/cp/parser.c:21592
0x818868 cp_parser_ctor_initializer_opt_and_function_body
../../gcc-source-trunk/gcc/cp/parser.c:21628
0x819331 cp_parser_function_definition_after_declarator
../../gcc-source-trunk/gcc/cp/parser.c:26460
0x81a12d cp_parser_function_definition_from_specifiers_and_declarator
../../gcc-source-trunk/gcc/cp/parser.c:26372
0x81a12d cp_parser_init_declarator
../../gcc-source-trunk/gcc/cp/parser.c:19312
0x81c6df cp_parser_simple_declaration
../../gcc-source-trunk/gcc/cp/parser.c:12945
0x81d50a cp_parser_block_declaration
../../gcc-source-trunk/gcc/cp/parser.c:12763
0x825704 cp_parser_declaration
../../gcc-source-trunk/gcc/cp/parser.c:12660
0x824126 cp_parser_declaration_seq_opt
../../gcc-source-trunk/gcc/cp/parser.c:12536
0x82 cp_parser_translation_unit
../../gcc-source-trunk/gcc/cp/parser.c:4386
0x82 c_parse_file()
../../gcc-source-trunk/gcc/cp/parser.c:38642
0x968075 c_common_parse_file()
../../gcc-source-trunk/gcc/c-family/c-opts.c:1104
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <https://gcc.gnu.org/bugs/> for instructions.
$ 


---


struct S {};

void f ()
{ 
  struct A
  { 
struct S s;
void g (struct s);
  };
}

[Bug fortran/79866] diagnostics: typo in "Variable %s at %L of type EVENT_TYPE"

2017-06-29 Thread dominiq at lps dot ens.fr
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79866

--- Comment #2 from Dominique d'Humieres  ---
Test which does not fail:

--- ../_clean/gcc/testsuite/gfortran.dg/coarray_event_2.f08 1970-01-01
01:00:00.0 +0100
+++ gcc/testsuite/gfortran.dg/coarray_event_2.f08   2017-06-29
16:16:35.0 +0200
@@ -0,0 +1,15 @@
+! { dg-do compile }
+! { dg-options "-fcoarray=lib -lcaf_single" }
+
+! Check that pr70696 is really fixed.
+
+  use iso_fortran_env
+  type(event_type) :: x ! { dg-error "of type EVENT_TYPE or with subcomponent
of type EVENT_TYPE must be a coarray" }
+
+  ! exchange must not be called or the link problem before the patch
+  ! does not occur.
+contains
+  subroutine exchange
+event post (x[1]) ! { dg-error "Syntax error in EVENT POST statement at
.1." }
+  end subroutine
+end

[Bug fortran/79866] diagnostics: typo in "Variable %s at %L of type EVENT_TYPE"

2017-06-29 Thread dominiq at lps dot ens.fr
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79866

Dominique d'Humieres  changed:

   What|Removed |Added

 Status|UNCONFIRMED |ASSIGNED
   Last reconfirmed||2017-06-29
 CC||vehre at gcc dot gnu.org
   Assignee|unassigned at gcc dot gnu.org  |dominiq at lps dot 
ens.fr
 Ever confirmed|0   |1

--- Comment #1 from Dominique d'Humieres  ---
I am testing the following patch

--- ../_clean/gcc/fortran/resolve.c 2017-05-22 19:20:08.0 +0200
+++ gcc/fortran/resolve.c   2017-06-29 16:10:27.0 +0200
@@ -14525,7 +14525,7 @@ resolve_symbol (gfc_symbol *sym)
   && !sym->attr.codimension && !sym->ts.u.derived->attr.coarray_comp)
 {
   gfc_error ("Variable %s at %L of type EVENT_TYPE or with subcomponent of
"
-"type LOCK_TYPE must be a coarray", sym->name,
+"type EVENT_TYPE must be a coarray", sym->name,
 >declared_at);
   return;
 }
--- ../_clean/gcc/testsuite/gfortran.dg/coarray_event_2.f08 1970-01-01
01:00:00.0 +0100
+++ gcc/testsuite/gfortran.dg/coarray_event_2.f08   2017-06-29
16:13:20.0 +0200
@@ -0,0 +1,15 @@
+! { dg-do compile }
+! { dg-options "-fcoarray=lib -lcaf_single" }
+
+! Check that pr70696 is really fixed.
+
+  use iso_fortran_env
+  type(event_type) :: x ! { dg-error "of type EVENT_TYPE or with subcomponent
of type EVENT_TYPE must be a coarray" }
+
+  ! exchange must not be called or the link problem before the patch
+  ! does not occur.
+contains
+  subroutine exchange
+event post (x[1])
+  end subroutine
+end

[Bug fortran/81251] New: check of logical pointers

2017-06-29 Thread valeryweber at hotmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81251

Bug ID: 81251
   Summary: check of logical pointers
   Product: gcc
   Version: 8.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: fortran
  Assignee: unassigned at gcc dot gnu.org
  Reporter: valeryweber at hotmail dot com
  Target Milestone: ---

Hi All

Would it be possible to have a check of the validity of logical pointers (like
for integer)?

many thanks

v

program test
  logical, pointer :: l
  if(l) then
 write(*,*) '0t'
  else
 write(*,*) '0f'
  endif
end program test

gfortran-trunk test.f90 -fcheck=all -g
./a.out
 0t

[Bug tree-optimization/81245] [8 Regression] ICE building calculix with -Ofast

2017-06-29 Thread wschmidt at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81245

Bill Schmidt  changed:

   What|Removed |Added

 Target|aarch64-linux-gnu   |aarch64-linux-gnu
   ||powerpc64le-linux-gnu

--- Comment #8 from Bill Schmidt  ---
We see this on ppc64le as well.

[Bug ipa/81133] [8 Regression] PGO/LTO bootstrap: ICE: in inline_small_functions, at ipa-inline.c:1891

2017-06-29 Thread trippels at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81133

Markus Trippelsdorf  changed:

   What|Removed |Added

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

--- Comment #3 from Markus Trippelsdorf  ---
Looks like it got fixed by r249771.

[Bug middle-end/81194] [8 Regression] ICE during RTL pass: expand

2017-06-29 Thread bergner at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81194

Peter Bergner  changed:

   What|Removed |Added

 Status|RESOLVED|CLOSED

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

[Bug middle-end/81194] [8 Regression] ICE during RTL pass: expand

2017-06-29 Thread bergner at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81194

Peter Bergner  changed:

   What|Removed |Added

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

--- Comment #17 from Peter Bergner  ---
Fixed.

[Bug fortran/79843] diagnostics: missing word in fortran/symbol.c, conflict_std

2017-06-29 Thread dominiq at lps dot ens.fr
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79843

Dominique d'Humieres  changed:

   What|Removed |Added

 Status|UNCONFIRMED |ASSIGNED
   Last reconfirmed||2017-06-29
   Assignee|unassigned at gcc dot gnu.org  |dominiq at lps dot 
ens.fr
 Ever confirmed|0   |1

--- Comment #1 from Dominique d'Humieres  ---
I am testing the following patch

--- ../_clean/gcc/fortran/symbol.c  2017-04-04 18:13:40.0 +0200
+++ gcc/fortran/symbol.c2017-06-29 15:02:15.0 +0200
@@ -845,13 +845,13 @@ conflict:
 conflict_std:
   if (name == NULL)
 {
-  return gfc_notify_std (standard, "%s attribute "
+  return gfc_notify_std (standard, "%s attribute conflicts "
  "with %s attribute at %L", a1, a2,
  where);
 }
   else
 {
-  return gfc_notify_std (standard, "%s attribute "
+  return gfc_notify_std (standard, "%s attribute conflicts "
 "with %s attribute in %qs at %L",
  a1, a2, name, where);
 }
--- ../_clean/gcc/testsuite/gfortran.dg/namelist_3.f90  2017-04-28
16:22:54.0 +0200
+++ gcc/testsuite/gfortran.dg/namelist_3.f902017-06-29 15:29:45.0
+0200
@@ -4,5 +4,5 @@
 program namelist_3
   integer,pointer :: x
   allocate (x)
-  namelist /n/ x ! { dg-error "NAMELIST attribute with POINTER attribute" }
+  namelist /n/ x ! { dg-error "NAMELIST attribute conflicts with POINTER
attribute" }
 end program namelist_3
--- ../_clean/gcc/testsuite/gfortran.dg/pointer_intent_2.f902009-11-25
18:17:47.0 +0100
+++ gcc/testsuite/gfortran.dg/pointer_intent_2.f90  2017-06-29
15:27:46.0 +0200
@@ -14,6 +14,6 @@ program test
  call a(p) ! { dg-error "Type mismatch in argument" }
 contains
   subroutine a(p)! { dg-error "has no IMPLICIT type" }
-integer, pointer,intent(in) :: p ! { dg-error "POINTER attribute with
INTENT attribute" }
+integer, pointer,intent(in) :: p ! { dg-error "POINTER attribute conflicts
with INTENT attribute" }
   end subroutine
 end program

[Bug middle-end/81194] [8 Regression] ICE during RTL pass: expand

2017-06-29 Thread bergner at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81194

--- Comment #16 from Peter Bergner  ---
Author: bergner
Date: Thu Jun 29 12:58:32 2017
New Revision: 249783

URL: https://gcc.gnu.org/viewcvs?rev=249783=gcc=rev
Log:
gcc/
PR middle-end/81194
* cfgexpand.c (expand_gimple_stmt_1): Handle switch statements
with only one label.
* stmt.c (expand_case): Assert NCASES is greater than one.

gcc/testsuite/
PR middle-end/81194
* g++.dg/pr81194.C: New test.

Added:
trunk/gcc/testsuite/g++.dg/pr81194.C
Modified:
trunk/gcc/ChangeLog
trunk/gcc/cfgexpand.c
trunk/gcc/stmt.c
trunk/gcc/testsuite/ChangeLog

[Bug ipa/80565] [8 Regression] ICE at -O2 and -O3 in 32-bit mode (not 64-bit) on x86_64-linux-gnu (in edge_badness, at ipa-inline.c:1028)

2017-06-29 Thread hjl.tools at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80565

H.J. Lu  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
  Component|bootstrap   |ipa
 Resolution|--- |FIXED

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

[Bug bootstrap/80565] [8 Regression] ICE at -O2 and -O3 in 32-bit mode (not 64-bit) on x86_64-linux-gnu (in edge_badness, at ipa-inline.c:1028)

2017-06-29 Thread hjl at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80565

--- Comment #6 from hjl at gcc dot gnu.org  ---
Author: hjl
Date: Thu Jun 29 12:53:47 2017
New Revision: 249782

URL: https://gcc.gnu.org/viewcvs?rev=249782=gcc=rev
Log:
Add a testcase for PR ipa/80565

The testcase in

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80565

is passing now.  Check in the testcase and resolve it as fixed.

PR ipa/80565
* gcc.dg/torture/pr80565.c: New file.

Added:
trunk/gcc/testsuite/gcc.dg/torture/pr80565.c
Modified:
trunk/gcc/testsuite/ChangeLog

[Bug fortran/81241] write end of file

2017-06-29 Thread dominiq at lps dot ens.fr
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81241

--- Comment #5 from Dominique d'Humieres  ---
AFAICT this seems fixed on trunk (8.0) and gcc-7 by the patch for pr81195.
Duplicate?

[Bug c++/81250] New: C++ warnings about unused stl

2017-06-29 Thread jg at jguk dot org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81250

Bug ID: 81250
   Summary: C++ warnings about unused stl
   Product: gcc
   Version: 5.4.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c++
  Assignee: unassigned at gcc dot gnu.org
  Reporter: jg at jguk dot org
  Target Milestone: ---

Created attachment 41649
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=41649=edit
To reproduce

Noticed that std::string which are unused, don't generate warnings. Could these
be detected?

g++ -Wall -Wunused-variable -o main main.cpp

Attached is an example.

Expected output:
main.cpp:12: warning: unused variable ‘unused_str’ [-Wunused-variable]
 string unused_str;

main.cpp:17: warning: unused variable ‘unused_var’ [-Wunused-variable]
 string unused_var;



NOTE:

If I add an unused size_t, I do get a warning.
main.cpp:13:12: warning: unused variable ‘no’ [-Wunused-variable]
 size_t no = 0;

[Bug fortran/81241] write end of file

2017-06-29 Thread dominiq at lps dot ens.fr
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81241

Dominique d'Humieres  changed:

   What|Removed |Added

 Status|UNCONFIRMED |WAITING
   Last reconfirmed||2017-06-29
 Ever confirmed|0   |1

[Bug tree-optimization/81249] [8 Regression] ICE: error: incompatible types in PHI argument 0

2017-06-29 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81249

Richard Biener  changed:

   What|Removed |Added

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

--- Comment #5 from Richard Biener  ---
Mine.

[Bug bootstrap/80565] [8 Regression] ICE at -O2 and -O3 in 32-bit mode (not 64-bit) on x86_64-linux-gnu (in edge_badness, at ipa-inline.c:1028)

2017-06-29 Thread hjl.tools at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80565

--- Comment #5 from H.J. Lu  ---
(In reply to Yuri Gribov from comment #4)
> Chengnian, is this resolved?

Why isn't the testcase checked into gcc testsuite?

[Bug c++/81247] [8 Regression] ICE on invalid C++ code with malformed namespace declaration: in do_push_nested_namespace, at cp/name-lookup.c:6002

2017-06-29 Thread nathan at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81247

Nathan Sidwell  changed:

   What|Removed |Added

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

[Bug c++/81247] [8 Regression] ICE on invalid C++ code with malformed namespace declaration: in do_push_nested_namespace, at cp/name-lookup.c:6002

2017-06-29 Thread marxin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81247

Martin Liška  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2017-06-29
 CC||marxin at gcc dot gnu.org,
   ||nathan at gcc dot gnu.org
Summary|ICE on invalid C++ code |[8 Regression] ICE on
   |with malformed namespace|invalid C++ code with
   |declaration: in |malformed namespace
   |do_push_nested_namespace,   |declaration: in
   |at cp/name-lookup.c:6002|do_push_nested_namespace,
   ||at cp/name-lookup.c:6002
 Ever confirmed|0   |1

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

[Bug c++/81246] ICC on invalid C++ code (with a non-type template parameter having type 'float'): Segmentation fault

2017-06-29 Thread marxin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81246

Martin Liška  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2017-06-29
 CC||marxin at gcc dot gnu.org
 Ever confirmed|0   |1

--- Comment #1 from Martin Liška  ---
Confirmed, 4.5.0+ is affected.

[Bug tree-optimization/81248] No ipa-sra optimization for small struct / class

2017-06-29 Thread wilhelm.me...@hs-kl.de
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81248

--- Comment #6 from wilhelm.me...@hs-kl.de ---
Sorry for being this inpatient: do you have a timeline for the fix?

[Bug tree-optimization/81249] [8 Regression] ICE: error: incompatible types in PHI argument 0

2017-06-29 Thread trippels at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81249

--- Comment #4 from Markus Trippelsdorf  ---
Started with r249553.

[Bug tree-optimization/81248] No ipa-sra optimization for small struct / class

2017-06-29 Thread jamborm at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81248

Martin Jambor  changed:

   What|Removed |Added

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

--- Comment #5 from Martin Jambor  ---
There is a bogus size check at the end of splice_param_accesses() that
is the culprit.  But I am in the middle of an IPA-SRA rewrite so I
would prefer to fix it that way, if possible.  In any event, I will
keep this in mind.

[Bug testsuite/81058] FAIL: gcc.target/i386/avx512bw-vpmovu?swb-1.c scan-assembler-times vpmovu?swb.*

2017-06-29 Thread kyukhin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81058

--- Comment #4 from Kirill Yukhin  ---
Confirmed.

[Bug tree-optimization/81196] Number of iterations found for p!=q but not for p

2017-06-29 Thread amker at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81196

--- Comment #8 from amker at gcc dot gnu.org ---
Author: amker
Date: Thu Jun 29 10:41:28 2017
New Revision: 249778

URL: https://gcc.gnu.org/viewcvs?rev=249778=gcc=rev
Log:
PR tree-optimization/81196
* tree-ssa-loop-niter.c (number_of_iterations_cond): Handle loop
exit condition comparing two IVs.

gcc/testsuite
* gcc.dg/vect/pr81196.c: New.

Added:
trunk/gcc/testsuite/gcc.dg/vect/pr81196.c
Modified:
trunk/gcc/ChangeLog
trunk/gcc/testsuite/ChangeLog
trunk/gcc/tree-ssa-loop-niter.c

[Bug tree-optimization/81249] [8 Regression] ICE: error: incompatible types in PHI argument 0

2017-06-29 Thread trippels at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81249

Markus Trippelsdorf  changed:

   What|Removed |Added

  Component|bootstrap   |tree-optimization
Summary|[8 Regression] LTO/PGO  |[8 Regression] ICE: error:
   |bootstrap: ICE: in  |incompatible types in PHI
   |compare_values_warnv, at|argument 0
   |tree-vrp.c:1029 |

--- Comment #3 from Markus Trippelsdorf  ---
trippels@gcc67 gcc % cat genattrtab.ii
typedef struct rtx_def *rtx;
union rtunion {
  rtx rt_rtx;
};
struct rtx_def {
  struct {
rtunion fld[0];
  } u;
  rtx elem[];
} a;
int b, c, d;
rtx e;
int main() {
  for (;;) {
d = 0;
for (; d < b; d++)
  if (a.elem[d])
e = a.elem[d]->u.fld[1].rt_rtx;
if (e)
  c = 0;
  }
}

trippels@gcc67 gcc % g++ -O3 -march=znver1 genattrtab.ii
genattrtab.ii: In function ‘int main()’:
genattrtab.ii:13:5: error: incompatible types in PHI argument 0
 int main() {
 ^~~~
struct rtx_def *

long unsigned int

e_lsm.8_49 = PHI <_79(9), e_lsm.8_1(5)>
genattrtab.ii:13:5: error: incompatible types in PHI argument 1
struct rtx_def *

long unsigned int

e_lsm.8_53 = PHI 
during GIMPLE pass: vect
genattrtab.ii:13:5: internal compiler error: verify_gimple failed
0xe383a6 verify_gimple_in_cfg(function*, bool)
../../gcc/gcc/tree-cfg.c:5304
0xd124a3 execute_function_todo
../../gcc/gcc/passes.c:1989
0xd12de9 execute_todo
../../gcc/gcc/passes.c:2043

[Bug middle-end/81194] [8 Regression] ICE during RTL pass: expand

2017-06-29 Thread marc.mutz at kdab dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81194

--- Comment #15 from Marc Mutz  ---
FWIW, the patch fixes the ICE for me, too.

[Bug tree-optimization/81245] [8 Regression] ICE building calculix with -Ofast

2017-06-29 Thread pinskia at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81245

--- Comment #7 from Andrew Pinski  ---
(In reply to Richard Biener from comment #6)
> Not sure if it's good to introduce copysign here anyway (do we actually
> vectorize this w/o target support?)

We should be able to without target support; I don't know if we do though. For
-ffast-math we should able to convert copysign into a veccond or bit selection.
  I just know aarch64 has the target support already and that is why I saw the
ice.

[Bug bootstrap/81249] [8 Regression] LTO/PGO bootstrap: ICE: in compare_values_warnv, at tree-vrp.c:1029

2017-06-29 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81249

Richard Biener  changed:

   What|Removed |Added

   Target Milestone|--- |8.0

--- Comment #2 from Richard Biener  ---
Testcase?  Try -fdump-tree-vrp-gimple and startwith("vrp") (ok, likely need to
fiddle with things quite a bit, but at least VRP shouldn't be profile
sensitive).

[Bug target/80382] ICE with error: unrecognizable insn

2017-06-29 Thread segher at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80382

Segher Boessenkool  changed:

   What|Removed |Added

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

--- Comment #16 from Segher Boessenkool  ---
Fixed on 6 and later.

[Bug bootstrap/81249] [8 Regression] LTO/PGO bootstrap: ICE: in compare_values_warnv, at tree-vrp.c:1029

2017-06-29 Thread trippels at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81249

Markus Trippelsdorf  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2017-06-29
 Ever confirmed|0   |1

--- Comment #1 from Markus Trippelsdorf  ---
Forgot to mention this happens on gcc67 (AMD Ryzen), so -march=native is
znver1.

[Bug rtl-optimization/80429] -fcompare-debug failure on ppc64le with LRA

2017-06-29 Thread segher at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80429

Segher Boessenkool  changed:

   What|Removed |Added

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

--- Comment #7 from Segher Boessenkool  ---
Fixed on 6 and later.

[Bug bootstrap/81249] New: [8 Regression] LTO/PGO bootstrap: ICE: in compare_values_warnv, at tree-vrp.c:1029

2017-06-29 Thread trippels at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81249

Bug ID: 81249
   Summary: [8 Regression] LTO/PGO bootstrap: ICE: in
compare_values_warnv, at tree-vrp.c:1029
   Product: gcc
   Version: 8.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: bootstrap
  Assignee: unassigned at gcc dot gnu.org
  Reporter: trippels at gcc dot gnu.org
  Target Milestone: ---

During stagetrain in LTO/PGO bootstrap I get:

during GIMPLE pass: vrp 
../../gcc/gcc/genattrtab.c: In function ‘main’: 
../../gcc/gcc/genattrtab.c:5133:1: internal compiler error: in
compare_values_warnv, at tree-vrp.c:1029 

 % ../gcc/configure --disable-libstdcxx-pch --disable-libvtv --disable-libitm
--disable-libcilkrts --disable-libssp --disable-libgomp --disable-werror
--disable-multilib --enable-languages=c,c++,fortran --enable-checking=release
--with-build-config="bootstrap-O3 bootstrap-lto"

 % make -j16 BOOT_CFLAGS="-Wno-error=coverage-mismatch -march=native -O3 -pipe"
STAGE1_CFLAGS="-Wno-error=coverage-mismatch -march=native -O3 -pipe"
CFLAGS_FOR_TARGET="-Wno-error=coverage-mismatch -march=native -O3 -pipe"
CXXFLAGS_FOR_TARGET="-Wno-error=coverage-mismatch -march=native -O3 -pipe"
profiledbootstrap

[Bug sanitizer/81209] [7/8 Regression] -fsanitize=undefined ICE on darwin

2017-06-29 Thread dominiq at lps dot ens.fr
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81209

Dominique d'Humieres  changed:

   What|Removed |Added

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

--- Comment #4 from Dominique d'Humieres  ---
Thanks for the quick fix. Closing.

[Bug target/80479] [7/8 Regression] strcmp() produces valgrind errors on ppc64le

2017-06-29 Thread segher at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80479

--- Comment #15 from Segher Boessenkool  ---
(In reply to jreiser from comment #14)
> Here's how to retain the increased speed (and save around 300 bytes per
> call) while enabling valgrind happiness.

It won't be as fast.  How much slower, only profiling can tell.  One
important point is that the inlined version has better branch prediction.

> Put this subroutine in archive library libgcc_s.a only, and not in shared
> library libgcc_s.so.  Then the linkage for 'bl' is direct, avoiding PLT
> (ProgramLinkageTable), and the time for 'bl' is hidden by cache latency for
> 'ldbrx'.  The return 'blr' often is free, but may cost 1 cycle if it
> immediately follows a conditional branch that tests for termination.

blr never is free (and neither is bl).  Its execution cost may be hidden
in happy cases, sure, but it ends the dispatch group (and causes fetch
to redirect as well).  This matters for small functions.

> Valgrind(memcheck) can be happy because it can intercept and re-direct the
> entire routine by name, thus avoiding having to analyze 'cmpb'.

We'll just need to find some good way to make valgrind behave; some way
that does not slow down the code.

> Notes: ldbrx and lwbrx are functional for non-aligned addresses.

Unaligned l*brx is quite slow, on many CPUs (it can take an alignment
interrupt for example, and a trip to the kernel is not free at all; even
when it doesn't cause an interrupt, unaligned accesses are slower).

[Bug target/70119] AArch64 should take advantage of implicit truncation of variable shift amount without defining SHIFT_COUNT_TRUNCATED

2017-06-29 Thread collison at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70119

--- Comment #6 from collison at gcc dot gnu.org ---
Author: collison
Date: Thu Jun 29 09:21:57 2017
New Revision: 249774

URL: https://gcc.gnu.org/viewcvs?rev=249774=gcc=rev
Log:
2017-06-29  Kyrylo Tkachov  
Michael Collison 

PR target/70119
* config/aarch64/aarch64.md (*aarch64__reg_3_mask1):
New pattern.
(*aarch64_reg_3_neg_mask2): New pattern.
(*aarch64_reg_3_minus_mask): New pattern.
(*aarch64__reg_di3_mask2): New pattern.
* config/aarch64/aarch64.c (aarch64_rtx_costs): Account for cost
of shift when the shift amount is masked with constant equal to
the size of the mode.
* config/aarch64/predicates.md (subreg_lowpart_operator): New
predicate.


2017-06-29  Kyrylo Tkachov  
Michael Collison 

PR target/70119
* gcc.target/aarch64/var_shift_mask_1.c: New test.

Added:
trunk/gcc/testsuite/gcc.target/aarch64/var_shift_mask_1.c
Modified:
trunk/gcc/ChangeLog
trunk/gcc/config/aarch64/aarch64.c
trunk/gcc/config/aarch64/aarch64.md
trunk/gcc/config/aarch64/predicates.md
trunk/gcc/testsuite/ChangeLog

[Bug ipa/81112] [7 Regression] internal compiler error: tree check: expected integer_cst, have range_expr in get_len, at tree.h:5321

2017-06-29 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81112

Richard Biener  changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
  Known to work||7.1.1
 Resolution|--- |FIXED
  Known to fail||7.1.0

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

[Bug tree-optimization/79224] [7/8 Regression] Large C-Ray slowdown

2017-06-29 Thread tetra2005 at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79224

Yuri Gribov  changed:

   What|Removed |Added

 CC||tetra2005 at gmail dot com

--- Comment #16 from Yuri Gribov  ---
(In reply to Markus Trippelsdorf from comment #15)
> The patch causes bootstrap failure on x86_64:
> https://gcc.gnu.org/ml/gcc-regression/2017-05/msg0.html

Might have been fixed by r249771

[Bug bootstrap/80565] [8 Regression] ICE at -O2 and -O3 in 32-bit mode (not 64-bit) on x86_64-linux-gnu (in edge_badness, at ipa-inline.c:1028)

2017-06-29 Thread tetra2005 at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80565

--- Comment #4 from Yuri Gribov  ---
Chengnian, is this resolved?

  1   2   >