[Bug c/84696] New: internal compiler error: in compute_antic_aux, at tree-ssa-pre.c:2148

2018-03-03 Thread bugzilla.gnu at coelho dot net
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84696

Bug ID: 84696
   Summary: internal compiler error: in compute_antic_aux, at
tree-ssa-pre.c:2148
   Product: gcc
   Version: 8.0.1
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c
  Assignee: unassigned at gcc dot gnu.org
  Reporter: bugzilla.gnu at coelho dot net
  Target Milestone: ---

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

Compilation of postgresql fails with -fwrapv -O2

 sh> gcc --version
 gcc (GCC) 8.0.1 20180303 (experimental)

 sh> gcc -fwrapv -O2 -c -o localtime.o localtime.i
 during GIMPLE pass: pre
 localtime.c: In function ‘tzparse’:
 localtime.c:897:1: internal compiler error: in compute_antic_aux, at
tree-ssa-pre.c:2148
 tzparse(const char *name, struct state *sp, bool lastditch)
 ^~~
 0xe0b5de compute_antic_aux
../../gcc-trunk-src/gcc/tree-ssa-pre.c:2148
 0xe0b5de compute_antic
../../gcc-trunk-src/gcc/tree-ssa-pre.c:2364
 0xe0b5de execute
../../gcc-trunk-src/gcc/tree-ssa-pre.c:4131
 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.

[Bug c++/84695] New: Missed opportunity to issue warning about override

2018-03-03 Thread drepper.fsp+rhbz at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84695

Bug ID: 84695
   Summary: Missed opportunity to issue warning about override
   Product: gcc
   Version: 8.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c++
  Assignee: unassigned at gcc dot gnu.org
  Reporter: drepper.fsp+rhbz at gmail dot com
  Target Milestone: ---

Stroustrup in [1] §20.3.4 writes the compilers should issue warnings about
inconsistent use of explicit override controls.

struct foo {
  virtual int one(int) { return 1; }
  virtual int two(int) { return 2; }
};
struct bar : foo {
  int one(int) override { return 101; }
  int two(int) { return 102; }
};
bar b;

In this case the compiler should issue a warning about bar::two.

This is different from -Wsuggest-override.  That command line option causes a
warning to be issued but the fact that bar::one uses override should
automatically turn on this type of warnings for the rest of the class.  I would
even say there is no need for a further command line option, it should just
been done.

[1] http://www.stroustrup.com/4th.html

Invitation of paper submissions and editorial board members or reviewers

2018-03-03 Thread AJMIE J.

Dear Author,
We publish open access, peer-reviewed journals which are dedicated to
promoting the advancement of science and technology. Now we sincerely
invite scholars and researchers to submit papers to the journals or to join
us as an editorial board member or a reviewer.
A List of Some Journals:

   1. Nanoscience and Nanometrology
   2. Science Journal of Chemistry
   3. International Journal of Literature and Arts
   4. American Journal of Neural Networks and Applications
   5. International Journal of Genetics and Genomics
   6. Journal of Cancer Treatment and Research
   7. American Journal of Sports Science
   8. International Journal of Environmental Monitoring and Analysis
   9. Urban and Regional Planning
   10. International Journal of Wireless Communications and Mobile Computing
   11. International Journal of Economy, Energy and Environment

Join in Our Editorial Board
To fulfill the expansion of the editorial board and reviewer team, we would
like to invite you sincerely to be the editorial member or reviewer of our
journals. If you want to know more details of the Benefits and
Responsibilities of the editorial member or reviewer, please feel free to
click the following link: http://www.clinexpmed.org/journals
Invitation of Calling for Manuscripts
We publish more than 200 open access, online, peer-reviewed journals. If
you have burst out some new ideas in your specialized or interested field,
welcome to submit your papers to the corresponding Journals or Special
Issues so as to share your ideas with people around the world.
OA
Open Access makes knowledge available to all. And all papers are resources
shared by scientific community and general public for free.
Fast Publication
Fast publication brings new discoveries & innovation to the science. Papers
submitted to our journals can be published within 40-60 days from
submission provided that the paper is of good quality and the authors'
response is prompt.
Abstracting
Most of journals in our platform have been indexed by WorldCat, CrossRef,
JournalSeek, Electronic Journals Library (EJL), Zeitschriftendatenbank,
EZB, Academickeys, ResearchBib, Polish Scholarly Bibliography,
Wissenschaftszentrum Berlin, CNKI, etc.
Peer-reviewed Policy
Papers submitted to the journals are peer-reviewed, while the comments are
visible to readers, generally with the identities of the peer reviewers
disclosed as well.


[Bug c++/84686] [6/7/8 Regression] Parenthesized discarded value expression are not evaluated with option -std=c++14

2018-03-03 Thread jason at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84686

--- Comment #2 from Jason Merrill  ---
Author: jason
Date: Sun Mar  4 05:32:39 2018
New Revision: 258231

URL: https://gcc.gnu.org/viewcvs?rev=258231=gcc=rev
Log:
PR c++/84686 - missing volatile loads.

* cvt.c (convert_to_void): Call maybe_undo_parenthesized_ref.

Added:
trunk/gcc/testsuite/g++.dg/tree-ssa/volatile2.C
Modified:
trunk/gcc/cp/ChangeLog
trunk/gcc/cp/cvt.c

[Bug fortran/71085] ICE with some intrinsic functions specifying array function result dimension

2018-03-03 Thread kargl at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71085

kargl at gcc dot gnu.org changed:

   What|Removed |Added

   Priority|P3  |P4
 Status|NEW |RESOLVED
 CC||kargl at gcc dot gnu.org
 Resolution|--- |FIXED
   Target Milestone|--- |6.5

--- Comment #7 from kargl at gcc dot gnu.org ---
Fixed on 6-branch, 7-branch, and trunk.
Thanks for bug report.

[Bug fortran/71085] ICE with some intrinsic functions specifying array function result dimension

2018-03-03 Thread kargl at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71085

--- Comment #6 from kargl at gcc dot gnu.org ---
Author: kargl
Date: Sun Mar  4 05:11:31 2018
New Revision: 258230

URL: https://gcc.gnu.org/viewcvs?rev=258230=gcc=rev
Log:
2018-03-03  Harald Anlauf  

PR fortran/71085
* trans-expr.c (gfc_apply_interface_mapping_to_expr): Do not
dereference NULL pointer.


2018-03-03  Harald Anlauf  

PR fortran/71085
* gfortran.dg/pr71085.f90: New test.

Added:
branches/gcc-6-branch/gcc/testsuite/gfortran.dg/pr71085.f90
Modified:
branches/gcc-6-branch/gcc/fortran/ChangeLog
branches/gcc-6-branch/gcc/fortran/trans-expr.c
branches/gcc-6-branch/gcc/testsuite/ChangeLog

[Bug fortran/71085] ICE with some intrinsic functions specifying array function result dimension

2018-03-03 Thread kargl at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71085

--- Comment #5 from kargl at gcc dot gnu.org ---
Author: kargl
Date: Sun Mar  4 01:52:24 2018
New Revision: 258229

URL: https://gcc.gnu.org/viewcvs?rev=258229=gcc=rev
Log:
2018-03-03  Harald Anlauf  

PR fortran/71085
* trans-expr.c (gfc_apply_interface_mapping_to_expr): Do not
dereference NULL pointer.


2018-03-03  Harald Anlauf  

PR fortran/71085
* gfortran.dg/pr71085.f90: New test.


Added:
branches/gcc-7-branch/gcc/testsuite/gfortran.dg/pr71085.f90
Modified:
branches/gcc-7-branch/gcc/fortran/ChangeLog
branches/gcc-7-branch/gcc/fortran/trans-expr.c
branches/gcc-7-branch/gcc/testsuite/ChangeLog

[Bug fortran/71085] ICE with some intrinsic functions specifying array function result dimension

2018-03-03 Thread kargl at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71085

--- Comment #4 from kargl at gcc dot gnu.org ---
Author: kargl
Date: Sun Mar  4 01:37:13 2018
New Revision: 258228

URL: https://gcc.gnu.org/viewcvs?rev=258228=gcc=rev
Log:
2018-03-03  Harald Anlauf  

PR fortran/71085
* trans-expr.c (gfc_apply_interface_mapping_to_expr): Do not
dereference NULL pointer.


2018-03-03  Harald Anlauf  

PR fortran/71085
* gfortran.dg/pr71085.f90: New test.

Added:
trunk/gcc/testsuite/gfortran.dg/pr71085.f90
Modified:
trunk/gcc/fortran/ChangeLog
trunk/gcc/fortran/trans-expr.c
trunk/gcc/testsuite/ChangeLog

[Bug c++/82336] [6/7/8 Regression] GCC requires but does not emit defaulted constructors in certain cases

2018-03-03 Thread paolo.carlini at oracle dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82336

Paolo Carlini  changed:

   What|Removed |Added

 CC|mukesh.kapoor at oracle dot com|paolo.carlini at oracle 
dot com

--- Comment #4 from Paolo Carlini  ---
Just to confirm that Nathan's analysis is correct the below "works".

That said, I don't know how pervasive the problem is, to wit in how many cases
using perform_implicit_conversion_flags - which is supposed to be used only
when we are committed to do the conversion - in check_default_argument actually
causes problems, if we could imagine restricting an unsharing to some kinds of
arguments (in this case it's an *empty* CONSTRUCTOR!), or we really should
write new facilities only for checking purposes, and so on.

Maybe Jason is willing to comment on this, which kind of ways forward he can
see...



Index: decl.c
===
--- decl.c  (revision 258222)
+++ decl.c  (working copy)
@@ -12627,6 +12627,8 @@ check_default_argument (tree decl, tree arg, tsubs
further.  */
 return error_mark_node;

+  tree orig_arg = unshare_expr (arg);
+
   /* [dcl.fct.default]

  A default argument expression is implicitly converted to the
@@ -12636,6 +12638,8 @@ check_default_argument (tree decl, tree arg, tsubs
 LOOKUP_IMPLICIT);
   --cp_unevaluated_operand;

+  arg = orig_arg;
+
   /* Avoid redundant -Wzero-as-null-pointer-constant warnings at
  the call sites.  */
   if (TYPE_PTR_OR_PTRMEM_P (decl_type)

[Bug fortran/66128] ICE for some intrinsics with zero sized array parameter

2018-03-03 Thread kargl at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66128

kargl at gcc dot gnu.org changed:

   What|Removed |Added

 Status|NEW |SUSPENDED

--- Comment #12 from kargl at gcc dot gnu.org ---
(In reply to Thomas Koenig from comment #11)
> According to your mail at (In reply to kargl from comment #10)
> 
> > Closing as fixed.
> 
> https://gcc.gnu.org/ml/fortran/2018-03/msg00010.html still shows a few
> tests that fail.
> 
> Let's keep this PR open to track these.

I was going to submit individual PR's for the remaining issues
after writing code to actually test for the ICE.

[Bug middle-end/21161] [6/7/8 Regression] "clobbered by longjmp" warning ignores the data flow

2018-03-03 Thread bergner at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=21161

Peter Bergner  changed:

   What|Removed |Added

 CC||bergner at gcc dot gnu.org

--- Comment #13 from Peter Bergner  ---
In case you haven't creduce'd the test case yet, here's what I got:

bergner@pike:~/gcc/BUGS/PR21161$ cat pr21161.i
extern int _setjmp (void);
typedef struct { long a; } * b;
extern void d (void);
void
c (b obj)
{
  _setjmp();
  if (((b)0)->a)
obj = 0;
  if (((b)obj)->a)
d();
}
bergner@pike:~/gcc/BUGS/PR21161$
/home/bergner/gcc/build/gcc-fsf-mainline-debug/gcc/xgcc
-B/home/bergner/gcc/build/gcc-fsf-mainline-debug/gcc -W -O1 -S pr21161.i
pr21161.i: In function ‘c’:
pr21161.i:5:6: warning: argument ‘obj’ might be clobbered by ‘longjmp’ or
‘vfork’ [-Wclobbered]
 c (b obj)
~~^~~

[Bug c++/60228] ICE using lambda in #pragma omp declare reduction

2018-03-03 Thread paolo.carlini at oracle dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=60228

Paolo Carlini  changed:

   What|Removed |Added

 CC||paolo.carlini at oracle dot com

--- Comment #3 from Paolo Carlini  ---
Something I didn't really pay attention to before: the ICE only happens in a
template, otherwise the lambda is already accepted as an extension. There must
be a way to fix the problem without explicitly handling C++11 constructs...

[Bug c/84685] Designated initializers warning

2018-03-03 Thread jonathan.leffler at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84685

Jonathan Leffler  changed:

   What|Removed |Added

 CC||jonathan.leffler at gmail dot 
com

--- Comment #1 from Jonathan Leffler  ---
The problem was first noted and discussed in a question on Stack Overflow:
https://stackoverflow.com/questions/49081541/

There are some comments there that may help with the diagnosis.  The problem
occurs with GCC 7.3.0 compiled on a Mac too.  A major component of the bug is
the inconsistency; it requires a compound array literal as an initializer, and
it does not report for all fields that are not specifically initialized. 

There are two ways the bug fix could go.

(1) It reports on each uninitialized member, not just the one after the member
initialized with compound array literal.
(2) It doesn't report on any uninitialized member because they're all
zero-initialized when a designated initializer is used.

Of the two, fix version (2) is what I'd prefer to see.  Note that Clang does
not report an error for this, which is in line with fix version (2).

The compound literal must be an array for the problem to reproduce.  Using

struct T t = {.b = };

in the initialization doesn't trigger any warning, for example.

The warning appears for the first field after the last member initialized with
a compound array literal.

Consider this code (file diw83.c):

struct T
{
int a;
int *b;
int c;
int d;
int *e;
int f;
int g;
int h;
};

struct T foo(int bar);

struct T foo(int bar)
{
struct T t = { .b = (int[]){ 1 }, .e = (int[]){ 2 } };
t.c = bar;
return t;
}

Compilation:

$ gcc -v -save-temps -O3 -g -std=c11 -Wall -Wextra -Werror -Wmissing-prototypes
-Wstrict-prototypes -c diw83.c
Using built-in specs.
COLLECT_GCC=gcc
Target: x86_64-apple-darwin17.4.0
Configured with: ../gcc-7.3.0/configure --prefix=/opt/gcc/v7.3.0
CC=/usr/bin/clang CXX=/usr/bin/clang++
Thread model: posix
gcc version 7.3.0 (GCC) 
COLLECT_GCC_OPTIONS='-v' '-save-temps' '-O3' '-g' '-std=c11' '-Wall' '-Wextra'
'-Werror' '-Wmissing-prototypes' '-Wstrict-prototypes' '-c'
'-mmacosx-version-min=10.13.4' '-asm_macosx_version_min=10.13' '-mtune=core2'
 /opt/gcc/v7.3.0/libexec/gcc/x86_64-apple-darwin17.4.0/7.3.0/cc1 -E -quiet -v
-D__DYNAMIC__ diw83.c -fPIC -feliminate-unused-debug-symbols
-mmacosx-version-min=10.13.4 -mtune=core2 -std=c11 -Wall -Wextra -Werror
-Wmissing-prototypes -Wstrict-prototypes -g -fworking-directory -O3
-fpch-preprocess -o diw83.i
ignoring nonexistent directory
"/opt/gcc/v7.3.0/lib/gcc/x86_64-apple-darwin17.4.0/7.3.0/../../../../x86_64-apple-darwin17.4.0/include"
#include "..." search starts here:
#include <...> search starts here:
 /opt/gcc/v7.3.0/lib/gcc/x86_64-apple-darwin17.4.0/7.3.0/include
 /usr/local/include
 /opt/gcc/v7.3.0/include
 /opt/gcc/v7.3.0/lib/gcc/x86_64-apple-darwin17.4.0/7.3.0/include-fixed
 /usr/include
 /System/Library/Frameworks
 /Library/Frameworks
End of search list.
COLLECT_GCC_OPTIONS='-v' '-save-temps' '-O3' '-g' '-std=c11' '-Wall' '-Wextra'
'-Werror' '-Wmissing-prototypes' '-Wstrict-prototypes' '-c'
'-mmacosx-version-min=10.13.4' '-asm_macosx_version_min=10.13' '-mtune=core2'
 /opt/gcc/v7.3.0/libexec/gcc/x86_64-apple-darwin17.4.0/7.3.0/cc1 -fpreprocessed
diw83.i -fPIC -feliminate-unused-debug-symbols -quiet -dumpbase diw83.c
-mmacosx-version-min=10.13.4 -mtune=core2 -auxbase diw83 -g -O3 -Wall -Wextra
-Werror -Wmissing-prototypes -Wstrict-prototypes -std=c11 -version -o diw83.s
GNU C11 (GCC) version 7.3.0 (x86_64-apple-darwin17.4.0)
compiled by GNU C version 7.3.0, GMP version 6.1.2, MPFR version 3.1.5,
MPC version 1.0.3, isl version isl-0.16.1-GMP

GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
GNU C11 (GCC) version 7.3.0 (x86_64-apple-darwin17.4.0)
compiled by GNU C version 7.3.0, GMP version 6.1.2, MPFR version 3.1.5,
MPC version 1.0.3, isl version isl-0.16.1-GMP

GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
Compiler executable checksum: 43361e81476fe13fcb47d99cd4904fd3
diw83.c: In function ‘foo’:
diw83.c:17:12: error: missing initializer for field ‘f’ of ‘struct T’
[-Werror=missing-field-initializers]
 struct T t = { .b = (int[]){ 1 }, .e = (int[]){ 2 } };
^
diw83.c:8:9: note: ‘f’ declared here
 int f;
 ^
cc1: all warnings being treated as errors
$

Apart from five #line directives at the start, the preprocessed file (diw83.i)
is the same as the input file.

[Bug c++/84694] New: internal compiler error: tree check: expected tree that contains 'decl minimal' structure, have 'identifier_node' in do_friend, at cp/friend.c:498

2018-03-03 Thread vegard.nossum at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84694

Bug ID: 84694
   Summary: internal compiler error: tree check: expected tree
that contains 'decl minimal' structure, have
'identifier_node' in do_friend, at cp/friend.c:498
   Product: gcc
   Version: 8.0.1
Status: UNCONFIRMED
  Keywords: ice-on-invalid-code
  Severity: normal
  Priority: P3
 Component: c++
  Assignee: unassigned at gcc dot gnu.org
  Reporter: vegard.nossum at gmail dot com
CC: webrown.cpp at gmail dot com
  Target Milestone: ---

Input:

template
struct a {
  template<a()> void b();
  friend b<>();
}

Output:

$ xgcc -x c++ -S - 
:4:14: error: ISO C++ forbids declaration of 'b' with no type
[-fpermissive]
:4:14: internal compiler error: tree check: expected tree that contains
'decl minimal' structure, have 'identifier_node' in do_friend, at
cp/friend.c:498
0x66106d tree_contains_struct_check_failed(tree_node const*,
tree_node_structure_enum, char const*, int, char const*)
/home/vegard/git/gcc/gcc/tree.c:9509
0xcefe59 contains_struct_check(tree_node*, tree_node_structure_enum, char
const*, int, char const*)
/home/vegard/git/gcc/gcc/tree.h:3246
0xcefe59 do_friend(tree_node*, tree_node*, tree_node*, tree_node*,
overload_flags, bool)
/home/vegard/git/gcc/gcc/cp/friend.c:498
0xc13c1d grokdeclarator(cp_declarator const*, cp_decl_specifier_seq*,
decl_context, int, tree_node**)
/home/vegard/git/gcc/gcc/cp/decl.c:12203
0xc5a1c9 grokfield(cp_declarator const*, cp_decl_specifier_seq*, tree_node*,
bool, tree_node*, tree_node*)
/home/vegard/git/gcc/gcc/cp/decl2.c:829
0xfe26da cp_parser_member_declaration
/home/vegard/git/gcc/gcc/cp/parser.c:23893
0xf1871b cp_parser_member_specification_opt
/home/vegard/git/gcc/gcc/cp/parser.c:23372
0xf1871b cp_parser_class_specifier_1
/home/vegard/git/gcc/gcc/cp/parser.c:22514
0xf2763b cp_parser_class_specifier
/home/vegard/git/gcc/gcc/cp/parser.c:22766
0xf2763b cp_parser_type_specifier
/home/vegard/git/gcc/gcc/cp/parser.c:16772
0xf8c7ba cp_parser_decl_specifier_seq
/home/vegard/git/gcc/gcc/cp/parser.c:13627
0xfa6ddf cp_parser_single_declaration
/home/vegard/git/gcc/gcc/cp/parser.c:27185
0xfc9658 cp_parser_template_declaration_after_parameters
/home/vegard/git/gcc/gcc/cp/parser.c:26874
0xfc7c5b cp_parser_explicit_template_declaration
/home/vegard/git/gcc/gcc/cp/parser.c:27112
0xfc7c5b cp_parser_template_declaration_after_export
/home/vegard/git/gcc/gcc/cp/parser.c:27130
0x10029c1 cp_parser_declaration
/home/vegard/git/gcc/gcc/cp/parser.c:12727
0xff9d9b cp_parser_declaration_seq_opt
/home/vegard/git/gcc/gcc/cp/parser.c:12654
0xffb3c3 cp_parser_translation_unit
/home/vegard/git/gcc/gcc/cp/parser.c:4561
0xffb3c3 c_parse_file()
/home/vegard/git/gcc/gcc/cp/parser.c:38993
0x15a7105 c_common_parse_file()
/home/vegard/git/gcc/gcc/c-family/c-opts.c:1132

$ xgcc --version
xgcc (GCC) 8.0.1 20180303 (experimental)

Built from git 0d86c284d085d29782d862600a79aa1ff0ee0c47 (r258221).

7.3.0 says:

:4:14: error: ISO C++ forbids declaration of 'b' with no type
[-fpermissive]
   friend b<>();
  ^
:5:2: error: expected ';' after struct definition
 }
  ^
  ;
Compiler returned: 1

Test case was minimised by C-Reduce.

[Bug fortran/66128] ICE for some intrinsics with zero sized array parameter

2018-03-03 Thread tkoenig at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66128

Thomas Koenig  changed:

   What|Removed |Added

 Status|RESOLVED|NEW
 CC||tkoenig at gcc dot gnu.org
 Resolution|FIXED   |---

--- Comment #11 from Thomas Koenig  ---
According to your mail at (In reply to kargl from comment #10)

> Closing as fixed.

https://gcc.gnu.org/ml/fortran/2018-03/msg00010.html still shows a few
tests that fail.

Let's keep this PR open to track these.

[Bug c++/83817] [7 Regression] internal compiler error: tree check: expected call_expr, have aggr_init_expr in tsubst_copy_and_build, at cp/pt.c:17822

2018-03-03 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83817

Jakub Jelinek  changed:

   What|Removed |Added

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

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

[Bug target/83930] [6 Regression] ICE: RTL check: expected code 'const_int', have 'mem' in simplify_binary_operation_1, at simplify-rtx.c:3302

2018-03-03 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83930

Jakub Jelinek  changed:

   What|Removed |Added

Summary|[6/7 Regression] ICE: RTL   |[6 Regression] ICE: RTL
   |check: expected code|check: expected code
   |'const_int', have 'mem' in  |'const_int', have 'mem' in
   |simplify_binary_operation_1 |simplify_binary_operation_1
   |, at simplify-rtx.c:3302|, at simplify-rtx.c:3302

--- Comment #7 from Jakub Jelinek  ---
Fixed also for 7.4+.

[Bug tree-optimization/83605] [6 Regression] ICE: verify_gimple failed (error: dead STMT in EH table)

2018-03-03 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83605

Jakub Jelinek  changed:

   What|Removed |Added

Summary|[6/7 Regression] ICE:   |[6 Regression] ICE:
   |verify_gimple failed|verify_gimple failed
   |(error: dead STMT in EH |(error: dead STMT in EH
   |table)  |table)

--- Comment #7 from Jakub Jelinek  ---
Fixed also for 7.4+.

[Bug c++/83824] [6 Regression] ICE on invalid C++ code with alignas: in chainon, at tree.c:3037

2018-03-03 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83824

Jakub Jelinek  changed:

   What|Removed |Added

Summary|[6/7 Regression] ICE on |[6 Regression] ICE on
   |invalid C++ code with   |invalid C++ code with
   |alignas: in chainon, at |alignas: in chainon, at
   |tree.c:3037 |tree.c:3037

--- Comment #6 from Jakub Jelinek  ---
Fixed also for 7.4+.

[Bug middle-end/83945] [7 Regression] internal compiler error: Segmentation fault with -O -fcode-hoisting

2018-03-03 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83945

Jakub Jelinek  changed:

   What|Removed |Added

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

--- Comment #10 from Jakub Jelinek  ---
Fixed also for 7.4+.

[Bug c++/83958] [7 Regression] ICE: Segmentation fault (in find_decomp_class_base)

2018-03-03 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83958

Jakub Jelinek  changed:

   What|Removed |Added

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

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

[Bug c++/84031] structured binding unpacks nameless padding bitfields

2018-03-03 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84031

Jakub Jelinek  changed:

   What|Removed |Added

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

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

[Bug target/83986] [6 Regression] ICE in maybe_record_trace_start, at dwarf2cfi.c:2348

2018-03-03 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83986

Jakub Jelinek  changed:

   What|Removed |Added

Summary|[6/7 Regression] ICE in |[6 Regression] ICE in
   |maybe_record_trace_start,   |maybe_record_trace_start,
   |at dwarf2cfi.c:2348 |at dwarf2cfi.c:2348

--- Comment #7 from Jakub Jelinek  ---
Fixed for 7.4+ too.

[Bug fortran/84116] [7 Regression] ICE in gfc_match_omp_clauses, at fortran/openmp.c:1354

2018-03-03 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84116

Jakub Jelinek  changed:

   What|Removed |Added

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

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

[Bug c++/55004] [meta-bug] constexpr issues

2018-03-03 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=55004
Bug 55004 depends on bug 83993, which changed state.

Bug 83993 Summary: [7 Regression] ICE: constant not recomputed when ADDR_EXPR 
changed
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83993

   What|Removed |Added

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

[Bug c++/83993] [7 Regression] ICE: constant not recomputed when ADDR_EXPR changed

2018-03-03 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83993

Jakub Jelinek  changed:

   What|Removed |Added

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

--- Comment #11 from Jakub Jelinek  ---
Fixed also for 7.4+.

[Bug preprocessor/69869] [6 Regression] internal compiler error: Segmentation fault in call to skip_macro_block_comment when using '-traditional-cpp'

2018-03-03 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69869

Jakub Jelinek  changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution|--- |FIXED
Summary|[6/7 Regression] internal   |[6 Regression] internal
   |compiler error: |compiler error:
   |Segmentation fault in call  |Segmentation fault in call
   |to skip_macro_block_comment |to skip_macro_block_comment
   |when using  |when using
   |'-traditional-cpp'  |'-traditional-cpp'

--- Comment #11 from Jakub Jelinek  ---
Fixed also for 7.4+.

[Bug tree-optimization/81661] [7 Regression] ICE in gimplify_modify_expr, at gimplify.c:5638

2018-03-03 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81661

Jakub Jelinek  changed:

   What|Removed |Added

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

--- Comment #12 from Jakub Jelinek  ---
Fixed for 7.4+.

[Bug c++/84596] [8 Regression] internal compiler error: unexpected expression '(bool)c' of kind implicit_conv_expr (cxx_eval_constant_expression)

2018-03-03 Thread vegard.nossum at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84596

--- Comment #6 from Vegard Nossum  ---
I see a similar ICE on r258221 using this test case:

template
struct a {
  constexpr int b() {
int c;
static_assert(c %= 1);
  }
};

Output:

$ xgcc -x c++ -S -
: In member function 'constexpr int a::b()':
:5:21: error: non-constant condition for static assertion
:5:21: internal compiler error: unexpected expression '(bool)c %=1' of
kind implicit_conv_expr
0xa3cfab cxx_eval_constant_expression
/home/vegard/git/gcc/gcc/cp/constexpr.c:4770
0xa4de8a cxx_eval_outermost_constant_expr
/home/vegard/git/gcc/gcc/cp/constexpr.c:4830
0x12a6a7d finish_static_assert(tree_node*, tree_node*, unsigned int, bool)
/home/vegard/git/gcc/gcc/cp/semantics.c:8678
0xed0a31 cp_parser_static_assert
/home/vegard/git/gcc/gcc/cp/parser.c:13947
0xfb0b11 cp_parser_block_declaration
/home/vegard/git/gcc/gcc/cp/parser.c:12877
0xfb2094 cp_parser_declaration_statement
/home/vegard/git/gcc/gcc/cp/parser.c:12474
0xefef9b cp_parser_statement
/home/vegard/git/gcc/gcc/cp/parser.c:10923
0xf02a5b cp_parser_statement_seq_opt
/home/vegard/git/gcc/gcc/cp/parser.c:11272
0xf034fa cp_parser_compound_statement
/home/vegard/git/gcc/gcc/cp/parser.c:11226
0xf96a6b cp_parser_function_body
/home/vegard/git/gcc/gcc/cp/parser.c:21776
0xf96a6b cp_parser_ctor_initializer_opt_and_function_body
/home/vegard/git/gcc/gcc/cp/parser.c:21811
0xf9fc75 cp_parser_function_definition_after_declarator
/home/vegard/git/gcc/gcc/cp/parser.c:26816
0xfa1f3c cp_parser_late_parsing_for_member
/home/vegard/git/gcc/gcc/cp/parser.c:27697
0xf1c0e5 cp_parser_class_specifier_1
/home/vegard/git/gcc/gcc/cp/parser.c:22740
0xf2763b cp_parser_class_specifier
/home/vegard/git/gcc/gcc/cp/parser.c:22766
0xf2763b cp_parser_type_specifier
/home/vegard/git/gcc/gcc/cp/parser.c:16772
0xf8c7ba cp_parser_decl_specifier_seq
/home/vegard/git/gcc/gcc/cp/parser.c:13627
0xfa6ddf cp_parser_single_declaration
/home/vegard/git/gcc/gcc/cp/parser.c:27185
0xfc9658 cp_parser_template_declaration_after_parameters
/home/vegard/git/gcc/gcc/cp/parser.c:26874
0xfc7c5b cp_parser_explicit_template_declaration
/home/vegard/git/gcc/gcc/cp/parser.c:27112

[Bug c++/84082] [7 Regression] ICE with broken template function definition

2018-03-03 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84082

Jakub Jelinek  changed:

   What|Removed |Added

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

--- Comment #9 from Jakub Jelinek  ---
Fixed also for 7.4+.

[Bug c++/83659] [7 Regression] ICE on compilable C++ code: in tree_to_shwi, at tree.c:6821

2018-03-03 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83659

Jakub Jelinek  changed:

   What|Removed |Added

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

--- Comment #6 from Jakub Jelinek  ---
Fixed also for 7.4+.

[Bug sanitizer/84285] Fail to statically link with -fsanitize=undefined

2018-03-03 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84285

Jakub Jelinek  changed:

   What|Removed |Added

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

--- Comment #8 from Jakub Jelinek  ---
Fixed also for 7.4+.

[Bug rtl-optimization/84308] [7 Regression] Memory leak in spread_components

2018-03-03 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84308

Jakub Jelinek  changed:

   What|Removed |Added

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

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

[Bug sanitizer/83987] [6 Regression] ICE with OpenMP, sanitizer and virtual bases

2018-03-03 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83987

Jakub Jelinek  changed:

   What|Removed |Added

Summary|[6/7 Regression] ICE with   |[6 Regression] ICE with
   |OpenMP, sanitizer and   |OpenMP, sanitizer and
   |virtual bases   |virtual bases

--- Comment #12 from Jakub Jelinek  ---
Fixed also for 7.4+.

[Bug c++/84341] [6 Regression] ICE with #pragma omp atomic

2018-03-03 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84341

Jakub Jelinek  changed:

   What|Removed |Added

Summary|[6/7 Regression] ICE with   |[6 Regression] ICE with
   |#pragma omp atomic  |#pragma omp atomic

--- Comment #5 from Jakub Jelinek  ---
Fixed also for 7.4+.

[Bug c++/84192] [7 Regression] ICE with statement expression

2018-03-03 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84192

Jakub Jelinek  changed:

   What|Removed |Added

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

--- Comment #7 from Jakub Jelinek  ---
Fixed for 7.4+.

[Bug c/82210] [6 Regression] Having _Alignas in a struct with VLAs causes writing to one array to overwrite another

2018-03-03 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82210

Jakub Jelinek  changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution|--- |FIXED
Summary|[6/7 Regression] Having |[6 Regression] Having
   |_Alignas in a struct with   |_Alignas in a struct with
   |VLAs causes writing to one  |VLAs causes writing to one
   |array to overwrite another  |array to overwrite another

--- Comment #16 from Jakub Jelinek  ---
Fixed also for 7.4+.

[Bug c++/84430] [7 Regression] ICE with #pragma omp simd in lambda

2018-03-03 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84430

Jakub Jelinek  changed:

   What|Removed |Added

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

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

[Bug fortran/84418] ICE with fortran OpenMP linear (ref ()) clause

2018-03-03 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84418

Jakub Jelinek  changed:

   What|Removed |Added

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

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

[Bug fortran/66128] ICE for some intrinsics with zero sized array parameter

2018-03-03 Thread kargl at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66128

kargl at gcc dot gnu.org changed:

   What|Removed |Added

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

--- Comment #10 from kargl at gcc dot gnu.org ---
Fixed on trunk.  The patch does not apply cleaning to branch-7
due to changes in minval max maxval simplification changes.
Closing as fixed.

Thanks for the bug report.

[Bug c++/84448] [6 Regression] ICE with broken condition in parallel for loop

2018-03-03 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84448

Jakub Jelinek  changed:

   What|Removed |Added

Summary|[6/7 Regression] ICE with   |[6 Regression] ICE with
   |broken condition in |broken condition in
   |parallel for loop   |parallel for loop

--- Comment #5 from Jakub Jelinek  ---
Fixed also for 7.4+.

[Bug c++/84445] [7 Regression] ICE with __builtin_launder and virtual function

2018-03-03 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84445

Jakub Jelinek  changed:

   What|Removed |Added

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

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

[Bug c++/84444] ICE with __builtin_launder and cast

2018-03-03 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=8

Jakub Jelinek  changed:

   What|Removed |Added

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

--- Comment #7 from Jakub Jelinek  ---
.

[Bug c++/84449] [7 Regression] ICE with constexpr and deleted destructor

2018-03-03 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84449

Jakub Jelinek  changed:

   What|Removed |Added

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

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

[Bug c++/84444] ICE with __builtin_launder and cast

2018-03-03 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=8

Jakub Jelinek  changed:

   What|Removed |Added

   Target Milestone|--- |7.4

--- Comment #6 from Jakub Jelinek  ---
Fixed for 7.4+.

[Bug tree-optimization/84503] [7 Regression] store-merging miscompilation on powerpc64 with -O3 since r241789

2018-03-03 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84503

Jakub Jelinek  changed:

   What|Removed |Added

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

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

[Bug c++/84557] ICE with invalid firstprivate variable

2018-03-03 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84557

Jakub Jelinek  changed:

   What|Removed |Added

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

--- Comment #5 from Jakub Jelinek  ---
Fixed for 7.4+.

[Bug c++/84558] [6 Regression] ICE with invalid constexpr constructor

2018-03-03 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84558

Jakub Jelinek  changed:

   What|Removed |Added

Summary|[6/7 Regression] ICE with   |[6 Regression] ICE with
   |invalid constexpr   |invalid constexpr
   |constructor |constructor

--- Comment #6 from Jakub Jelinek  ---
Fixed also for 7.4+.

[Bug ipa/84628] attribute(warning/error) functions should not be merged together

2018-03-03 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84628

Jakub Jelinek  changed:

   What|Removed |Added

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

--- Comment #13 from Jakub Jelinek  ---
Fixed for 7.4+.

[Bug inline-asm/84625] [6 Regression] ICE with empty constraint and vector constant

2018-03-03 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84625

Jakub Jelinek  changed:

   What|Removed |Added

Summary|[6/7 Regression] ICE with   |[6 Regression] ICE with
   |empty constraint and vector |empty constraint and vector
   |constant|constant

--- Comment #7 from Jakub Jelinek  ---
Fixed also for 7.4+.

[Bug middle-end/84603] -finline-limit not accepted in attribute and #pragma optimize

2018-03-03 Thread msebor at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84603

Martin Sebor  changed:

   What|Removed |Added

 Status|NEW |ASSIGNED

[Bug fortran/66128] ICE for some intrinsics with zero sized array parameter

2018-03-03 Thread kargl at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66128

--- Comment #9 from kargl at gcc dot gnu.org ---
Author: kargl
Date: Sat Mar  3 19:59:54 2018
New Revision: 258224

URL: https://gcc.gnu.org/viewcvs?rev=258224=gcc=rev
Log:
2018-03-03  Steven G. Kargl  

PR fortran/66128
* gfortran.dg/zero_sized_8.f90: Really commit new test.

Added:
trunk/gcc/testsuite/gfortran.dg/zero_sized_8.f90
Modified:
trunk/gcc/testsuite/ChangeLog

[Bug middle-end/84603] -finline-limit not accepted in attribute and #pragma optimize

2018-03-03 Thread msebor at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84603

Martin Sebor  changed:

   What|Removed |Added

 Status|RESOLVED|NEW
 Resolution|INVALID |---

--- Comment #6 from Martin Sebor  ---
I disagree with resolving this report as invalid.  If the option is deprecated
at a minimum the manual, if not GCC itself, should say so.  Otheriwse, if it
isn't deprecated but cannot be made to work in attribute/#pragma, the manual
should explain that and, ideally, GCC should mention that in the text of the
warning it prints.  Let me prepare a patch with one of these solutions.

[Bug fortran/66128] ICE for some intrinsics with zero sized array parameter

2018-03-03 Thread kargl at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66128

--- Comment #8 from kargl at gcc dot gnu.org ---
Author: kargl
Date: Sat Mar  3 19:49:20 2018
New Revision: 258223

URL: https://gcc.gnu.org/viewcvs?rev=258223=gcc=rev
Log:
2018-03-03  Steven G. Kargl  

PR fortran/66128
* simplify.c (is_size_zero_array): New function to check for size
zero array.
(gfc_simplify_all, gfc_simplify_any, gfc_simplify_count, 
 gfc_simplify_iall, gfc_simplify_iany, gfc_simplify_iparity,
 gfc_simplify_minval, gfc_simplify_maxval, gfc_simplify_norm2,
 gfc_simplify_product, gfc_simplify_sum): Use it, and implement
requirements from F2018.

2018-03-03  Steven G. Kargl  

PR fortran/66128
* gfortran.dg/zero_sized_8.f90: New test.

Modified:
trunk/gcc/fortran/ChangeLog
trunk/gcc/fortran/simplify.c
trunk/gcc/testsuite/ChangeLog

[Bug fortran/84693] New: scalar DT not broadcast across an array in an initialization expression

2018-03-03 Thread kargl at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84693

Bug ID: 84693
   Summary: scalar DT not broadcast across an array in an
initialization expression
   Product: gcc
   Version: unknown
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: fortran
  Assignee: unassigned at gcc dot gnu.org
  Reporter: kargl at gcc dot gnu.org
  Target Milestone: ---

This code 

program foo
   type t
  integer :: z
   end type t
   type(t), parameter :: s(5) = t(42)
   if (any(s%z /= 42)) stop 1
end

gives



gfc -c a.f90
f951: internal compiler error: Segmentation fault
0x86f2f5a crash_signal
../../gcc/gcc/toplev.c:325
0x8efb604 splay_tree_min
../../gcc/libiberty/splay-tree.c:484
0x81f61c3 gfc_constructor_first(splay_tree_s*)
../../gcc/gcc/fortran/constructor.c:234
0x821413a find_component_ref
../../gcc/gcc/fortran/expr.c:1356
0x821413a simplify_const_ref
../../gcc/gcc/fortran/expr.c:1795
0x8214494 simplify_const_ref
../../gcc/gcc/fortran/expr.c:1740
0x8214ca3 gfc_simplify_expr(gfc_expr*, int)
../../gcc/gcc/fortran/expr.c:2004
0x8214dab simplify_parameter_variable
../../gcc/gcc/fortran/expr.c:1869
0x8214c8c gfc_simplify_expr(gfc_expr*, int)
../../gcc/gcc/fortran/expr.c:1976
0x8214789 simplify_intrinsic_op
../../gcc/gcc/fortran/expr.c:1105
0x8214789 gfc_simplify_expr(gfc_expr*, int)
../../gcc/gcc/fortran/expr.c:1965
0x827c748 resolve_operator
../../gcc/gcc/fortran/resolve.c:4158
0x827c748 gfc_resolve_expr(gfc_expr*)
../../gcc/gcc/fortran/resolve.c:6702
0x827e203 resolve_actual_arglist
../../gcc/gcc/fortran/resolve.c:2050
0x827e8de resolve_function
../../gcc/gcc/fortran/resolve.c:3123
0x827c0ac gfc_resolve_expr(gfc_expr*)
../../gcc/gcc/fortran/resolve.c:6709
0x828335b gfc_resolve_blocks(gfc_code*, gfc_namespace*)
../../gcc/gcc/fortran/resolve.c:10009
0x8274287 gfc_resolve_code(gfc_code*, gfc_namespace*)
../../gcc/gcc/fortran/resolve.c:11074
0x82771a4 resolve_codes
../../gcc/gcc/fortran/resolve.c:16512
0x827721e gfc_resolve(gfc_namespace*)
../../gcc/gcc/fortran/resolve.c:16547

[Bug fortran/84693] scalar DT not broadcast across an array in an initialization expression

2018-03-03 Thread kargl at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84693

kargl at gcc dot gnu.org changed:

   What|Removed |Added

   Priority|P3  |P4
 Status|UNCONFIRMED |NEW
   Last reconfirmed||2018-03-03
   Target Milestone|--- |7.4
 Ever confirmed|0   |1

[Bug fortran/31237] [meta-bug] TRANSFER intrinsic

2018-03-03 Thread kargl at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=31237
Bug 31237 depends on bug 51434, which changed state.

Bug 51434 Summary: ICE with scalar init of an array parameter, used in DT 
default init with transfer
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=51434

   What|Removed |Added

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

[Bug fortran/51434] ICE with scalar init of an array parameter, used in DT default init with transfer

2018-03-03 Thread kargl at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=51434

kargl at gcc dot gnu.org changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |FIXED
   Target Milestone|6.5 |7.4

--- Comment #24 from kargl at gcc dot gnu.org ---
Fixed on 7-branch and trunk.  Thanks for bug reports.

The code in comment #13 still dies with an ICE, but
it is not a problem with TRANSFER.  gfortran seems to
have an issue with broadcasting a scalar derive type
across the elements of an array of derived type in
an initialization expression.  I'll a new PR for this.

[Bug fortran/51434] ICE with scalar init of an array parameter, used in DT default init with transfer

2018-03-03 Thread kargl at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=51434

--- Comment #23 from kargl at gcc dot gnu.org ---
Author: kargl
Date: Sat Mar  3 19:02:28 2018
New Revision: 258222

URL: https://gcc.gnu.org/viewcvs?rev=258222=gcc=rev
Log:
2018-03-03  Steven G. Kargl  

PR fortran/51434
* simplify.c (gfc_simplify_transfer): Resolve mold.

2018-03-03  Steven G. Kargl  

PR fortran/51434
* gfortran.dg/pr51434.f90: New test.

Added:
branches/gcc-7-branch/gcc/testsuite/gfortran.dg/pr51434.f90
Modified:
branches/gcc-7-branch/gcc/fortran/ChangeLog
branches/gcc-7-branch/gcc/fortran/simplify.c
branches/gcc-7-branch/gcc/testsuite/ChangeLog

[Bug fortran/84594] Warning: Use of the NUMERIC_STORAGE_SIZE named constant from intrinsic module ISO_FORTRAN_ENV at (1) is incompatible with option -fdefault-integer-8

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

Dominique d'Humieres  changed:

   What|Removed |Added

 Status|NEW |ASSIGNED
   Assignee|unassigned at gcc dot gnu.org  |dominiq at lps dot 
ens.fr

--- Comment #6 from Dominique d'Humieres  ---
Taking the fix to add -fdefault-real-10 -fdefault-real-16 in module.c and the
doc change.

[Bug fortran/80009] Printing/writing a structure with a real edit descriptor.

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

Dominique d'Humieres  changed:

   What|Removed |Added

 Status|NEW |ASSIGNED

[Bug libfortran/78549] Very slow formatted internal file output

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

Dominique d'Humieres  changed:

   What|Removed |Added

 Status|NEW |ASSIGNED

[Bug fortran/66709] ICE on formatted io with parameter array specifier fmt

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

Dominique d'Humieres  changed:

   What|Removed |Added

 Status|NEW |ASSIGNED

[Bug fortran/69497] ICE in gfc_free_namespace, at fortran/symbol.c:3701

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

Dominique d'Humieres  changed:

   What|Removed |Added

 Status|NEW |ASSIGNED

[Bug fortran/66499] Letters with accents change format behavior for X and T descriptors.

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

Dominique d'Humieres  changed:

   What|Removed |Added

 Status|NEW |ASSIGNED

[Bug fortran/66310] Problems with intrinsic repeat for large number of copies

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

Dominique d'Humieres  changed:

   What|Removed |Added

 Status|NEW |ASSIGNED

[Bug fortran/38573] Missing markers for translation

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

Dominique d'Humieres  changed:

   What|Removed |Added

 Status|NEW |ASSIGNED

[Bug fortran/83829] Implement runtime checks for DT format specifier and allignment with effective items

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

Dominique d'Humieres  changed:

   What|Removed |Added

 Status|UNCONFIRMED |ASSIGNED
   Last reconfirmed||2018-03-03
 Ever confirmed|0   |1

[Bug c++/60230] internal compiler error on lambdas capturing multidimensional arrays with dynamic boundary

2018-03-03 Thread paolo.carlini at oracle dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=60230

Paolo Carlini  changed:

   What|Removed |Added

 CC||jason at gcc dot gnu.org,
   ||paolo.carlini at oracle dot com

--- Comment #6 from Paolo Carlini  ---
Jason, in 8, at variance with 7, for this testcase and its Dups we issue a
proper error message mentioning N3639 and no ICE. I think we can resolve the
bug, right?

[Bug c++/61358] Bogus "duplicate label" error after label used within C++11 lambda

2018-03-03 Thread paolo.carlini at oracle dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61358

Paolo Carlini  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 CC|paolo.carlini at oracle dot com|
 Resolution|--- |FIXED
   Target Milestone|--- |8.0

--- Comment #4 from Paolo Carlini  ---
Fixed in trunk.

[Bug c++/54367] [meta-bug] lambda expressions

2018-03-03 Thread paolo.carlini at oracle dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=54367
Bug 54367 depends on bug 61358, which changed state.

Bug 61358 Summary: Bogus "duplicate label" error after label used within C++11 
lambda
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61358

   What|Removed |Added

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

[Bug fortran/51434] ICE with scalar init of an array parameter, used in DT default init with transfer

2018-03-03 Thread kargl at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=51434

--- Comment #22 from kargl at gcc dot gnu.org ---
Author: kargl
Date: Sat Mar  3 18:20:32 2018
New Revision: 258220

URL: https://gcc.gnu.org/viewcvs?rev=258220=gcc=rev
Log:
2018-03-03  Steven G. Kargl  

PR fortran/51434
* simplify.c (gfc_simplify_transfer): Resolve mold.

2018-03-03  Steven G. Kargl  

PR fortran/51434
* gfortran.dg/pr51434.f90: New test.

Added:
trunk/gcc/testsuite/gfortran.dg/pr51434.f90
Modified:
trunk/gcc/fortran/ChangeLog
trunk/gcc/fortran/simplify.c
trunk/gcc/testsuite/ChangeLog

[Bug c++/61358] Bogus "duplicate label" error after label used within C++11 lambda

2018-03-03 Thread paolo at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61358

--- Comment #3 from paolo at gcc dot gnu.org  ---
Author: paolo
Date: Sat Mar  3 18:18:25 2018
New Revision: 258219

URL: https://gcc.gnu.org/viewcvs?rev=258219=gcc=rev
Log:
2018-03-03  Paolo Carlini  

PR c++/61358
* g++.dg/cpp0x/lambda/lambda-61358.C: New.

Added:
trunk/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-61358.C
Modified:
trunk/gcc/testsuite/ChangeLog

[Bug c++/81575] [7/8 Regression] ICE on C++ code: in cp_build_addr_expr_1, at cp/typeck.c:5793

2018-03-03 Thread vegard.nossum at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81575

Vegard Nossum  changed:

   What|Removed |Added

 CC||vegard.nossum at gmail dot com

--- Comment #4 from Vegard Nossum  ---
If it helps, this is a different reproducer that gives the exact same stack
trace on 8.0.1:

template  int(b) {
  [] { int a(a %= "") }
}

[Bug c++/54367] [meta-bug] lambda expressions

2018-03-03 Thread paolo.carlini at oracle dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=54367
Bug 54367 depends on bug 67370, which changed state.

Bug 67370 Summary: Invalid "parameter packs not expanded" error in lambda 
capture
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67370

   What|Removed |Added

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

[Bug c++/67370] Invalid "parameter packs not expanded" error in lambda capture

2018-03-03 Thread paolo.carlini at oracle dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67370

Paolo Carlini  changed:

   What|Removed |Added

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

--- Comment #4 from Paolo Carlini  ---
Fixed in trunk.

[Bug c++/67370] Invalid "parameter packs not expanded" error in lambda capture

2018-03-03 Thread paolo at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67370

--- Comment #3 from paolo at gcc dot gnu.org  ---
Author: paolo
Date: Sat Mar  3 18:09:27 2018
New Revision: 258218

URL: https://gcc.gnu.org/viewcvs?rev=258218=gcc=rev
Log:
2018-03-03  Paolo Carlini  

PR c++/67370
* g++.dg/cpp0x/lambda/lambda-67370.C: New.

Added:
trunk/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-67370.C
Modified:
trunk/gcc/testsuite/ChangeLog

[Bug fortran/78990] [6/7/8 Regression] ICE when assigning polymorphic array function result

2018-03-03 Thread pault at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78990

Paul Thomas  changed:

   What|Removed |Added

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

--- Comment #8 from Paul Thomas  ---
Fixed on all three branches.

Thanks for the report.

Paul

[Bug fortran/78990] [6/7/8 Regression] ICE when assigning polymorphic array function result

2018-03-03 Thread pault at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78990

--- Comment #7 from Paul Thomas  ---
Author: pault
Date: Sat Mar  3 18:00:39 2018
New Revision: 258217

URL: https://gcc.gnu.org/viewcvs?rev=258217=gcc=rev
Log:
2018-03-03  Paul Thomas  

PR fortran/78990
* expr.c (gfc_is_class_array_function): Renamed from
'gfc_is_alloc_class_array_function' and modified to return true
for pointers as well as allocatable results.
* gfortran.h : Change of name for prototype of above function.
* trans-array.c (gfc_add_loop_ss_code): Force finalization of
class array results.
(build_class_array_ref): Change assertion into a condition.
(build_class_array_ref): Set the se class_vptr for class array
function results.
(gfc_walk_function_expr): Reference gfc_is_class_array_function
as above.
* trans-decl.c (get_proc_result): Move it up before
gfc_trans_deferred_vars.
(gfc_trans_deferred_vars): Nullify explicit return class arrays
on entry.
* trans-expr.c (gfc_conv_class_to_class): Allow conversion of
class array functions that have an se class_vptr and use it
for the result vptr.
(gfc_conv_subref_array_arg): Rename reference to the above
function.
(gfc_conv_procedure_call): Ditto. Add the se pre block to the
loop pre block before the function is evaluated. Do not
finalize class pointer results.
(arrayfunc_assign_needs_temporary, gfc_trans_assignment_1) More
renamed references.
* trans-intrinsic.c (gfc_conv_intrinsic_size): Ditto.

2018-03-03  Paul Thomas  

PR fortran/78990
* gfortran.dg/class_67.f90: New test.


Added:
branches/gcc-6-branch/gcc/testsuite/gfortran.dg/class_67.f90
Modified:
branches/gcc-6-branch/gcc/fortran/ChangeLog
branches/gcc-6-branch/gcc/fortran/expr.c
branches/gcc-6-branch/gcc/fortran/gfortran.h
branches/gcc-6-branch/gcc/fortran/resolve.c
branches/gcc-6-branch/gcc/fortran/trans-array.c
branches/gcc-6-branch/gcc/fortran/trans-decl.c
branches/gcc-6-branch/gcc/fortran/trans-expr.c
branches/gcc-6-branch/gcc/fortran/trans-intrinsic.c
branches/gcc-6-branch/gcc/testsuite/ChangeLog

[Bug c++/71464] [6/7 Regression] ICE on invalid code (with redeclared constructor) at -Os: Segmentation fault

2018-03-03 Thread paolo.carlini at oracle dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71464

Paolo Carlini  changed:

   What|Removed |Added

 Status|NEW |ASSIGNED
   Assignee|unassigned at gcc dot gnu.org  |paolo.carlini at oracle 
dot com
Summary|[6/7/8 Regression] ICE on   |[6/7 Regression] ICE on
   |invalid code (with  |invalid code (with
   |redeclared constructor) at  |redeclared constructor) at
   |-Os: Segmentation fault |-Os: Segmentation fault

--- Comment #4 from Paolo Carlini  ---
Fixed in trunk.

[Bug c++/71464] [6/7/8 Regression] ICE on invalid code (with redeclared constructor) at -Os: Segmentation fault

2018-03-03 Thread paolo at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71464

--- Comment #3 from paolo at gcc dot gnu.org  ---
Author: paolo
Date: Sat Mar  3 17:48:23 2018
New Revision: 258216

URL: https://gcc.gnu.org/viewcvs?rev=258216=gcc=rev
Log:
/cp
2018-03-03  Paolo Carlini  

PR c++/71464
* optimize.c (maybe_thunk_body): Bail out immediately if either
fns[0] or fns[1] is null.

/testsuite
2018-03-03  Paolo Carlini  

PR c++/71464
* g++.dg/torture/pr71464.C: New.

Added:
trunk/gcc/testsuite/g++.dg/torture/pr71464.C
Modified:
trunk/gcc/cp/ChangeLog
trunk/gcc/cp/optimize.c
trunk/gcc/testsuite/ChangeLog

[Bug c++/84689] is_invocable is true even for call operator via ambiguous base

2018-03-03 Thread rs2740 at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84689

TC  changed:

   What|Removed |Added

 CC||rs2740 at gmail dot com

--- Comment #1 from TC  ---
With library dependency removed:

struct base {
void operator()(int ) { }
};

struct a : base { };
struct b : base { };

struct f: a, b {
using a::operator();
using b::operator();
};

template auto g(int) -> decltype(T()(0), 0);
template auto g(...) -> long;

template struct Same;
template struct Same {};

Same s;

Accepted by clang, rejected by gcc, who thinks that decltype(g(0)) is int.

[Bug fortran/80965] [7/8 Regression] ICE with class argument and -O2 optimization

2018-03-03 Thread pault at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80965

Paul Thomas  changed:

   What|Removed |Added

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

--- Comment #8 from Paul Thomas  ---
I completely forgot about this one - sorry.

Fixed on 7-branch and trunk.

Thanks for the report.

Paul

[Bug fortran/80965] [7/8 Regression] ICE with class argument and -O2 optimization

2018-03-03 Thread pault at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80965

--- Comment #7 from Paul Thomas  ---
Author: pault
Date: Sat Mar  3 16:33:17 2018
New Revision: 258213

URL: https://gcc.gnu.org/viewcvs?rev=258213=gcc=rev
Log:
2018-03-03  Paul Thomas  

PR fortran/80965
* resolve.c (build_loc_call): Change symtree name from 'loc' to
'_loc'.

2018-03-03  Paul Thomas  

PR fortran/80965
* gfortran.dg/select_type_41.f90: New test.


Added:
branches/gcc-7-branch/gcc/testsuite/gfortran.dg/select_type_41.f90
Modified:
branches/gcc-7-branch/gcc/fortran/ChangeLog
branches/gcc-7-branch/gcc/fortran/resolve.c
branches/gcc-7-branch/gcc/fortran/trans-expr.c
branches/gcc-7-branch/gcc/testsuite/ChangeLog

[Bug c++/84692] Class template argument deduction ICE for template's member template

2018-03-03 Thread colu...@gmx-topmail.de
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84692

--- Comment #2 from Robert Haberlach  ---
And furthermore, I forgot to paste the correct compiler output, as the above
was yielded before I shortened the names:

prog.cc: In substitution of 'template Y(U, const Ts& ...)-> X::Y [with U = 128]':
prog.cc:9:7:   required from 'void begin(X)'
prog.cc:14:17:   required from here
prog.cc:9:7: internal compiler error: in tsubst, at cp/pt.c:13992
   Y{0, Ts{}...};

[Bug c++/84692] Class template argument deduction ICE for template's member template

2018-03-03 Thread colu...@gmx-topmail.de
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84692

--- Comment #1 from Robert Haberlach  ---
Btw. begin being a friend is irrelevant, it can also be a non-static or static
member.

[Bug fortran/78990] [6/7/8 Regression] ICE when assigning polymorphic array function result

2018-03-03 Thread pault at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78990

--- Comment #6 from Paul Thomas  ---
Author: pault
Date: Sat Mar  3 16:26:49 2018
New Revision: 258212

URL: https://gcc.gnu.org/viewcvs?rev=258212=gcc=rev
Log:
2018-03-03  Paul Thomas  

PR fortran/78990
* expr.c (gfc_is_class_array_function): Renamed from
'gfc_is_alloc_class_array_function' and modified to return true
for pointers as well as allocatable results.
* gfortran.h : Change of name for prototype of above function.
* trans-array.c (gfc_add_loop_ss_code): Force finalization of
class array results.
(build_class_array_ref): Change assertion into a condition.
(build_class_array_ref): Set the se class_vptr for class array
function results.
(gfc_walk_function_expr): Reference gfc_is_class_array_function
as above.
* trans-decl.c (get_proc_result): Move it up before
gfc_trans_deferred_vars.
(gfc_trans_deferred_vars): Nullify explicit return class arrays
on entry.
* trans-expr.c (gfc_conv_class_to_class): Allow conversion of
class array functions that have an se class_vptr and use it
for the result vptr.
(gfc_conv_subref_array_arg): Rename reference to the above
function.
(gfc_conv_procedure_call): Ditto. Add the se pre block to the
loop pre block before the function is evaluated. Do not
finalize class pointer results.
(arrayfunc_assign_needs_temporary, gfc_trans_assignment_1) More
renamed references.
* trans-intrinsic.c (gfc_conv_intrinsic_size): Ditto.

2018-03-03  Paul Thomas  

PR fortran/78990
* gfortran.dg/class_67.f90: New test.


Added:
branches/gcc-7-branch/gcc/testsuite/gfortran.dg/class_67.f90
Modified:
branches/gcc-7-branch/gcc/fortran/ChangeLog
branches/gcc-7-branch/gcc/fortran/expr.c
branches/gcc-7-branch/gcc/fortran/gfortran.h
branches/gcc-7-branch/gcc/fortran/resolve.c
branches/gcc-7-branch/gcc/fortran/trans-array.c
branches/gcc-7-branch/gcc/fortran/trans-decl.c
branches/gcc-7-branch/gcc/fortran/trans-expr.c
branches/gcc-7-branch/gcc/fortran/trans-intrinsic.c
branches/gcc-7-branch/gcc/testsuite/ChangeLog

[Bug c++/84692] New: Class template argument deduction ICE for template's member template

2018-03-03 Thread colu...@gmx-topmail.de
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84692

Bug ID: 84692
   Summary: Class template argument deduction ICE for template's
member template
   Product: gcc
   Version: 8.0.1
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c++
  Assignee: unassigned at gcc dot gnu.org
  Reporter: colu...@gmx-topmail.de
  Target Milestone: ---

template 
struct X {
template 
struct Y {
Y(U, Ts const&... );
};

friend void begin(X) {
  Y{0, Ts{}...};
}
};

int main() {
  begin(X{});
}

---

prog.cc: In substitution of 'template iterator(Iter, const Ts&
...)-> incrementing_range::iterator [with Iter = 128]':
prog.cc:9:7:   required from 'void begin(incrementing_range)'
prog.cc:14:34:   required from here
prog.cc:9:7: internal compiler error: in tsubst, at cp/pt.c:13992
   iterator{0, Ts{}...};
   ^~~~

---

I can't reduce this any further. 

Oddly, Clang claims this is ill-formed, while I reckon this should compile,
although I haven't delved into the wording to see what it mandates regarding
template members. Perhaps iterator is treated as the qualified-id X::Y, and the
compilers attempt to deduce Ts, which fails?

[Bug tree-optimization/84650] [8 Regression] [graphite] ICE: Segmentation fault (in create_new_iv)

2018-03-03 Thread amker at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84650

--- Comment #3 from amker at gcc dot gnu.org ---
So given below dump before sccp:

   [local count: 14598063]:

   [local count: 118111601]:
  # eu_19 = PHI <0(2), eu_13(7)>

   [local count: 955630224]:
  # dj.1_18 = PHI <0(3), _1(8)>
  _1 = dj.1_18 + 1;
  if (_1 <= 1)
goto ; [89.00%]
  else
goto ; [11.00%]

   [local count: 850510900]:
  goto ; [100.00%]

   [local count: 118111601]:
  # _2 = PHI <_1(4)>
  _4 = _2 != 3;
  _5 = (unsigned int) _4;
  _15 = 1 - _5;
  eu_13 = _15 + eu_19;
  if (eu_13 <= 1)
goto ; [87.64%]
  else
goto ; [12.36%]

   [local count: 103513538]:
  goto ; [100.00%]

   [local count: 14598063]:
  # _25 = PHI <_2(5)>
  dj = _25;
  return;

before sccp, e_13, _15 and e_19 was identified as:
e_13: {_15, _15}
_15 : _15
e_19: {0, _15}

During sccp, it proves _15 equals to 0 and thus:
e_13: 0
_15 : 0
e_19: {0, _15}

This information is cached and used in ivopts.

[Bug c++/84686] [6/7/8 Regression] Parenthesized discarded value expression are not evaluated with option -std=c++14

2018-03-03 Thread jason at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84686

Jason Merrill  changed:

   What|Removed |Added

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

[Bug c++/84691] New: internal compiler error: in poplevel_class, at cp/name-lookup.c:4430

2018-03-03 Thread vegard.nossum at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84691

Bug ID: 84691
   Summary: internal compiler error: in poplevel_class, at
cp/name-lookup.c:4430
   Product: gcc
   Version: 8.0.1
Status: UNCONFIRMED
  Keywords: ice-on-invalid-code
  Severity: normal
  Priority: P3
 Component: c++
  Assignee: unassigned at gcc dot gnu.org
  Reporter: vegard.nossum at gmail dot com
CC: webrown.cpp at gmail dot com
  Target Milestone: ---

Input:

template
struct a {
  unsigned b = [] {
union {
  friend void c() {}
};
  };
};

Output:

$ xgcc -x c++ -S -
: In lambda function:
:5:21: error: can't define friend function 'c' in a local class
definition
: At global scope:
:5:24: internal compiler error: in poplevel_class, at
cp/name-lookup.c:4430
0xe1ebc7 poplevel_class()
/home/vegard/git/gcc/gcc/cp/name-lookup.c:4430
0x9ccaa8 popclass()
/home/vegard/git/gcc/gcc/cp/class.c:7419
0x9ccaa8 pop_nested_class()
/home/vegard/git/gcc/gcc/cp/class.c:7573
0xbd1380 finish_function(bool)
/home/vegard/git/gcc/gcc/cp/decl.c:15864
0xf9fa39 cp_parser_function_definition_after_declarator
/home/vegard/git/gcc/gcc/cp/parser.c:26812
0xfa1cbc cp_parser_late_parsing_for_member
/home/vegard/git/gcc/gcc/cp/parser.c:27690
0xf1aed5 cp_parser_class_specifier_1
/home/vegard/git/gcc/gcc/cp/parser.c:22733
0xf2642b cp_parser_class_specifier
/home/vegard/git/gcc/gcc/cp/parser.c:22759
0xf2642b cp_parser_type_specifier
/home/vegard/git/gcc/gcc/cp/parser.c:16765
0xf8be5a cp_parser_decl_specifier_seq
/home/vegard/git/gcc/gcc/cp/parser.c:13627
0xfa7a20 cp_parser_simple_declaration
/home/vegard/git/gcc/gcc/cp/parser.c:12936
0xfaf948 cp_parser_block_declaration
/home/vegard/git/gcc/gcc/cp/parser.c:12881
0xfb1e14 cp_parser_declaration_statement
/home/vegard/git/gcc/gcc/cp/parser.c:12474
0xefdd8b cp_parser_statement
/home/vegard/git/gcc/gcc/cp/parser.c:10923
0xf0184b cp_parser_statement_seq_opt
/home/vegard/git/gcc/gcc/cp/parser.c:11272
0xfd36d1 cp_parser_lambda_body
/home/vegard/git/gcc/gcc/cp/parser.c:10683
0xfd36d1 cp_parser_lambda_expression
/home/vegard/git/gcc/gcc/cp/parser.c:10184
0xf38814 cp_parser_primary_expression
/home/vegard/git/gcc/gcc/cp/parser.c:5259
0xf7a2eb cp_parser_postfix_expression
/home/vegard/git/gcc/gcc/cp/parser.c:7028
0xf2e057 cp_parser_unary_expression
/home/vegard/git/gcc/gcc/cp/parser.c:8320

$ xgcc --version
xgcc (GCC) 8.0.1 20180301 (experimental)

Built from git c435a9e730c6e8f10da09d58b4fc9aaeb401b0d5 (r258097).

Seems to have been introduced between 4.6.4 and 4.7.1.

Could be related to bug #84651?

Test case was minimised by C-Reduce.

[Bug libstdc++/84690] New: std::is_invocable not working for ambiguous calls

2018-03-03 Thread vince.rev at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84690

Bug ID: 84690
   Summary: std::is_invocable not working for ambiguous calls
   Product: gcc
   Version: 7.2.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: libstdc++
  Assignee: unassigned at gcc dot gnu.org
  Reporter: vince.rev at gmail dot com
  Target Milestone: ---

Consider the following code:
==
// Preamble
#include 
#include 

// A base class
template 
struct base {void operator()(T){};};

// Two derived classes inheriting from the same base classes
template 
struct derived1: base... {using base::operator()...;};
template 
struct derived2: base... {using base::operator()...;};

// A class inheriting from both derived1 and derived2
template 
struct functor: derived1, derived2 {
using derived1::operator();
using derived2::operator();
};

// Main function
int main() {
std::cout << std::is_invocable_v, int> << "\n";
std::cout << std::is_invocable_v, float> << "\n";
std::cout << std::is_invocable_v, char> << "\n";
return 0;
}
==

The std::is_invocable type trait from the standard library fails to detect that
the first call in the main function is ambiguous. The program returns 1, 1, 1
instead of 0, 1, 1. This seems to be related to
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84689 and to
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80245.

[Bug c++/81976] bad is_standard_layout/has_unique_object_representations results with a chain of empty bases

2018-03-03 Thread romain.geissler at amadeus dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81976

--- Comment #2 from Romain Geissler  ---
Hi,

Note that in the meantime, this was fixed on trunk (gcc 8). I don't know when,
but it was fixed between December 2017 and now, and don't know with which
commit.

Cheers,
Romain

[Bug c++/84689] New: is_invocable is true even for call operator via ambiguous base

2018-03-03 Thread barry.revzin at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84689

Bug ID: 84689
   Summary: is_invocable is true even for call operator via
ambiguous base
   Product: gcc
   Version: 8.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c++
  Assignee: unassigned at gcc dot gnu.org
  Reporter: barry.revzin at gmail dot com
  Target Milestone: ---

This static assert fires on gcc, it does not on clang:

#include 

struct base {
void operator()(int ) { }
};

struct a : base { };
struct b : base { };

struct f: a, b {
using a::operator();
using b::operator();
};

int main() {
static_assert(!std::is_invocable_v);
}

Even though gcc reports f as being invocable with int, attempts to actually
invoke it fail:

int main() {
f{}(4); // error: 'base' is an ambiguous base of 'f'
}

[Bug ipa/84628] attribute(warning/error) functions should not be merged together

2018-03-03 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84628

--- Comment #12 from Jakub Jelinek  ---
Author: jakub
Date: Sat Mar  3 13:43:30 2018
New Revision: 258208

URL: https://gcc.gnu.org/viewcvs?rev=258208=gcc=rev
Log:
Backported from mainline
2018-03-02  Jakub Jelinek  
Richard Biener  

PR ipa/84628
* expr.c (expand_expr_real_1) : Don't emit diagnostics
for error or warning attributes if CALL_FROM_THUNK_P is set.
Formatting fixes.

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

Added:
branches/gcc-7-branch/gcc/testsuite/gcc.dg/pr84628.c
Modified:
branches/gcc-7-branch/gcc/ChangeLog
branches/gcc-7-branch/gcc/expr.c
branches/gcc-7-branch/gcc/testsuite/ChangeLog

[Bug other/12411] GCC depends on undefined ISO C behavior (order of execution)

2018-03-03 Thread egallager at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=12411

Eric Gallager  changed:

   What|Removed |Added

   Keywords||diagnostic
 CC||egallager at gcc dot gnu.org

--- Comment #5 from Eric Gallager  ---
(In reply to Dara Hazeghi from comment #1)
> Confirmed. One example (cited in the thread) is:
> gcc/bb-reorder.c:1056:
> label = emit_label_before (gen_label_rtx (), get_insns ());

(In reply to Manuel López-Ibáñez from comment #3)
> This should be warned by -Wsequence-points.

A reduced testcase based on that line still doesn't warn:

$ cat 12411.c && /usr/local/bin/gcc -c -Wall -Wextra -pedantic -Wsequence-point
12411.c

int gen_label_rtx(void);
int get_insns(void);
int emit_label_before(int, int);

int foo(void)
{
  int label;
  label = emit_label_before(gen_label_rtx(), get_insns());
  return label;
}
$

bb-reorder.c no longer contains the code in question though, so at least this
doesn't affect building gcc itself any longer (hopefully)

[Bug inline-asm/84625] [6/7 Regression] ICE with empty constraint and vector constant

2018-03-03 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84625

--- Comment #6 from Jakub Jelinek  ---
Author: jakub
Date: Sat Mar  3 13:42:40 2018
New Revision: 258207

URL: https://gcc.gnu.org/viewcvs?rev=258207=gcc=rev
Log:
Backported from mainline
2018-03-02  Jakub Jelinek  

PR inline-asm/84625
* config/i386/i386.c (ix86_print_operand): Use conditional
output_operand_lossage instead of gcc_assert if CONST_VECTOR is not
zero vector.

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

Added:
branches/gcc-7-branch/gcc/testsuite/gcc.target/i386/pr84625.c
Modified:
branches/gcc-7-branch/gcc/ChangeLog
branches/gcc-7-branch/gcc/config/i386/i386.c
branches/gcc-7-branch/gcc/testsuite/ChangeLog

[Bug sanitizer/70875] ICE in get_ubsan_type_info_for_type with -fsanitize=undefined

2018-03-03 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70875

--- Comment #14 from Jakub Jelinek  ---
Author: jakub
Date: Sat Mar  3 13:41:52 2018
New Revision: 258206

URL: https://gcc.gnu.org/viewcvs?rev=258206=gcc=rev
Log:
Backported from mainline
2018-03-02  Jakub Jelinek  

PR sanitizer/70875
* gcc.dg/ubsan/bounds-3.c: Add -fno-sanitize-recover=bounds to
dg-options and dg-shouldfail "ubsan" directive.

Modified:
branches/gcc-7-branch/gcc/testsuite/ChangeLog
branches/gcc-7-branch/gcc/testsuite/gcc.dg/ubsan/bounds-3.c

[Bug c++/84557] ICE with invalid firstprivate variable

2018-03-03 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84557

--- Comment #4 from Jakub Jelinek  ---
Author: jakub
Date: Sat Mar  3 13:40:39 2018
New Revision: 258204

URL: https://gcc.gnu.org/viewcvs?rev=258204=gcc=rev
Log:
Backported from mainline
2018-02-26  Jakub Jelinek  

PR c++/84557
* parser.c (cp_parser_omp_var_list_no_open): Only call
cp_parser_lookup_name_simple on names satisfying identifier_p.
(cp_parser_oacc_routine): Likewise.

* g++.dg/gomp/pr84557.C: New test.

Added:
branches/gcc-7-branch/gcc/testsuite/g++.dg/gomp/pr84557.C
Modified:
branches/gcc-7-branch/gcc/cp/ChangeLog
branches/gcc-7-branch/gcc/cp/parser.c
branches/gcc-7-branch/gcc/testsuite/ChangeLog

[Bug c++/84558] [6/7 Regression] ICE with invalid constexpr constructor

2018-03-03 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84558

--- Comment #5 from Jakub Jelinek  ---
Author: jakub
Date: Sat Mar  3 13:41:20 2018
New Revision: 258205

URL: https://gcc.gnu.org/viewcvs?rev=258205=gcc=rev
Log:
Backported from mainline
2018-02-26  Jakub Jelinek  

PR c++/84558
* constexpr.c (cxx_eval_vec_init_1): For reuse, treat NULL eltinit like
a valid constant initializer.  Formatting fixes.

* g++.dg/cpp1y/pr84558.C: New test.

Added:
branches/gcc-7-branch/gcc/testsuite/g++.dg/cpp1y/pr84558.C
Modified:
branches/gcc-7-branch/gcc/cp/ChangeLog
branches/gcc-7-branch/gcc/cp/constexpr.c
branches/gcc-7-branch/gcc/testsuite/ChangeLog

  1   2   >