[Bug c++/87093] is_constructible (__is_constructible() instrinsic) explicitly instantiates conversion member function of source

2018-09-16 Thread TonyELewis at hotmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87093

--- Comment #8 from Tony E Lewis  ---
Yep - verified on the GCC trunk on Godbolt ("9.0.0 20180915 (experimental)").

Fantastic stuff. Thanks very much Ville.

[Bug target/81084] [8 Regression] powerpcspe port full of confusing configury / command-line options not related to SPE

2018-09-16 Thread glaubitz at physik dot fu-berlin.de
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81084

--- Comment #64 from John Paul Adrian Glaubitz  ---
FYI, I am setting up a PowerPCSPE porterbox the next days and hope to get it
added to the gcc compile farm as a test machine. So any patches can be tested
there.

[Bug fortran/86470] [6/7/8/9 Regression] [OOP] ICE with OMP

2018-09-16 Thread janus at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86470

janus at gcc dot gnu.org changed:

   What|Removed |Added

 CC||janus at gcc dot gnu.org
Summary|ICE with OMP|[6/7/8/9 Regression] [OOP]
   ||ICE with OMP

--- Comment #2 from janus at gcc dot gnu.org ---
I see the ICE with 5.5 and upwards, but not with 4.8.5.

[Bug fortran/86470] [6/7/8/9 Regression] [OOP] ICE with OMP

2018-09-16 Thread janus at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86470

--- Comment #3 from janus at gcc dot gnu.org ---
On current trunk I get the following backtrace:


internal compiler error: Segmentation fault
0xc71fdf crash_signal
/home/jweil/github/gcc/trunk/gcc/toplev.c:325
0x948110 contains_struct_check(tree_node*, tree_node_structure_enum, char
const*, int, char const*)
/home/jweil/github/gcc/trunk/gcc/tree.h:3226
0x948110 fold_convert_loc(unsigned int, tree_node*, tree_node*)
/home/jweil/github/gcc/trunk/gcc/fold-const.c:2388
0x6cb4d6 gfc_call_malloc(stmtblock_t*, tree_node*, tree_node*)
/home/jweil/github/gcc/trunk/gcc/fortran/trans.c:605
0x6ddd87 duplicate_allocatable
/home/jweil/github/gcc/trunk/gcc/fortran/trans-array.c:8079
0x6ddfa5 gfc_duplicate_allocatable_nocopy(tree_node*, tree_node*, tree_node*,
int)
/home/jweil/github/gcc/trunk/gcc/fortran/trans-array.c:8172
0x74338f gfc_walk_alloc_comps
/home/jweil/github/gcc/trunk/gcc/fortran/trans-openmp.c:383
0x746052 gfc_omp_clause_default_ctor(tree_node*, tree_node*, tree_node*)
/home/jweil/github/gcc/trunk/gcc/fortran/trans-openmp.c:471
0xb549dc lower_rec_input_clauses
/home/jweil/github/gcc/trunk/gcc/omp-low.c:4104


It's strange that we run into 'gfc_walk_alloc_comps' at all, although no
allocatable components are involved. Possibly 'gfc_has_alloc_comps' is buggy?

[Bug fortran/86551] [OOP] ICE on invalid code with select type

2018-09-16 Thread janus at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86551

--- Comment #4 from janus at gcc dot gnu.org ---
The patch in comment #3 shows lots of regressions in the testsuite, but this
one should be better:


diff --git a/gcc/fortran/match.c b/gcc/fortran/match.c
index 85247dd8334..6cf816be511 100644
--- a/gcc/fortran/match.c
+++ b/gcc/fortran/match.c
@@ -6009,7 +6009,7 @@ copy_ts_from_selector_to_associate (gfc_expr *associate,
gfc_expr *selector)
   else
 assoc_sym->as = NULL;

-  if (selector->ts.type == BT_CLASS)
+  if (selector->ts.type == BT_CLASS && gfc_expr_attr (selector).class_ok)
 {
   /* The correct class container has to be available.  */
   assoc_sym->ts.type = BT_CLASS;
diff --git a/gcc/fortran/resolve.c b/gcc/fortran/resolve.c
index ea0ce800743..67b625f3a51 100644
--- a/gcc/fortran/resolve.c
+++ b/gcc/fortran/resolve.c
@@ -8867,6 +8867,9 @@ resolve_select_type (gfc_code *code, gfc_namespace
*old_ns)

   if (code->expr2)
 {
+  if (!gfc_expr_attr (code->expr2).class_ok)
+   return;
+
   if (code->expr1->symtree->n.sym->attr.untyped)
code->expr1->symtree->n.sym->ts = code->expr2->ts;
   selector_type = CLASS_DATA (code->expr2)->ts.u.derived;


Unfortunately it still fails on:

FAIL: gfortran.dg/allocate_with_source_15.f03   -Os  (internal compiler error)
FAIL: gfortran.dg/select_type_26.f03   -O0  (internal compiler error)
FAIL: gfortran.dg/select_type_27.f03   -O0  (internal compiler error)

[Bug middle-end/87325] New: determine_base_object does not consider consider address space of base expr

2018-09-16 Thread saaadhu at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87325

Bug ID: 87325
   Summary: determine_base_object does not consider consider
address space of base expr
   Product: gcc
   Version: 9.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: middle-end
  Assignee: unassigned at gcc dot gnu.org
  Reporter: saaadhu at gcc dot gnu.org
  Target Milestone: ---

determine_base_object fold_converts the result of build_fold_addr_expr to
ptr_type_node, and this causes wrong code if the addr expr is not in the
generic address space.

struct tagT {
  float x, y, z;
};

const __memx struct tagT ts [3] = { {-1.0, 0.0, -1.0}, {-1.0, 0.0, -1.0},
{-1.0, 0.0, -1.0}};

volatile int n;
extern int foo(const float *a, const float *b);
extern float bar(float x, float y);

int main() {
  float r;
  for (int i = 0; i
  base () ((const  float *) &ts + 8)
  step 12
  base object (void *) (&ts)
candidate 12
  var_before ivtmp.16_25
  var_after ivtmp.16_26
  incremented at end
  type unsigned short
  base (unsigned short) (float *) (&ts + 16)
  step 12
  base object (void *) (float *) (&ts + 16)
candidate 14
  var_before ivtmp.18_30
  var_after ivtmp.18_31
  incremented at end
  type unsigned short
  base (unsigned short) (float *) (&ts + 12)
  step 12
  base object (void *) (float *) (&ts + 12)

[Bug fortran/85954] [8/9 Regression] ICE in make_ssa_name_fn, at tree-ssanames.c:266

2018-09-16 Thread pault at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85954

--- Comment #6 from Paul Thomas  ---
Created attachment 44701
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=44701&action=edit
A fix for the PR

This regtests OK.

It needs one or two further tweaks before submission, which will occur
tomorrow.

Regards

Paul

[Bug c/71157] -Wnull-dereference false alarm in wrong function

2018-09-16 Thread eggert at gnu dot org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71157

--- Comment #9 from Paul Eggert  ---
(In reply to Eric Gallager from comment #8)

> Try marking it up with __attribute__((returns_nonnull)) and/or
> __attribute__((nonnull)). If the first one works, then it's a case where GCC
> should suggest it, in which case it's bug 84203.

Neither suggestion works, unfortunately. That is, I tried undoing the
abovementioned patch to etags.c that works around the problem, and then
modifying the declaration of skip_spaces this way:

static char *skip_spaces (char *) __attribute__ ((nonnull (1)));

or this way:

static char *skip_spaces (char *) __attribute__ ((returns_nonnull));

Neither modification worked: in both cases I still got the bogus warnings. This
was with gcc (Ubuntu 7.3.0-16ubuntu3) 7.3.0.

[Bug c/71157] -Wnull-dereference false alarm in wrong function

2018-09-16 Thread manu at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71157

Manuel López-Ibáñez  changed:

   What|Removed |Added

 CC||msebor at gcc dot gnu.org

--- Comment #10 from Manuel López-Ibáñez  ---
Martin, this is one of those warnings that would benefit from printing the
inline stack (and also from better location info in the middle).

[Bug c/26492] -Wstrict-aliasing=2 warns about explicitly allowed cast to pointer to union.

2018-09-16 Thread manu at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=26492

Manuel López-Ibáñez  changed:

   What|Removed |Added

 Target|i486-linux-gnu  |
 Status|UNCONFIRMED |NEW
   Keywords||diagnostic
   Last reconfirmed||2018-09-16
 CC||manu at gcc dot gnu.org
   Host|i486-linux-gnu  |
 Ever confirmed|0   |1
  Build|i486-linux-gnu  |

--- Comment #3 from Manuel López-Ibáñez  ---
:13:20: warning: dereferencing type-punned pointer might break
strict-aliasing rules [-Wstrict-aliasing]
  4 | (((union { type __x__; __typeof__(*(ptr)) __y__;} *)(ptr))->__x__)
| ~

 13 |   noalias(usa, &a)[1] = 0;
:4:58: note: in definition of macro 'noalias'
4 | (((union { type __x__; __typeof__(*(ptr)) __y__;} *)(ptr))->__x__)
  |  ^~~

[Bug other/33933] "error: array type has incomplete element type" in system header

2018-09-16 Thread manu at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=33933

Manuel López-Ibáñez  changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 CC||manu at gcc dot gnu.org
 Resolution|--- |WONTFIX

--- Comment #4 from Manuel López-Ibáñez  ---
This is old and likely to be either fixed or irrelevant by now. Please REOPEN
otherwise.

[Bug middle-end/34515] -Wstrict-overflow produces extra warnings

2018-09-16 Thread manu at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=34515

Manuel López-Ibáñez  changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 CC||manu at gcc dot gnu.org
 Resolution|--- |WONTFIX

--- Comment #5 from Manuel López-Ibáñez  ---
This is too large to analyze and it doesn't compile cleanly:

strtod_l.c:1318:8: error: lvalue required in asm statement
strtod_l.c:1318:8: error: lvalue required in asm statement

I don't think it is useful to keep it around. Better focus on other
-Wstrict-overflow PRs.

[Bug c/71157] -Wnull-dereference false alarm in wrong function

2018-09-16 Thread glisse at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71157

--- Comment #11 from Marc Glisse  ---
Trunk doesn't show the warning (gcc-8 does).

[Bug middle-end/42561] missing uninitialized variable warning on simple arrays

2018-09-16 Thread manu at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=42561

Manuel López-Ibáñez  changed:

   What|Removed |Added

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

--- Comment #8 from Manuel López-Ibáñez  ---
This issue is already covered and analyzed in PR49754

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

[Bug middle-end/49754] Wuninitialized does not work with structs/unions/arrays

2018-09-16 Thread manu at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=49754

Manuel López-Ibáñez  changed:

   What|Removed |Added

 CC||matt at use dot net

--- Comment #7 from Manuel López-Ibáñez  ---
*** Bug 42561 has been marked as a duplicate of this bug. ***

[Bug middle-end/24639] [meta-bug] bug to track all Wuninitialized issues

2018-09-16 Thread manu at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=24639
Bug 24639 depends on bug 42561, which changed state.

Bug 42561 Summary: missing uninitialized variable warning on simple arrays
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=42561

   What|Removed |Added

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

[Bug middle-end/24639] [meta-bug] bug to track all Wuninitialized issues

2018-09-16 Thread manu at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=24639
Bug 24639 depends on bug 63418, which changed state.

Bug 63418 Summary: false positive with -Wmaybe-uninitialized
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63418

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 Resolution|--- |WONTFIX

[Bug middle-end/63418] false positive with -Wmaybe-uninitialized

2018-09-16 Thread manu at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63418

Manuel López-Ibáñez  changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 Resolution|--- |WONTFIX

--- Comment #5 from Manuel López-Ibáñez  ---
Keeping this open is not very useful:

* The testcase is too large to analyze to know the root cause.

* It is not a regression.

* It may not be a bug but an implementation limit due to compile-time
constraints.

[Bug middle-end/78081] -Wmaybe-initialized false-alarm regression for Emacs regex.c (jump threading fallout)

2018-09-16 Thread manu at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78081

Manuel López-Ibáñez  changed:

   What|Removed |Added

   Last reconfirmed|2017-04-28 00:00:00 |2018-9-16
 CC||manu at gcc dot gnu.org
Summary|-Wmaybe-initialized |-Wmaybe-initialized
   |false-alarm regression for  |false-alarm regression for
   |Emacs regex.c   |Emacs regex.c (jump
   ||threading fallout)

--- Comment #3 from Manuel López-Ibáñez  ---
Still valid. Probably also a missed optimization?

[Bug middle-end/78915] missing -Wuninitialized accessing allocated memory

2018-09-16 Thread manu at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78915

Manuel López-Ibáñez  changed:

   What|Removed |Added

 CC||manu at gcc dot gnu.org

--- Comment #2 from Manuel López-Ibáñez  ---
Possibly a dup of PR87209

[Bug c++/43789] warn about pointer arithmetic in sizeof (Wsizeof-array-decay)

2018-09-16 Thread manu at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=43789

Manuel López-Ibáñez  changed:

   What|Removed |Added

   Keywords||diagnostic
 Status|UNCONFIRMED |NEW
   Last reconfirmed||2018-09-16
 CC||manu at gcc dot gnu.org
Summary|warn about pointer  |warn about pointer
   |arithmetic in sizeof|arithmetic in sizeof
   ||(Wsizeof-array-decay)
 Ever confirmed|0   |1

--- Comment #1 from Manuel López-Ibáñez  ---
Testcase:

int foo(void){
char a[]="blabla";
return sizeof(a-1);
}

Clang:

:4:16: warning: sizeof on pointer operation will return size of 'char
*' instead of 'char [7]' [-Wsizeof-array-decay]
return sizeof(a-1);
  ~^

[Bug c++/49481] Warn about string literal + character

2018-09-16 Thread manu at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=49481

Manuel López-Ibáñez  changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 CC||manu at gcc dot gnu.org
 Resolution|--- |DUPLICATE

--- Comment #1 from Manuel López-Ibáñez  ---
Dup

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

[Bug c++/62181] [C/C++] Expected new warning: "adding 'char' to a string does not append to the string" [-Wstring-plus-int]

2018-09-16 Thread manu at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=62181

Manuel López-Ibáñez  changed:

   What|Removed |Added

 CC||veksler at il dot ibm.com

--- Comment #12 from Manuel López-Ibáñez  ---
*** Bug 49481 has been marked as a duplicate of this bug. ***

[Bug c++/78679] Produce a warning on `int + string literal`

2018-09-16 Thread manu at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78679

Manuel López-Ibáñez  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 CC||manu at gcc dot gnu.org
 Resolution|--- |DUPLICATE

--- Comment #4 from Manuel López-Ibáñez  ---
So this is a dup.

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

[Bug c++/62181] [C/C++] Expected new warning: "adding 'char' to a string does not append to the string" [-Wstring-plus-int]

2018-09-16 Thread manu at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=62181

Manuel López-Ibáñez  changed:

   What|Removed |Added

 CC||vittorio.romeo at outlook dot 
com

--- Comment #13 from Manuel López-Ibáñez  ---
*** Bug 78679 has been marked as a duplicate of this bug. ***

[Bug c/85948] printf format attribute warning line carat inaccurate

2018-09-16 Thread manu at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85948

Manuel López-Ibáñez  changed:

   What|Removed |Added

 Status|UNCONFIRMED |WAITING
   Last reconfirmed||2018-09-16
 CC||manu at gcc dot gnu.org
 Ever confirmed|0   |1

--- Comment #1 from Manuel López-Ibáñez  ---
This works for me with all versions I have tried starting with GCC 6.1 (only in
C). In GCC 8.1:

:13:11: error: format '%s' expects argument of type 'char *', but
argument 2 has type 'int' [-Werror=format=]
 str_fmt("%s %zu %s %s", d, str, str, d);
  ~^ ~
  %d
:13:15: error: format '%zu' expects argument of type 'size_t', but
argument 3 has type 'const char *' [-Werror=format=]
 str_fmt("%s %zu %s %s", d, str, str, d);
 ~~^~~~
 %s
:13:21: error: format '%s' expects argument of type 'char *', but
argument 5 has type 'int' [-Werror=format=]
 str_fmt("%s %zu %s %s", d, str, str, d);
~^~
%d

It doesn't work in C++.

[Bug c/52952] Wformat location info is bad (wrong column number)

2018-09-16 Thread manu at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=52952

--- Comment #51 from Manuel López-Ibáñez  ---
There are few things still that don't work:

1. C++ does not work

2. Locations within strings expanded from a macro

3. Location within strings from a const char array.

void foo(void) {
#define c   " %d %d "
  __builtin_printf(c, 0.5, 0);

  const char a[] = " %d ";
  __builtin_printf(a, 0.5);
}

GCC 9:

:2:25: error: format '%d' expects argument of type 'int', but argument
2 has type 'double' [-Werror=format=]
2 | #define c   " %d %d "
  | ^
:3:20: note: in expansion of macro 'c'
3 |   __builtin_printf(c, 0.5, 0);
  |^
:6:20: error: format '%d' expects argument of type 'int', but argument
2 has type 'double' [-Werror=format=]
6 |   __builtin_printf(a, 0.5);
  |^  ~~~
  |   |
  |   double

Clang can do (3) but not (2):

:3:23: error: format specifies type 'int' but the argument has type
'double' [-Werror,-Wformat]
  __builtin_printf(c, 0.5, 0);
   ~  ^~~
:6:23: error: format specifies type 'int' but the argument has type
'double' [-Werror,-Wformat]
  __builtin_printf(a, 0.5);
   ~  ^~~
:5:22: note: format string is defined here
  const char a[] = " %d ";
 ^~
 %f

[Bug fortran/37802] Improve wording for matmul bound checking

2018-09-16 Thread tkoenig at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=37802

--- Comment #4 from Thomas Koenig  ---
Author: tkoenig
Date: Sun Sep 16 19:37:44 2018
New Revision: 264349

URL: https://gcc.gnu.org/viewcvs?rev=264349&root=gcc&view=rev
Log:
2018-09-16  Thomas Koenig  

PR fortran/37802
* frontend-passes.c (B_ERROR): New macro for matmul bounds
checking error messages.
(C_ERROR): Likewise.
(inline_matmul_assign): Reorganize bounds checking, use B_ERROR
and C_ERROR macros.

2018-09-16  Thomas Koenig  

PR fortran/37802
* gfortran.dg/matmul_bounds_13.f90: New test case.
* gfortran.dg/inline_matmul_15.f90:  Adjust test for runtime
error.
* gfortran.dg/matmul_5.f90: Likewise.
* gfortran.dg/matmul_bounds_10.f90: Likewise.
* gfortran.dg/matmul_bounds_11.f90: Likewise.
* gfortran.dg/matmul_bounds_2.f90: Likewise.
* gfortran.dg/matmul_bounds_4.f90: Likewise.
* gfortran.dg/matmul_bounds_5.f90: Likewise.

2018-09-16  Thomas Koenig  

PR fortran/37802
* m4/matmul_internal.m4: Adjust error messages.
* generated/matmul_c10.c: Regenerated.
* generated/matmul_c16.c: Regenerated.
* generated/matmul_c4.c: Regenerated.
* generated/matmul_c8.c: Regenerated.
* generated/matmul_i1.c: Regenerated.
* generated/matmul_i16.c: Regenerated.
* generated/matmul_i2.c: Regenerated.
* generated/matmul_i4.c: Regenerated.
* generated/matmul_i8.c: Regenerated.
* generated/matmul_r10.c: Regenerated.
* generated/matmul_r16.c: Regenerated.
* generated/matmul_r4.c: Regenerated.
* generated/matmul_r8.c: Regenerated.
* generated/matmulavx128_c10.c: Regenerated.
* generated/matmulavx128_c16.c: Regenerated.
* generated/matmulavx128_c4.c: Regenerated.
* generated/matmulavx128_c8.c: Regenerated.
* generated/matmulavx128_i1.c: Regenerated.
* generated/matmulavx128_i16.c: Regenerated.
* generated/matmulavx128_i2.c: Regenerated.
* generated/matmulavx128_i4.c: Regenerated.
* generated/matmulavx128_i8.c: Regenerated.
* generated/matmulavx128_r10.c: Regenerated.
* generated/matmulavx128_r16.c: Regenerated.
* generated/matmulavx128_r4.c: Regenerated.
* generated/matmulavx128_r8.c: Regenerated.


Added:
trunk/gcc/testsuite/gfortran.dg/matmul_bounds_13.f90
Modified:
trunk/gcc/fortran/ChangeLog
trunk/gcc/fortran/frontend-passes.c
trunk/gcc/testsuite/ChangeLog
trunk/gcc/testsuite/gfortran.dg/inline_matmul_15.f90
trunk/gcc/testsuite/gfortran.dg/matmul_5.f90
trunk/gcc/testsuite/gfortran.dg/matmul_bounds_10.f90
trunk/gcc/testsuite/gfortran.dg/matmul_bounds_11.f90
trunk/gcc/testsuite/gfortran.dg/matmul_bounds_2.f90
trunk/gcc/testsuite/gfortran.dg/matmul_bounds_3.f90
trunk/gcc/testsuite/gfortran.dg/matmul_bounds_4.f90
trunk/gcc/testsuite/gfortran.dg/matmul_bounds_5.f90
trunk/gcc/testsuite/gfortran.dg/matmul_bounds_8.f90
trunk/libgfortran/ChangeLog
trunk/libgfortran/generated/matmul_c10.c
trunk/libgfortran/generated/matmul_c16.c
trunk/libgfortran/generated/matmul_c4.c
trunk/libgfortran/generated/matmul_c8.c
trunk/libgfortran/generated/matmul_i1.c
trunk/libgfortran/generated/matmul_i16.c
trunk/libgfortran/generated/matmul_i2.c
trunk/libgfortran/generated/matmul_i4.c
trunk/libgfortran/generated/matmul_i8.c
trunk/libgfortran/generated/matmul_r10.c
trunk/libgfortran/generated/matmul_r16.c
trunk/libgfortran/generated/matmul_r4.c
trunk/libgfortran/generated/matmul_r8.c
trunk/libgfortran/generated/matmulavx128_c10.c
trunk/libgfortran/generated/matmulavx128_c16.c
trunk/libgfortran/generated/matmulavx128_c4.c
trunk/libgfortran/generated/matmulavx128_c8.c
trunk/libgfortran/generated/matmulavx128_i1.c
trunk/libgfortran/generated/matmulavx128_i16.c
trunk/libgfortran/generated/matmulavx128_i2.c
trunk/libgfortran/generated/matmulavx128_i4.c
trunk/libgfortran/generated/matmulavx128_i8.c
trunk/libgfortran/generated/matmulavx128_r10.c
trunk/libgfortran/generated/matmulavx128_r16.c
trunk/libgfortran/generated/matmulavx128_r4.c
trunk/libgfortran/generated/matmulavx128_r8.c
trunk/libgfortran/m4/matmul_internal.m4

[Bug fortran/86484] [OOP] Undefined symbol when using polymorphic intrinsic assignment

2018-09-16 Thread janus at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86484

janus at gcc dot gnu.org changed:

   What|Removed |Added

   Target Milestone|--- |9.0

[Bug fortran/84543] [OOP] undefined reference to __copy_INTEGER_4_.3788

2018-09-16 Thread janus at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84543

janus at gcc dot gnu.org changed:

   What|Removed |Added

   Keywords||link-failure
 Status|NEW |ASSIGNED
 CC||janus at gcc dot gnu.org
   Assignee|unassigned at gcc dot gnu.org  |janus at gcc dot gnu.org
   Target Milestone|--- |9.0
Summary|undefined reference to  |[OOP] undefined reference
   |__copy_INTEGER_4_.3788  |to __copy_INTEGER_4_.3788

[Bug fortran/84543] [OOP] undefined reference to __copy_INTEGER_4_.3788

2018-09-16 Thread janus at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84543

--- Comment #2 from janus at gcc dot gnu.org ---
Author: janus
Date: Sun Sep 16 19:57:52 2018
New Revision: 264350

URL: https://gcc.gnu.org/viewcvs?rev=264350&root=gcc&view=rev
Log:
fix PR 86484 and PR 84543

2018-09-16  Janus Weil  

PR fortran/86484
PR fortran/84543
* match.c (gfc_match_assignment): For a polymorphic assignment,
make sure that the vtab for the rhs type is generated.

2018-09-16  Janus Weil  

PR fortran/86484
PR fortran/84543
* gfortran.dg/class_assign_2.f90: New test case.
* gfortran.dg/class_assign_3.f90: New test case.

Added:
trunk/gcc/testsuite/gfortran.dg/class_assign_2.f90
trunk/gcc/testsuite/gfortran.dg/class_assign_3.f90
Modified:
trunk/gcc/fortran/ChangeLog
trunk/gcc/fortran/match.c
trunk/gcc/testsuite/ChangeLog

[Bug fortran/86484] [OOP] Undefined symbol when using polymorphic intrinsic assignment

2018-09-16 Thread janus at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86484

--- Comment #6 from janus at gcc dot gnu.org ---
Author: janus
Date: Sun Sep 16 19:57:52 2018
New Revision: 264350

URL: https://gcc.gnu.org/viewcvs?rev=264350&root=gcc&view=rev
Log:
fix PR 86484 and PR 84543

2018-09-16  Janus Weil  

PR fortran/86484
PR fortran/84543
* match.c (gfc_match_assignment): For a polymorphic assignment,
make sure that the vtab for the rhs type is generated.

2018-09-16  Janus Weil  

PR fortran/86484
PR fortran/84543
* gfortran.dg/class_assign_2.f90: New test case.
* gfortran.dg/class_assign_3.f90: New test case.

Added:
trunk/gcc/testsuite/gfortran.dg/class_assign_2.f90
trunk/gcc/testsuite/gfortran.dg/class_assign_3.f90
Modified:
trunk/gcc/fortran/ChangeLog
trunk/gcc/fortran/match.c
trunk/gcc/testsuite/ChangeLog

[Bug fortran/37802] Improve wording for matmul bound checking

2018-09-16 Thread tkoenig at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=37802

Thomas Koenig  changed:

   What|Removed |Added

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

--- Comment #5 from Thomas Koenig  ---
Fixed.

[Bug fortran/27766] [meta-bug] -fbounds-check related bugs

2018-09-16 Thread tkoenig at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=27766
Bug 27766 depends on bug 37802, which changed state.

Bug 37802 Summary: Improve wording for matmul bound checking
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=37802

   What|Removed |Added

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

[Bug fortran/87326] New: Support the NEW_INDEX= specifier in the FORM TEAM statement

2018-09-16 Thread weeks at iastate dot edu
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87326

Bug ID: 87326
   Summary: Support the NEW_INDEX= specifier in the FORM TEAM
statement
   Product: gcc
   Version: 8.2.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: fortran
  Assignee: unassigned at gcc dot gnu.org
  Reporter: weeks at iastate dot edu
  Target Milestone: ---

gfortran 8.2 does not accept the NEW_INDEX= specifier of the (Fortran 2018)
FORM TEAM statement. The following example is note 11.48 from N2146, modified
to define & initialize P & have an END PROGRAM statement:

$ cat note-11.48.f90
USE, INTRINSIC :: ISO_FORTRAN_ENV
integer, parameter :: P = 8
TYPE(TEAM_TYPE) :: ROW
REAL :: A [P, *]
INTEGER :: ME (2)
ME (:) = THIS_IMAGE (A)
FORM TEAM (ME(1), ROW, NEW_INDEX=ME(2))
end program
$ gfortran-mp-8 -fcoarray=single note-11.48.f90 
note-11.48.f90:7:21:

 FORM TEAM (ME(1), ROW, NEW_INDEX=ME(2))
 1
Error: Syntax error in FORM TEAM statement at (1)

[Bug fortran/86484] [OOP] Undefined symbol when using polymorphic intrinsic assignment

2018-09-16 Thread janus at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86484

--- Comment #7 from janus at gcc dot gnu.org ---
Fixed on 9-trunk with r264350. Closing.

[Bug fortran/84543] [OOP] undefined reference to __copy_INTEGER_4_.3788

2018-09-16 Thread janus at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84543

janus at gcc dot gnu.org changed:

   What|Removed |Added

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

--- Comment #3 from janus at gcc dot gnu.org ---
Fixed on 9-trunk with r264350. Closing.

[Bug fortran/86484] [OOP] Undefined symbol when using polymorphic intrinsic assignment

2018-09-16 Thread janus at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86484

janus at gcc dot gnu.org changed:

   What|Removed |Added

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

--- Comment #8 from janus at gcc dot gnu.org ---
Actually closing.

[Bug fortran/87318] gfortran.dg/dtio_1.f90 is invalid

2018-09-16 Thread janus at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87318

--- Comment #4 from janus at gcc dot gnu.org ---
(In reply to Jerry DeLisle from comment #3)
> Created attachment 44700 [details]
> Revised dtio_1.f90
> 
> Will this attached version suffice?

Looks good at first sight. Will try ifort 19 on it soon, in order to see if it
runs as expected.

Do you think it's feasible to add some sort of diagnostics for this problem? Or
should we rather follow ifort's approach and enforce this restriction without
diagnostic messages? That would probably require a wrapper around the DTIO
procedures that would enforce the restrictions, right?

[Bug fortran/87318] gfortran.dg/dtio_1.f90 is invalid

2018-09-16 Thread jvdelisle at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87318

--- Comment #5 from Jerry DeLisle  ---
(In reply to janus from comment #4)
> (In reply to Jerry DeLisle from comment #3)
> > Created attachment 44700 [details]
> > Revised dtio_1.f90
> > 
> > Will this attached version suffice?
> 
> Looks good at first sight. Will try ifort 19 on it soon, in order to see if
> it runs as expected.
> 
> Do you think it's feasible to add some sort of diagnostics for this problem?
> Or should we rather follow ifort's approach and enforce this restriction
> without diagnostic messages? That would probably require a wrapper around
> the DTIO procedures that would enforce the restrictions, right?

My interpretation is that this is a requirement on the user. Amy diagnostics we
add at run time will be a performance hit. I do want to learn what ifort is
doing, I do not have it installed at the moment.

[Bug target/85666] gcc-8.0.1 fails to build mmix target: gcc/libgcc/libgcc2.h:203:20: internal compiler error: in leaf_function_p, at final.c:4488

2018-09-16 Thread hp at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85666

--- Comment #15 from Hans-Peter Nilsson  ---
Author: hp
Date: Sun Sep 16 21:23:36 2018
New Revision: 264351

URL: https://gcc.gnu.org/viewcvs?rev=264351&root=gcc&view=rev
Log:
PR target/85666
* config/mmix/mmix.c (mmix_assemble_integer): Handle byte-size
non-CONST_INT rtx:es using assemble_integer_with_op ".byte".
(MMIX_CFUN_NEEDS_SAVED_EH_RETURN_ADDRESS): Don't call
leaf_function_p, instead use has_hard_reg_initial_val.

Modified:
branches/gcc-8-branch/gcc/ChangeLog
branches/gcc-8-branch/gcc/config/mmix/mmix.c

[Bug target/87317] Missed optimisation: merging VMOVQ with operations that only use the low 8 bytes

2018-09-16 Thread hjl.tools at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87317

--- Comment #5 from H.J. Lu  ---
Created attachment 44702
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=44702&action=edit
A patch

Please try this.

[Bug target/85666] gcc-8.0.1 fails to build mmix target: gcc/libgcc/libgcc2.h:203:20: internal compiler error: in leaf_function_p, at final.c:4488

2018-09-16 Thread hp at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85666

Hans-Peter Nilsson  changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution|--- |FIXED
   Target Milestone|9.0 |8.3

--- Comment #16 from Hans-Peter Nilsson  ---
Now fixed on the gcc-8 branch too, and will be included in the 8.3 release.
Thanks for your patience.

[Bug c++/87322] [GCC 8.1+] GCC fails to parse captured lambda of 2nd inner lambda if the captured lambda has "," (having 2 arguments)

2018-09-16 Thread ensadc at mailnesia dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87322

ensadc at mailnesia dot com changed:

   What|Removed |Added

 CC||ensadc at mailnesia dot com

--- Comment #1 from ensadc at mailnesia dot com ---
Reduced:

int main()
{
  [](auto x) {
[inner_func2 = [] (auto a, auto b) {} ] {};
  }(0);
}

[Bug c++/87327] New: Calling member functions on captured constexpr variables "is not a constant expression"

2018-09-16 Thread jbassett271 at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87327

Bug ID: 87327
   Summary: Calling member functions on captured constexpr
variables "is not a constant expression"
   Product: gcc
   Version: 8.1.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c++
  Assignee: unassigned at gcc dot gnu.org
  Reporter: jbassett271 at gmail dot com
  Target Milestone: ---

The following code fails to compile on GCC 8.1.0 and above, but compiles fine
on GCC 7.3 and Clang (https://godbolt.org/z/ACYBBt). This bug doesn't happen if
`size` is a member variable instead of a member function, and it doesn't happen
when using an `int` for `a` and just writing `Foo` instead of
`Foo`.

Command: g++ -std=c++17 bug.cpp


template 
struct Foo {
constexpr auto size() const {
return N;
}
};

constexpr void foo() {
constexpr auto a = Foo<5>{};

[&] {
Foo it = {};

return it;
}();
}


Error message:

bug.cpp: In lambda function:
bug.cpp:12:21: error: ‘__closure’ is not a constant expression
 Foo it = {};
 ^
bug.cpp:12:19: note: in template argument for type ‘int’
 Foo it = {};
 ~~^~


System info (g++ -v):

Using built-in specs.
COLLECT_GCC=g++-8
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/8/lto-wrapper
OFFLOAD_TARGET_NAMES=nvptx-none
OFFLOAD_TARGET_DEFAULT=1
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Ubuntu
8.1.0-5ubuntu1~16.04' --with-bugurl=file:///usr/share/doc/gcc-8/README.Bugs
--enable-languages=c,ada,c++,go,brig,d,fortran,objc,obj-c++ --prefix=/usr
--with-gcc-major-version-only --program-suffix=-8
--program-prefix=x86_64-linux-gnu- --enable-shared --enable-linker-build-id
--libexecdir=/usr/lib --without-included-gettext --enable-threads=posix
--libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu
--enable-libstdcxx-debug --enable-libstdcxx-time=yes
--with-default-libstdcxx-abi=new --enable-gnu-unique-object
--disable-vtable-verify --enable-libmpx --enable-plugin --with-system-zlib
--with-target-system-zlib --enable-objc-gc=auto --enable-multiarch
--disable-werror --with-arch-32=i686 --with-abi=m64
--with-multilib-list=m32,m64,mx32 --enable-multilib --with-tune=generic
--enable-offload-targets=nvptx-none --without-cuda-driver
--enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu
--target=x86_64-linux-gnu
Thread model: posix
gcc version 8.1.0 (Ubuntu 8.1.0-5ubuntu1~16.04)

[Bug tree-optimization/87328] New: [9 Regression] ICE in do_rpo_vn, at tree-ssa-sccvn.c:6566

2018-09-16 Thread asolokha at gmx dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87328

Bug ID: 87328
   Summary: [9 Regression] ICE in do_rpo_vn, at
tree-ssa-sccvn.c:6566
   Product: gcc
   Version: 9.0
Status: UNCONFIRMED
  Keywords: ice-on-valid-code
  Severity: normal
  Priority: P3
 Component: tree-optimization
  Assignee: unassigned at gcc dot gnu.org
  Reporter: asolokha at gmx dot com
  Target Milestone: ---

gcc-9.0.0-alpha20180916 snapshot (r264351) ICEs when compiling the following
snippet w/ -O1 (-Og) -fno-tree-ccp -fno-tree-forwprop:

void
tp (void)
{
  int qt;

  qt = 0;
  if (qt != 0)
{
  if (0)
{
 h5:
  qt = 0;
  while (qt < 1)
{
}
}

  ++qt;
}

  goto h5;
}

% gcc-9.0.0-alpha20180916 -O1 -fno-tree-ccp -fno-tree-forwprop -c hyr6b31a.c
during GIMPLE pass: fre
hyr6b31a.c: In function 'tp':
hyr6b31a.c:22:1: internal compiler error: in do_rpo_vn, at
tree-ssa-sccvn.c:6566
22 | }
   | ^
0x6a712b do_rpo_vn
   
/var/tmp/portage/sys-devel/gcc-9.0.0_alpha20180916/work/gcc-9-20180916/gcc/tree-ssa-sccvn.c:6566
0xe7946c execute
   
/var/tmp/portage/sys-devel/gcc-9.0.0_alpha20180916/work/gcc-9-20180916/gcc/tree-ssa-sccvn.c:6726