[Bug c/84890] Overly verbose notes for missing headers

2018-05-06 Thread manu at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84890

Manuel López-Ibáñez  changed:

   What|Removed |Added

 CC||gcc at mailed dot e4ward.com

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

[Bug c/85664] Don't ask questions if tere's no way to answer

2018-05-06 Thread manu at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85664

Manuel López-Ibáñez  changed:

   What|Removed |Added

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

--- Comment #3 from Manuel López-Ibáñez  ---
(In reply to Mysha from comment #2)
> I don't know how many more unanswerable questions there are in GCC, but
> reactions suggest that these informative messages with questions are not an
> option, but rather the normal output. In that case, I'd rather have --terse;
> just the error messages, not the informative additions. (I get a lot of
> these, and with four lines per error I run our of console lines after some
> 17 typos.)

Removing the questions do not save lines.

The suggestions are eminently useful when one cannot immediately see the typo,
remember the right wording of a type, the right header and many other cases.

If you don't like getting too many errors or verbose output, you can use
-fmax-errors=1 -fno-diagnostics-show-caret -fno-diagnostics-show-option.

However, we have also bug reports asking for messages to be more verbose. One
of the often-repeated selling points of the "competition" is that they have
"expressive diagnostics", while GCC diagnostics are (were!) terse and cryptic.
There are many bug reports about making them even more verbose:
https://gcc.gnu.org/wiki/VerboseDiagnostics

If using the console for software development is too cumbersome, a better
alternative is to invoke gcc from an IDE such as Emacs, where you can jump from
error to error, jump to the code in question, and maybe apply the suggested fix
if you agree with it.

> But for the direct case: While the other one also would like to see the
> wording changed, that one is about the verbosity; what I'm after are the
> questions. If there's no checksum in those files, I figure I can just
> hexedit them, but I'd prefer a proper solution to that.

I would suggest that it would be easier to create a wrapper for gcc and use sed
or perl to filter the questions from the output. A simple regex should do the
job beautifully.

In any case, if you think a diagnostic could be better worded but no one else
seems interested in putting the effort to do it, then
https://gcc.gnu.org/wiki/GettingStarted#Basics:_Contributing_to_GCC_in_10_easy_steps

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

[Bug c++/67650] undef reference with -fdevirtualize

2018-05-06 Thread vincent.lextrait at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67650

--- Comment #31 from Vincent  ---
It turns out we might be in front of two bugs actually. With 8.1 I have a new
diagnosis for this 67650 bug (definition missing at compile time, not just at
link edition time), but I do have other parts of my old code where 8.1 is now
reporting missing definitions, and the definitions are there (definitions are
shown in the error message from 8.1 itself). And no virtuals are involved there
at all.

So either the old bug is now much more extensive, or there are two bugs now in
the same general "area".

[Bug fortran/85507] [6/7/8/9 Regression] ICE in gfc_dep_resolver, at fortran/dependency.c:2258

2018-05-06 Thread vehre at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85507

--- Comment #16 from vehre at gcc dot gnu.org ---
Author: vehre
Date: Sun May  6 11:19:31 2018
New Revision: 259974

URL: https://gcc.gnu.org/viewcvs?rev=259974&root=gcc&view=rev
Log:
gcc/fortran/ChangeLog:

2018-05-06  Andre Vehreschild  

PR fortran/85507
* dependency.c (gfc_dep_resolver): Revert looking at coarray dimension
introduced by r259385.
* trans-intrinsic.c (conv_caf_send): Always report a dependency for
same variables in coarray assignments.

gcc/testsuite/ChangeLog:

2018-05-06  Andre Vehreschild  

PR fortran/85507
* gfortran.dg/coarray_dependency_1.f90: New test.
* gfortran.dg/coarray_lib_comm_1.f90: Fix counting caf-expressions.


Added:
trunk/gcc/testsuite/gfortran.dg/coarray_dependency_1.f90
Modified:
trunk/gcc/fortran/ChangeLog
trunk/gcc/fortran/dependency.c
trunk/gcc/fortran/trans-intrinsic.c
trunk/gcc/testsuite/ChangeLog
trunk/gcc/testsuite/gfortran.dg/coarray_lib_comm_1.f90

[Bug c/85664] Don't ask questions if tere's no way to answer

2018-05-06 Thread gcc at mailed dot e4ward.com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85664

--- Comment #4 from Mysha  ---
> The suggestions are eminently useful...

Which is why I said I would prefer to have a --terse option. After all, having
such an option implies that you can choose not to use them.


> If you don't like getting too many errors or verbose output, you can use
> -fmax-errors=1 -fno-diagnostics-show-caret -fno-diagnostics-show-option. ...

Great. It turns out the impression I got from the reactions to the two reports,
that there was no option to be terse, was mistaken. My trust in GCC is
restored. Thank you. (You know why I didn't know.)


> ... we have also bug reports asking for messages to be more verbose. ..."

It's OK to feel attacked. It's the same I feel for getting a reply about
something I didn't say, on a topic that wasn't even the focus of the report. I
wrote I would have "--terse" (or words to that effect), and only because I
understood that these informative extras were the only way, currently. I did
not write "I want GCC to be different for everybody because something the
developers considered a good thing doesn't always suit my particular
situation."

Right, we've now both defended ourselves. Let's continue on what I did write.
(And if you happen to be part of the European Youth Music Festival, let me know
where you are and we'll have a drink together.)


> Removing the questions do not save lines.

Indeed, which is why these two reports are related, but not duplicates.

[Bug tree-optimization/85588] [6/7/8 Regression] -fwrapv miscompilation

2018-05-06 Thread mikpelinux at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85588

Mikael Pettersson  changed:

   What|Removed |Added

 CC||mikpelinux at gmail dot com

--- Comment #7 from Mikael Pettersson  ---
(In reply to Richard Biener from comment #6)
> Fixed on trunk sofar.

I believe the fix was mistakenly labelled as PR85574 (including the file name
of the new test case).

[Bug fortran/85507] [6/7/8/9 Regression] ICE in gfc_dep_resolver, at fortran/dependency.c:2258

2018-05-06 Thread vehre at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85507

--- Comment #17 from vehre at gcc dot gnu.org ---
Author: vehre
Date: Sun May  6 11:52:46 2018
New Revision: 259977

URL: https://gcc.gnu.org/viewcvs?rev=259977&root=gcc&view=rev
Log:
gcc/fortran/ChangeLog:

2018-05-06  Andre Vehreschild  

PR fortran/85507
Backport from trunk.
* dependency.c (gfc_dep_resolver): Revert looking at coarray dimension
introduced by r259385.
* trans-intrinsic.c (conv_caf_send): Always report a dependency for
same variables in coarray assignments.

gcc/testsuite/ChangeLog:

2018-05-06  Andre Vehreschild  

PR fortran/85507
Backport from trunk
* gfortran.dg/coarray_dependency_1.f90: New test.
* gfortran.dg/coarray_lib_comm_1.f90: Fix counting caf-expressions.


Added:
branches/gcc-7-branch/gcc/testsuite/gfortran.dg/coarray_dependency_1.f90
Modified:
branches/gcc-7-branch/gcc/fortran/ChangeLog
branches/gcc-7-branch/gcc/fortran/dependency.c
branches/gcc-7-branch/gcc/fortran/trans-intrinsic.c
branches/gcc-7-branch/gcc/testsuite/ChangeLog
branches/gcc-7-branch/gcc/testsuite/gfortran.dg/coarray_lib_comm_1.f90

[Bug c++/85668] New: ICE with substitution failure

2018-05-06 Thread miguel.ojeda.sandonis at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85668

Bug ID: 85668
   Summary: ICE with substitution failure
   Product: gcc
   Version: 8.1.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c++
  Assignee: unassigned at gcc dot gnu.org
  Reporter: miguel.ojeda.sandonis at gmail dot com
  Target Milestone: ---

The following input causes an ICE starting with GCC 4.9 until trunk, on
-std=c++{14,17,2a}.

template 
using V = void;

template 
auto f1(F f, T v) -> decltype(f(v))
{
}

void f2(int p)
{
f1([](auto x) -> V {}, 0);
}

GCC trunk reports:

x.cc: In substitution of 'template f2(int)::
[with auto:1 = int]':
x.cc:5:32:   required by substitution of 'template
decltype (f(v)) f1(F, T) [with F = f2(int)::; T = int]'
x.cc:11:48:   required from here
x.cc:11:39: internal compiler error: in tsubst_copy, at cp/pt.c:15325
 f1([](auto x) -> V {}, 0);
   ^
0x7a2545 tsubst_copy
../../gcc/gcc/cp/pt.c:15325
0x7a3c93 tsubst_copy_and_build(tree_node*, tree_node*, int, tree_node*,
bool, bool)
../../gcc/gcc/cp/pt.c:18843
0x7a62eb tsubst_copy_and_build(tree_node*, tree_node*, int, tree_node*,
bool, bool)
../../gcc/gcc/cp/pt.c:18962
0x7a52bb tsubst_copy_and_build(tree_node*, tree_node*, int, tree_node*,
bool, bool)
../../gcc/gcc/cp/pt.c:18264
0x7990ee tsubst_expr(tree_node*, tree_node*, int, tree_node*, bool)
../../gcc/gcc/cp/pt.c:17412
0x7bd710 tsubst_expr(tree_node*, tree_node*, int, tree_node*, bool)
../../gcc/gcc/cp/pt.c:11405
0x7bd710 tsubst_template_arg
../../gcc/gcc/cp/pt.c:11416
0x7c5eba tsubst_template_args
../../gcc/gcc/cp/pt.c:12440
0x7bb3e7 tsubst(tree_node*, tree_node*, int, tree_node*)
../../gcc/gcc/cp/pt.c:14604
0x7bb731 tsubst(tree_node*, tree_node*, int, tree_node*)
../../gcc/gcc/cp/pt.c:14221
0x7cd52c tsubst_function_type
../../gcc/gcc/cp/pt.c:13979
0x7bae75 tsubst(tree_node*, tree_node*, int, tree_node*)
../../gcc/gcc/cp/pt.c:14743
0x7c69dc tsubst_function_decl
../../gcc/gcc/cp/pt.c:12907
0x7ca178 tsubst_decl
../../gcc/gcc/cp/pt.c:13307
0x7bb417 tsubst(tree_node*, tree_node*, int, tree_node*)
../../gcc/gcc/cp/pt.c:14195
0x7b8afa instantiate_template_1
../../gcc/gcc/cp/pt.c:19215
0x7b8afa instantiate_template(tree_node*, tree_node*, int)
../../gcc/gcc/cp/pt.c:19271
0x7d1813 fn_type_unification(tree_node*, tree_node*, tree_node*, tree_node*
const*, unsigned int, tree_node*, unification_kind_t, int, bool, bool)
../../gcc/gcc/cp/pt.c:19633
0x601961 add_template_candidate_real
../../gcc/gcc/cp/call.c:3179
0x6025cb add_template_candidate
../../gcc/gcc/cp/call.c:3261

Live example:

https://godbolt.org/g/HNEuE8

[Bug fortran/81773] [Coarray] Get with vector index on lhs leads to incorrect caf_get_by_ref() call.

2018-05-06 Thread vehre at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81773

--- Comment #9 from vehre at gcc dot gnu.org ---
Author: vehre
Date: Sun May  6 12:14:11 2018
New Revision: 259978

URL: https://gcc.gnu.org/viewcvs?rev=259978&root=gcc&view=rev
Log:
gcc/fortran/ChangeLog:

2018-04-28  Andre Vehreschild  

PR fortran/81773
PR fortran/83606
Backport from trunk
* dependency.c (gfc_dep_resolver): Coarray indexes are to be ignored
during dependency computation.  They define no data dependency.
* trans-array.c (conv_array_index_offset): The stride can not be set
here, prevent fail.
* trans-intrinsic.c (conv_caf_send): Add creation of temporary array
for caf_get's result and copying to the array with vectorial
indexing.

gcc/testsuite/ChangeLog:

2018-04-28  Andre Vehreschild  

PR fortran/81773
PR fortran/83606
Backport from trunk
* gfortran.dg/coarray/get_to_indexed_array_1.f90: New test.
* gfortran.dg/coarray/get_to_indirect_array.f90: New test.


Added:
branches/gcc-6-branch/gcc/testsuite/gfortran.dg/coarray_dependency_1.f90
Modified:
branches/gcc-6-branch/gcc/fortran/ChangeLog
branches/gcc-6-branch/gcc/fortran/dependency.c
branches/gcc-6-branch/gcc/fortran/trans-intrinsic.c
branches/gcc-6-branch/gcc/testsuite/ChangeLog
branches/gcc-6-branch/gcc/testsuite/gfortran.dg/coarray_lib_comm_1.f90

[Bug fortran/83606] [6/7/8 Regression] co-indexed array RHS yields incorrect result in assignment to vector-indexed LHS

2018-05-06 Thread vehre at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83606

--- Comment #10 from vehre at gcc dot gnu.org ---
Author: vehre
Date: Sun May  6 12:14:11 2018
New Revision: 259978

URL: https://gcc.gnu.org/viewcvs?rev=259978&root=gcc&view=rev
Log:
gcc/fortran/ChangeLog:

2018-04-28  Andre Vehreschild  

PR fortran/81773
PR fortran/83606
Backport from trunk
* dependency.c (gfc_dep_resolver): Coarray indexes are to be ignored
during dependency computation.  They define no data dependency.
* trans-array.c (conv_array_index_offset): The stride can not be set
here, prevent fail.
* trans-intrinsic.c (conv_caf_send): Add creation of temporary array
for caf_get's result and copying to the array with vectorial
indexing.

gcc/testsuite/ChangeLog:

2018-04-28  Andre Vehreschild  

PR fortran/81773
PR fortran/83606
Backport from trunk
* gfortran.dg/coarray/get_to_indexed_array_1.f90: New test.
* gfortran.dg/coarray/get_to_indirect_array.f90: New test.


Added:
branches/gcc-6-branch/gcc/testsuite/gfortran.dg/coarray_dependency_1.f90
Modified:
branches/gcc-6-branch/gcc/fortran/ChangeLog
branches/gcc-6-branch/gcc/fortran/dependency.c
branches/gcc-6-branch/gcc/fortran/trans-intrinsic.c
branches/gcc-6-branch/gcc/testsuite/ChangeLog
branches/gcc-6-branch/gcc/testsuite/gfortran.dg/coarray_lib_comm_1.f90

[Bug fortran/81773] [Coarray] Get with vector index on lhs leads to incorrect caf_get_by_ref() call.

2018-05-06 Thread vehre at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81773

--- Comment #10 from vehre at gcc dot gnu.org ---
Author: vehre
Revision: 259978
Modified property: svn:log

Modified: svn:log at Sun May  6 12:20:52 2018
--
--- svn:log (original)
+++ svn:log Sun May  6 12:20:52 2018
@@ -1,25 +1,21 @@
 gcc/fortran/ChangeLog:

-2018-04-28  Andre Vehreschild  
+2018-05-06  Andre Vehreschild  

-   PR fortran/81773
-   PR fortran/83606
-   Backport from trunk
-   * dependency.c (gfc_dep_resolver): Coarray indexes are to be ignored
-   during dependency computation.  They define no data dependency.
-   * trans-array.c (conv_array_index_offset): The stride can not be set
-   here, prevent fail.
-   * trans-intrinsic.c (conv_caf_send): Add creation of temporary array
-   for caf_get's result and copying to the array with vectorial
-   indexing.
+PR fortran/85507
+Backport from trunk.
+* dependency.c (gfc_dep_resolver): Revert looking at coarray dimension
+introduced by r259385.
+* trans-intrinsic.c (conv_caf_send): Always report a dependency for
+same variables in coarray assignments.

 gcc/testsuite/ChangeLog:

-2018-04-28  Andre Vehreschild  
+2018-05-06  Andre Vehreschild  

-   PR fortran/81773
-   PR fortran/83606
-   Backport from trunk
-   * gfortran.dg/coarray/get_to_indexed_array_1.f90: New test.
-   * gfortran.dg/coarray/get_to_indirect_array.f90: New test.
+PR fortran/85507
+Backport from trunk.
+* gfortran.dg/coarray_dependency_1.f90: New test.
+* gfortran.dg/coarray_lib_comm_1.f90: Fix counting caf-expressions.

+

[Bug fortran/85507] [6/7/8/9 Regression] ICE in gfc_dep_resolver, at fortran/dependency.c:2258

2018-05-06 Thread vehre at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85507

--- Comment #18 from vehre at gcc dot gnu.org ---
Author: vehre
Revision: 259978
Modified property: svn:log

Modified: svn:log at Sun May  6 12:20:52 2018
--
--- svn:log (original)
+++ svn:log Sun May  6 12:20:52 2018
@@ -1,25 +1,21 @@
 gcc/fortran/ChangeLog:

-2018-04-28  Andre Vehreschild  
+2018-05-06  Andre Vehreschild  

-   PR fortran/81773
-   PR fortran/83606
-   Backport from trunk
-   * dependency.c (gfc_dep_resolver): Coarray indexes are to be ignored
-   during dependency computation.  They define no data dependency.
-   * trans-array.c (conv_array_index_offset): The stride can not be set
-   here, prevent fail.
-   * trans-intrinsic.c (conv_caf_send): Add creation of temporary array
-   for caf_get's result and copying to the array with vectorial
-   indexing.
+PR fortran/85507
+Backport from trunk.
+* dependency.c (gfc_dep_resolver): Revert looking at coarray dimension
+introduced by r259385.
+* trans-intrinsic.c (conv_caf_send): Always report a dependency for
+same variables in coarray assignments.

 gcc/testsuite/ChangeLog:

-2018-04-28  Andre Vehreschild  
+2018-05-06  Andre Vehreschild  

-   PR fortran/81773
-   PR fortran/83606
-   Backport from trunk
-   * gfortran.dg/coarray/get_to_indexed_array_1.f90: New test.
-   * gfortran.dg/coarray/get_to_indirect_array.f90: New test.
+PR fortran/85507
+Backport from trunk.
+* gfortran.dg/coarray_dependency_1.f90: New test.
+* gfortran.dg/coarray_lib_comm_1.f90: Fix counting caf-expressions.

+

[Bug fortran/83606] [6/7/8 Regression] co-indexed array RHS yields incorrect result in assignment to vector-indexed LHS

2018-05-06 Thread vehre at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83606

--- Comment #11 from vehre at gcc dot gnu.org ---
Author: vehre
Revision: 259978
Modified property: svn:log

Modified: svn:log at Sun May  6 12:20:52 2018
--
--- svn:log (original)
+++ svn:log Sun May  6 12:20:52 2018
@@ -1,25 +1,21 @@
 gcc/fortran/ChangeLog:

-2018-04-28  Andre Vehreschild  
+2018-05-06  Andre Vehreschild  

-   PR fortran/81773
-   PR fortran/83606
-   Backport from trunk
-   * dependency.c (gfc_dep_resolver): Coarray indexes are to be ignored
-   during dependency computation.  They define no data dependency.
-   * trans-array.c (conv_array_index_offset): The stride can not be set
-   here, prevent fail.
-   * trans-intrinsic.c (conv_caf_send): Add creation of temporary array
-   for caf_get's result and copying to the array with vectorial
-   indexing.
+PR fortran/85507
+Backport from trunk.
+* dependency.c (gfc_dep_resolver): Revert looking at coarray dimension
+introduced by r259385.
+* trans-intrinsic.c (conv_caf_send): Always report a dependency for
+same variables in coarray assignments.

 gcc/testsuite/ChangeLog:

-2018-04-28  Andre Vehreschild  
+2018-05-06  Andre Vehreschild  

-   PR fortran/81773
-   PR fortran/83606
-   Backport from trunk
-   * gfortran.dg/coarray/get_to_indexed_array_1.f90: New test.
-   * gfortran.dg/coarray/get_to_indirect_array.f90: New test.
+PR fortran/85507
+Backport from trunk.
+* gfortran.dg/coarray_dependency_1.f90: New test.
+* gfortran.dg/coarray_lib_comm_1.f90: Fix counting caf-expressions.

+

[Bug fortran/85507] [6/7/8/9 Regression] ICE in gfc_dep_resolver, at fortran/dependency.c:2258

2018-05-06 Thread vehre at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85507

--- Comment #19 from vehre at gcc dot gnu.org ---
Author: vehre
Date: Sun May  6 12:33:07 2018
New Revision: 259979

URL: https://gcc.gnu.org/viewcvs?rev=259979&root=gcc&view=rev
Log:
gcc/fortran/ChangeLog:

2018-05-06  Andre Vehreschild  

PR fortran/85507
Backport from trunk.
* dependency.c (gfc_dep_resolver): Revert looking at coarray dimension
introduced by r259385.
* trans-intrinsic.c (conv_caf_send): Always report a dependency for
same variables in coarray assignments.

gcc/testsuite/ChangeLog:

2018-05-06  Andre Vehreschild  

PR fortran/85507
Backport from trunk.
* gfortran.dg/coarray_dependency_1.f90: New test.
* gfortran.dg/coarray_lib_comm_1.f90: Fix counting caf-expressions.


Added:
branches/gcc-8-branch/gcc/testsuite/gfortran.dg/coarray_dependency_1.f90
Modified:
branches/gcc-8-branch/gcc/fortran/ChangeLog
branches/gcc-8-branch/gcc/fortran/dependency.c
branches/gcc-8-branch/gcc/fortran/trans-intrinsic.c
branches/gcc-8-branch/gcc/testsuite/ChangeLog
branches/gcc-8-branch/gcc/testsuite/gfortran.dg/coarray_lib_comm_1.f90

[Bug regression/85669] New: fail on s-case-cfn-macros: build/gencfn-macros: DEF_INTERNAL_FLT_FN (%smth%) has no associated built-in functions

2018-05-06 Thread dougmencken at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85669

Bug ID: 85669
   Summary: fail on s-case-cfn-macros: build/gencfn-macros:
DEF_INTERNAL_FLT_FN (%smth%) has no associated
built-in functions
   Product: gcc
   Version: 8.1.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: regression
  Assignee: unassigned at gcc dot gnu.org
  Reporter: dougmencken at gmail dot com
  Target Milestone: ---

I’m building gcc 8.1 release, and got

build/gencheck > tmp-check.h
/bin/sh ../../gcc-8.1.0/gcc/../move-if-change tmp-check.h tree-check.h
echo timestamp > s-check
build/gencfn-macros -c \
  > tmp-case-cfn-macros.h
build/gencfn-macros: DEF_INTERNAL_FLT_FN (ACOS) has no associated built-in
functions
build/gencfn-macros: DEF_INTERNAL_FLT_FN (ASIN) has no associated built-in
functions
build/gencfn-macros: DEF_INTERNAL_FLT_FN (ATAN) has no associated built-in
functions
build/gencfn-macros: DEF_INTERNAL_FLT_FN (COS) has no associated built-in
functions
build/gencfn-macros: DEF_INTERNAL_FLT_FN (EXP) has no associated built-in
functions
build/gencfn-macros: DEF_INTERNAL_FLT_FN (EXP10) has no associated built-in
functions
build/gencfn-macros: DEF_INTERNAL_FLT_FN (EXP2) has no associated built-in
functions
build/gencfn-macros: DEF_INTERNAL_FLT_FN (EXPM1) has no associated built-in
functions
build/gencfn-macros: DEF_INTERNAL_FLT_FN (LOG) has no associated built-in
functions
build/gencfn-macros: DEF_INTERNAL_FLT_FN (LOG10) has no associated built-in
functions
build/gencfn-macros: DEF_INTERNAL_FLT_FN (LOG1P) has no associated built-in
functions
build/gencfn-macros: DEF_INTERNAL_FLT_FN (LOG2) has no associated built-in
functions
build/gencfn-macros: DEF_INTERNAL_FLT_FN (LOGB) has no associated built-in
functions
build/gencfn-macros: DEF_INTERNAL_FLT_FN (SIN) has no associated built-in
functions
build/gencfn-macros: DEF_INTERNAL_FLT_FN (SQRT) has no associated built-in
functions
build/gencfn-macros: DEF_INTERNAL_FLT_FN (TAN) has no associated built-in
functions
build/gencfn-macros: DEF_INTERNAL_FLT_FN (CEIL) has no associated built-in
functions
build/gencfn-macros: DEF_INTERNAL_FLT_FN (FLOOR) has no associated built-in
functions
build/gencfn-macros: DEF_INTERNAL_FLT_FN (RINT) has no associated built-in
functions
build/gencfn-macros: DEF_INTERNAL_FLT_FN (ROUND) has no associated built-in
functions
build/gencfn-macros: DEF_INTERNAL_FLT_FN (TRUNC) has no associated built-in
functions
build/gencfn-macros: DEF_INTERNAL_FLT_FN (ATAN2) has no associated built-in
functions
build/gencfn-macros: DEF_INTERNAL_FLT_FN (FMOD) has no associated built-in
functions
build/gencfn-macros: DEF_INTERNAL_FLT_FN (POW) has no associated built-in
functions
build/gencfn-macros: DEF_INTERNAL_FLT_FN (SCALB) has no associated built-in
functions
build/gencfn-macros: DEF_INTERNAL_FLT_FN (FMIN) has no associated built-in
functions
build/gencfn-macros: DEF_INTERNAL_FLT_FN (FMAX) has no associated built-in
functions
build/gencfn-macros: DEF_INTERNAL_FLT_FN (LDEXP) has no associated built-in
functions
build/gencfn-macros: DEF_INTERNAL_INT_FN (CLRSB) has no associated built-in
functions
build/gencfn-macros: DEF_INTERNAL_INT_FN (CLZ) has no associated built-in
functions
build/gencfn-macros: DEF_INTERNAL_INT_FN (CTZ) has no associated built-in
functions
build/gencfn-macros: DEF_INTERNAL_INT_FN (FFS) has no associated built-in
functions
build/gencfn-macros: DEF_INTERNAL_INT_FN (PARITY) has no associated built-in
functions
make[3]: *** [s-case-cfn-macros] Error 1
make[3]: *** Waiting for unfinished jobs
rm gcc.pod
make[2]: *** [all-stage2-gcc] Error 2
make[1]: *** [stage2-bubble] Error 2
make: *** [all] Error 2

it is on stage2, stage1 was okay

[Bug fortran/85599] invalid optimization: function not always evaluated in logical expression

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

Dominique d'Humieres  changed:

   What|Removed |Added

 Status|NEW |WAITING

--- Comment #12 from Dominique d'Humieres  ---
IMO the interpretation of 7.1.4 (10.1.4 in my F2018 draft) in comment 4
contradicts the note 7.28 (10.28) which explicitly states that L(Z) need not be
evaluated if X is greater than Y, i.e., check() here.

Evaluating

A = B .and. C

where A is a logical variable and B and C are logical variables, expressions,
..., as

if (B) then
  A = C
else
  A = .false.
end if

is not even an optimization.

I think this PR should be closed either as INVALID or a duplicate of pr57160.

[Bug libstdc++/85670] New: `std::filesystem` does not compile on mingw-w64

2018-05-06 Thread lh_mouse at 126 dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85670

Bug ID: 85670
   Summary: `std::filesystem` does not compile on mingw-w64
   Product: gcc
   Version: 8.1.1
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: libstdc++
  Assignee: unassigned at gcc dot gnu.org
  Reporter: lh_mouse at 126 dot com
  Target Milestone: ---

Created attachment 44080
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=44080&action=edit
compiler errors

Compiling this simple code using `g++ -std=c++17 test.cc`:

```
#include 

int main() {
std::filesystem::rename(std::filesystem::path("a"),
std::filesystem::path("b"));
}
```
results in a number of errors (attached).

The `no match for 'operator!='` error is caused by inline definition of `path&
operator/=(const path& __p)`, where the `operator!=()` has not been visible.

[Bug regression/85669] fail on s-case-cfn-macros: build/gencfn-macros: DEF_INTERNAL_FLT/INT_FN (%smth%) has no associated built-in functions

2018-05-06 Thread dougmencken at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85669

--- Comment #1 from Douglas Mencken  ---
May this https://patchwork.ozlabs.org/patch/838856/ is related?

[Bug libstdc++/85671] New: Lack of `std::move()` inside `operator/` for `std::filesystem::path`.

2018-05-06 Thread lh_mouse at 126 dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85671

Bug ID: 85671
   Summary: Lack of `std::move()` inside `operator/` for
`std::filesystem::path`.
   Product: gcc
   Version: 8.1.1
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: libstdc++
  Assignee: unassigned at gcc dot gnu.org
  Reporter: lh_mouse at 126 dot com
  Target Milestone: ---

In 'bits/fs_path.h' there is

```
  /// Append one path to another
  inline path operator/(const path& __lhs, const path& __rhs)
  { return path(__lhs) /= __rhs; }
```


Isn't this returning a copy of the unnamed object, because `operator/=` returns
an lvalue reference?  

I think the operand of the return statement should be `move(path(__lhs) /=
__rhs)`.

[Bug target/85665] Multiple typos in diagnostics

2018-05-06 Thread roland.illig at gmx dot de
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85665

--- Comment #3 from Roland Illig  ---
(In reply to Jonathan Wakely from comment #2)
> It might be better to report multiple bugs, one per target backend, so that
> the relevant target maintainers are informed.

Oh, I tried that last year. Of the 113 bugs I reported, 41 are still open.
Therefore I thought I'd try a different approach this time.

Since it's only about the wording of the diagnostics, it should be possible to
handle them all in a few commits, rather than splitting the work onto 12
people.

> To avoid similar problems in future, I wonder if a weekly email detailing
> any new or modified diagnostics could be produced automatically. The
> diagnostics maintainers (and anybody else interested) could look over it and
> ensure that we use correct grammar, punctuation, and style.

Does this mean you already have diagnostics maintainers? That would be bad
because then they should have caught many of these typos already. There were
only 53 new strings to translate, and 12 of them contain mistakes.

Instead of pushing this task to humans, I still think an automatic process is
much more efficient since it doesn't overlook the most commonly occurring
patterns. Having human proof readers in addition is nice, too. But having the
existing rules codified in a linter program is more important.

[Bug libstdc++/85672] New: error: redefinition of 'constexpr long double std::abs(long double)'

2018-05-06 Thread danglin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85672

Bug ID: 85672
   Summary: error: redefinition of 'constexpr long double
std::abs(long double)'
   Product: gcc
   Version: 9.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: libstdc++
  Assignee: unassigned at gcc dot gnu.org
  Reporter: danglin at gcc dot gnu.org
  Target Milestone: ---
  Host: hppa2.0w-hp-hpux11.11
Target: hppa2.0w-hp-hpux11.11
 Build: hppa2.0w-hp-hpux11.11

libtool: compile:  /test/gnu/gcc/objdir/./gcc/xgcc -shared-libgcc
-B/test/gnu/gc
c/objdir/./gcc -nostdinc++
-L/test/gnu/gcc/objdir/hppa2.0w-hp-hpux11.11/libstdc+
+-v3/src -L/test/gnu/gcc/objdir/hppa2.0w-hp-hpux11.11/libstdc++-v3/src/.libs
-L/
test/gnu/gcc/objdir/hppa2.0w-hp-hpux11.11/libstdc++-v3/libsupc++/.libs
-B/opt/gn
u/gcc/gcc-9/hppa2.0w-hp-hpux11.11/bin/
-B/opt/gnu/gcc/gcc-9/hppa2.0w-hp-hpux11.1
1/lib/ -isystem /opt/gnu/gcc/gcc-9/hppa2.0w-hp-hpux11.11/include -isystem
/opt/g
nu/gcc/gcc-9/hppa2.0w-hp-hpux11.11/sys-include -fno-checking
-I/test/gnu/gcc/gcc
/libstdc++-v3/../libgcc
-I/test/gnu/gcc/objdir/hppa2.0w-hp-hpux11.11/libstdc++-v
3/include/hppa2.0w-hp-hpux11.11
-I/test/gnu/gcc/objdir/hppa2.0w-hp-hpux11.11/lib
stdc++-v3/include -I/test/gnu/gcc/gcc/libstdc++-v3/libsupc++ -D_GLIBCXX_SHARED
-
fno-implicit-templates -Wall -Wextra -Wwrite-strings -Wcast-qual -Wabi
-fdiagnos
tics-show-location=once -frandom-seed=atexit_thread.lo -g -O2 -c
../../../../gcc
/libstdc++-v3/libsupc++/atexit_thread.cc  -fPIC -DPIC -D_GLIBCXX_SHARED -o
atexi
t_thread.o
In file included from
/test/gnu/gcc/objdir/hppa2.0w-hp-hpux11.11/libstdc++-v3/include/cstdlib:77,
 from
../../../../gcc/libstdc++-v3/libsupc++/atexit_thread.cc:25:
/test/gnu/gcc/objdir/hppa2.0w-hp-hpux11.11/libstdc++-v3/include/bits/std_abs.h:102:3:
error: redefinition of 'constexpr long double std::abs(long double)'
   abs(__float128 __x)
   ^~~
/test/gnu/gcc/objdir/hppa2.0w-hp-hpux11.11/libstdc++-v3/include/bits/std_abs.h:78:3:
note: 'constexpr long double std::abs(long double)' previously defined here
   abs(long double __x)
   ^~~
In file included from
/test/gnu/gcc/objdir/hppa2.0w-hp-hpux11.11/libstdc++-v3/include/bits/move.h:55,
 from
/test/gnu/gcc/objdir/hppa2.0w-hp-hpux11.11/libstdc++-v3/include/bits/nested_exception.h:40,
 from /test/gnu/gcc/gcc/libstdc++-v3/libsupc++/exception:144,
 from /test/gnu/gcc/gcc/libstdc++-v3/libsupc++/new:40,
 from
../../../../gcc/libstdc++-v3/libsupc++/atexit_thread.cc:26:
/test/gnu/gcc/objdir/hppa2.0w-hp-hpux11.11/libstdc++-v3/include/type_traits:347:12:
error: redefinition of 'struct std::__is_floating_point_helper'
 struct __is_floating_point_helper<__float128>
^~
/test/gnu/gcc/objdir/hppa2.0w-hp-hpux11.11/libstdc++-v3/include/type_traits:342:12:
note: previous definition of 'struct std::__is_floating_point_helper'
 struct __is_floating_point_helper
^~~

[Bug regression/85669] fail on s-case-cfn-macros: build/gencfn-macros: DEF_INTERNAL_FLT/INT_FN (%smth%) has no associated built-in functions

2018-05-06 Thread dougmencken at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85669

--- Comment #2 from Douglas Mencken  ---
reverting of Michael’s patch gives

/Developer/GCC/7.3p/PowerPC/32bit/bin/g++ -std=gnu++98 -fno-PIE -c 
-DIN_GCC_FRONTEND -DIN_GCC_FRONTEND -g -mdynamic-no-pic -DIN_GCC
-fno-exceptions -fno-rtti -fasynchronous-unwind-tables -W -Wall -Wno-narrowing
-Wwrite-strings -Wcast-qual -Wno-format -Wmissing-format-attribute
-Woverloaded-virtual -pedantic -Wno-long-long -Wno-variadic-macros
-Wno-overlength-strings   -DHAVE_CONFIG_H -I. -I. -I../../gcc-8.1.0/gcc
-I../../gcc-8.1.0/gcc/. -I../../gcc-8.1.0/gcc/../include
-I../../gcc-8.1.0/gcc/../libcpp/include
-I/Volumes/hfsplushd/Development/gcc-toolchain/_gcc_boo/./gmp
-I/Volumes/hfsplushd/Development/gcc-toolchain/gcc-8.1.0/gmp
-I/Volumes/hfsplushd/Development/gcc-toolchain/_gcc_boo/./mpfr/src
-I/Volumes/hfsplushd/Development/gcc-toolchain/gcc-8.1.0/mpfr/src
-I/Volumes/hfsplushd/Development/gcc-toolchain/gcc-8.1.0/mpc/src 
-I../../gcc-8.1.0/gcc/../libdecnumber -I../../gcc-8.1.0/gcc/../libdecnumber/dpd
-I../libdecnumber -I../../gcc-8.1.0/gcc/../libbacktrace
-I/Volumes/hfsplushd/Development/gcc-toolchain/_gcc_boo/./isl/include
-I/Volumes/hfsplushd/Development/gcc-toolchain/gcc-8.1.0/isl/include  -o
attribs.o -MT attribs.o -MMD -MP -MF ./.deps/attribs.TPo
../../gcc-8.1.0/gcc/attribs.c
In file included from ../../gcc-8.1.0/gcc/target.h:51:0,
 from ../../gcc-8.1.0/gcc/attribs.c:23:
./insn-codes.h:505:4: error: redefinition of 'CODE_FOR_floorkf2'
CODE_FOR_floorkf2 = CODE_FOR_nothing,
^
./insn-codes.h:497:4: note: 'CODE_FOR_floorkf2' previously defined here
CODE_FOR_floorkf2 = CODE_FOR_nothing,
^
./insn-codes.h:506:4: error: redefinition of 'CODE_FOR_floortf2'
CODE_FOR_floortf2 = CODE_FOR_nothing,
^
./insn-codes.h:498:4: note: 'CODE_FOR_floortf2' previously defined here
CODE_FOR_floortf2 = CODE_FOR_nothing,
^
./insn-codes.h:507:4: error: redefinition of 'CODE_FOR_ceilkf2'
CODE_FOR_ceilkf2 = CODE_FOR_nothing,
^~~~
./insn-codes.h:499:4: note: 'CODE_FOR_ceilkf2' previously defined here
CODE_FOR_ceilkf2 = CODE_FOR_nothing,
^~~~
./insn-codes.h:508:4: error: redefinition of 'CODE_FOR_ceiltf2'
CODE_FOR_ceiltf2 = CODE_FOR_nothing,
^~~~
./insn-codes.h:500:4: note: 'CODE_FOR_ceiltf2' previously defined here
CODE_FOR_ceiltf2 = CODE_FOR_nothing,
^~~~
./insn-codes.h:509:4: error: redefinition of 'CODE_FOR_btrunckf2'
CODE_FOR_btrunckf2 = CODE_FOR_nothing,
^~
./insn-codes.h:501:4: note: 'CODE_FOR_btrunckf2' previously defined here
CODE_FOR_btrunckf2 = CODE_FOR_nothing,
^~
./insn-codes.h:510:4: error: redefinition of 'CODE_FOR_btrunctf2'
CODE_FOR_btrunctf2 = CODE_FOR_nothing,
^~
./insn-codes.h:502:4: note: 'CODE_FOR_btrunctf2' previously defined here
CODE_FOR_btrunctf2 = CODE_FOR_nothing,
^~
./insn-codes.h:511:4: error: redefinition of 'CODE_FOR_roundkf2'
CODE_FOR_roundkf2 = CODE_FOR_nothing,
^
./insn-codes.h:503:4: note: 'CODE_FOR_roundkf2' previously defined here
CODE_FOR_roundkf2 = CODE_FOR_nothing,
^
./insn-codes.h:512:4: error: redefinition of 'CODE_FOR_roundtf2'
CODE_FOR_roundtf2 = CODE_FOR_nothing,
^
./insn-codes.h:504:4: note: 'CODE_FOR_roundtf2' previously defined here
CODE_FOR_roundtf2 = CODE_FOR_nothing,
^
In file included from ./tm.h:25:0,
 from ../../gcc-8.1.0/gcc/target.h:52,
 from ../../gcc-8.1.0/gcc/attribs.c:23:
./insn-flags.h: In function 'rtx_def* gen_floorkf2(rtx, rtx)':
./insn-flags.h:3484:1: error: redefinition of 'rtx_def* gen_floorkf2(rtx, rtx)'
 gen_floorkf2(rtx ARG_UNUSED (a), rtx ARG_UNUSED (b))
 ^~~~
./insn-flags.h:3436:1: note: 'rtx_def* gen_floorkf2(rtx, rtx)' previously
defined here
 gen_floorkf2(rtx ARG_UNUSED (a), rtx ARG_UNUSED (b))
 ^~~~
./insn-flags.h: In function 'rtx_def* gen_floortf2(rtx, rtx)':
./insn-flags.h:3490:1: error: redefinition of 'rtx_def* gen_floortf2(rtx, rtx)'
 gen_floortf2(rtx ARG_UNUSED (a), rtx ARG_UNUSED (b))
 ^~~~
./insn-flags.h:3442:1: note: 'rtx_def* gen_floortf2(rtx, rtx)' previously
defined here
 gen_floortf2(rtx ARG_UNUSED (a), rtx ARG_UNUSED (b))
 ^~~~
./insn-flags.h: In function 'rtx_def* gen_ceilkf2(rtx, rtx)':
./insn-flags.h:3496:1: error: redefinition of 'rtx_def* gen_ceilkf2(rtx, rtx)'
 gen_ceilkf2(rtx ARG_UNUSED (a), rtx ARG_UNUSED (b))
 ^~~
./insn-flags.h:3448:1: note: 'rtx_def* gen_ceilkf2(rtx, rtx)' previously
defined here
 gen_ceilkf2(rtx ARG_UNUSED (a), rtx ARG_UNUSED (b))
 ^~~
./insn-flags.h: In function 'rtx_def* gen_ceiltf2(rtx, rtx)':
./insn-flags.h:3502:1: error: redefinition of 'rtx_def* gen_ceiltf2(rtx, rtx)'
 gen_ceiltf2(rtx ARG_UNUSED (a), rtx ARG_UNUSED (b))

[Bug rtl-optimization/85673] New: ICE in create_pre_exit, at mode-switching.c:451

2018-05-06 Thread asolokha at gmx dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85673

Bug ID: 85673
   Summary: ICE in create_pre_exit, at mode-switching.c:451
   Product: gcc
   Version: unknown
Status: UNCONFIRMED
  Keywords: ice-checking, ice-on-invalid-code
  Severity: normal
  Priority: P3
 Component: rtl-optimization
  Assignee: unassigned at gcc dot gnu.org
  Reporter: asolokha at gmx dot com
  Target Milestone: ---
Target: x86_64-unknown-linux-gnu

gcc-9.0.0-alpha20180429 snapshot (r259749), 8.1, 7.3, 6.3 all ICE when
compiling the following snippet w/ -mavx -O2 -fgcse-sm -fschedule-insns
-fselective-scheduling -fno-dce -fno-forward-propagate
-fno-rerun-cse-after-loop -fno-tree-dse -fno-tree-ter --param
selsched-max-lookahead=34:

int fn, l0, mo;

int
kg ();

int
pm (int *i2, int a8)
{
  int v8;

  a8 += kg ();
  v8 = a8 < fn;
  v8 = mo < v8;
  v8 = v8 < i2;
  v8 = mo < v8;
  mo += v8;
  a8 += l0;
  l0 += a8;

  for (fn = 0; fn < 1; ++fn)
{
}

  for (mo = 0; mo < 1; ++mo)
   {
   }

  return i2;
}

% x86_64-unknown-linux-gnu-gcc-9.0.0-alpha20180429 -mavx -O2 -fgcse-sm
-fschedule-insns -fselective-scheduling -fno-dce -fno-forward-propagate
-fno-rerun-cse-after-loop -fno-tree-dse -fno-tree-ter --param
selsched-max-lookahead=34 -w -c cyrbs0xx.c
during RTL pass: vzeroupper
cyrbs0xx.c: In function 'pm':
cyrbs0xx.c:29:1: internal compiler error: in create_pre_exit, at
mode-switching.c:451
 }
 ^
0x7372b7 create_pre_exit
   
/var/tmp/portage/sys-devel/gcc-9.0.0_alpha20180429/work/gcc-9-20180429/gcc/mode-switching.c:438
0x7372b7 optimize_mode_switching
   
/var/tmp/portage/sys-devel/gcc-9.0.0_alpha20180429/work/gcc-9-20180429/gcc/mode-switching.c:534
0x7372b7 execute
   
/var/tmp/portage/sys-devel/gcc-9.0.0_alpha20180429/work/gcc-9-20180429/gcc/mode-switching.c:892
0xfbc275 rest_of_handle_insert_vzeroupper
   
/var/tmp/portage/sys-devel/gcc-9.0.0_alpha20180429/work/gcc-9-20180429/gcc/config/i386/i386.c:898
0xfbc275 execute
   
/var/tmp/portage/sys-devel/gcc-9.0.0_alpha20180429/work/gcc-9-20180429/gcc/config/i386/i386.c:2518

[Bug target/85434] Address of stack protector guard spilled to stack on ARM

2018-05-06 Thread thopre01 at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85434

--- Comment #11 from Thomas Preud'homme  ---
I've started to work on a new patch according to review feedbacks. I've reached
the stage where I can compile without -fPIC with the stack protect test being
an UNSPEC split after register allocation as suggested.

Next steps are:

1) do the same for the stack protect set (ie setting the canari)
2) add support for PIC access to the guard
3) include the conditional branch in the combined stack protect test to ensure
the register holding the result of the comparison is not spilled before it's
used for the conditional branch
4) clear all registers involved before branching
5) cleanup the patch

[Bug libstdc++/85672] error: redefinition of 'constexpr long double std::abs(long double)'

2018-05-06 Thread glisse at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85672

--- Comment #1 from Marc Glisse  ---
I think there is an inconsistency where we #define _GLIBCXX_USE_FLOAT128 0 (can
you check your c++config.h?) to say that it shouldn't be supported, but then
test with #ifdef and not #if.

[Bug libstdc++/85672] error: redefinition of 'constexpr long double std::abs(long double)'

2018-05-06 Thread danglin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85672

--- Comment #2 from John David Anglin  ---
The config file looks like this:

/* Define if __float128 is supported on this host. */
# define _GLIBCXX_USE_FLOAT128 0
#if !defined(__FLOAT128__) && !defined(__SIZEOF_FLOAT128__)
#undef _GLIBCXX_USE_FLOAT128
#endif

I think __FLOAT128__ and __SIZEOF_FLOAT128__ are defined because we have:

  /* Under HPUX, the __float128 type is a synonym for "long double".  */
  (*lang_hooks.types.register_builtin_type) (long_double_type_node,
 "__float128");

[Bug rtl-optimization/85673] ICE in create_pre_exit, at mode-switching.c:451

2018-05-06 Thread amonakov at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85673

Alexander Monakov  changed:

   What|Removed |Added

 Status|UNCONFIRMED |ASSIGNED
   Last reconfirmed||2018-05-06
 CC||abel at gcc dot gnu.org,
   ||amonakov at gcc dot gnu.org
 Blocks||84301
   Assignee|unassigned at gcc dot gnu.org  |amonakov at gcc dot 
gnu.org
 Ever confirmed|0   |1

--- Comment #1 from Alexander Monakov  ---
PR 84301 is related (not backported to 6/7 so failure is expected there).

The fix was incomplete because 'cant_move' insn flag only restricts inter-block
motion (argh!), so sel-sched is still free to move %eax assignment up. Oops.

Perhaps we can additionally set sched_group_p in add_branch_dependences for
pre-RA sel-sched to ensure insns stay at the end of basic block; after reload
that would also pin mutex_p cond-exec insns to BB end as well.

(apropos: flag_sched_group_heuristic should be removed, the way it's used in
rank_for_schedule is not a heuristic, but a correctness requirement)

Overall I'm concerned that mode-switching is making unreasonable assumptions,
if it really needs that some insns stay in sequence just before function
return, they should be arranged to have a barrier insn or SCHED_GROUP_P from
the beginning. So maybe it's better to adjust mode-switching instead, but
unfortunately it's not quite obvious how it works :)


Referenced Bugs:

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84301
[Bug 84301] [6/7 Regression] ICE in create_pre_exit, at mode-switching.c:451

[Bug c/85664] Don't ask questions if there's no way to answer

2018-05-06 Thread ebotcazou at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85664

Eric Botcazou  changed:

   What|Removed |Added

 CC||ebotcazou at gcc dot gnu.org
Summary|Don't ask questions if  |Don't ask questions if
   |tere's no way to answer |there's no way to answer

--- Comment #5 from Eric Botcazou  ---
Not all questions are meant to elicit an answer though.  That being said, it
would be interesting to know whether other compilers (or text processors) do
it.

[Bug c++/85659] [6/7/8/9 Regression] ICE with inline assembly inside virtual function

2018-05-06 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85659

--- Comment #3 from Jakub Jelinek  ---
Author: jakub
Date: Sun May  6 21:14:35 2018
New Revision: 259981

URL: https://gcc.gnu.org/viewcvs?rev=259981&root=gcc&view=rev
Log:
PR c++/85659
* cfgexpand.c (expand_asm_stmt): Don't create a temporary if
the type is addressable.  Don't force op into register if it has
BLKmode.

* g++.dg/ext/asm14.C: New test.
* g++.dg/ext/asm15.C: New test.
* g++.dg/ext/asm16.C: New test.

Added:
trunk/gcc/testsuite/g++.dg/ext/asm14.C
trunk/gcc/testsuite/g++.dg/ext/asm15.C
trunk/gcc/testsuite/g++.dg/ext/asm16.C
Modified:
trunk/gcc/ChangeLog
trunk/gcc/cfgexpand.c
trunk/gcc/testsuite/ChangeLog

[Bug c++/85659] [6/7/8/9 Regression] ICE with inline assembly inside virtual function

2018-05-06 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85659

--- Comment #4 from Jakub Jelinek  ---
Author: jakub
Date: Sun May  6 21:52:25 2018
New Revision: 259982

URL: https://gcc.gnu.org/viewcvs?rev=259982&root=gcc&view=rev
Log:
PR c++/85659
* cfgexpand.c (expand_asm_stmt): Don't create a temporary if
the type is addressable.  Don't force op into register if it has
BLKmode.

* g++.dg/ext/asm14.C: New test.
* g++.dg/ext/asm15.C: New test.
* g++.dg/ext/asm16.C: New test.

Added:
branches/gcc-8-branch/gcc/testsuite/g++.dg/ext/asm14.C
branches/gcc-8-branch/gcc/testsuite/g++.dg/ext/asm15.C
branches/gcc-8-branch/gcc/testsuite/g++.dg/ext/asm16.C
Modified:
branches/gcc-8-branch/gcc/ChangeLog
branches/gcc-8-branch/gcc/cfgexpand.c
branches/gcc-8-branch/gcc/testsuite/ChangeLog

[Bug rtl-optimization/85674] New: ICE insn_min_length, at config/rs6000/rs6000.md:6661

2018-05-06 Thread asolokha at gmx dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85674

Bug ID: 85674
   Summary: ICE insn_min_length, at config/rs6000/rs6000.md:6661
   Product: gcc
   Version: unknown
Status: UNCONFIRMED
  Keywords: ice-on-invalid-code
  Severity: normal
  Priority: P3
 Component: rtl-optimization
  Assignee: unassigned at gcc dot gnu.org
  Reporter: asolokha at gmx dot com
  Target Milestone: ---
Target: powerpc-*-linux-gnu

gcc-9.0.0-alpha20180429 snapshot (r259749) ICEs when compiling the following
snippet w/ -mcpu=e300c3 (=e300c2) -misel -O1 -fcrossjumping -frename-registers
-fschedule-insns2 -fsel-sched-pipelining -fselective-scheduling2 -fsplit-paths
-fstrict-aliasing -ftrapv -ftree-vrp -fno-move-loop-invariants
-fno-reorder-blocks -fno-tree-ccp --param max-jump-thread-duplication-stmts=30
--param selsched-max-lookahead=19:

signed char v9;
short int hw;
long long int k1;

void
d2 (void)
{
  short int *z4 = &k1;
  unsigned short int *ur = hw;
  unsigned short int gx = *z4 == (z4 = ur);

  hw /= 3;
  k1 += hw;

  for (hw = 1; hw < 4; ++hw)
{
  unsigned short int nk;
  unsigned int xx;
  int mj;
  int ys;

  nk = gx | -2;
  nk = nk > !!hw;
  xx = !!gx ? gx : 0x1;
  mj = nk * xx;
  ys = *z4 * gx * 2;
  gx += ys <= *z4;
  v9 += mj / gx;
}

  for (;;)
{
}
}

% powerpc-e300c3-linux-gnu-gcc-9.0.0-alpha20180429 -mcpu=e300c3 -misel -O1
-fcrossjumping -frename-registers -fschedule-insns2 -fsel-sched-pipelining
-fselective-scheduling2 -fsplit-paths -fstrict-aliasing -ftrapv -ftree-vrp
-fno-move-loop-invariants -fno-reorder-blocks -fno-tree-ccp --param
max-jump-thread-duplication-stmts=30 --param selsched-max-lookahead=19 -w -c
i8eydx17.c
i8eydx17.c: In function 'd2':
i8eydx17.c:34:1: error: unrecognizable insn:
 }
 ^
(insn 211 72 61 (set (reg:CCUNS 73 5 [199])
(reg:CCUNS 69 1 [227])) "i8eydx17.c":25 -1
 (nil))
during RTL pass: shorten
i8eydx17.c:34:1: internal compiler error: in insn_min_length, at
config/rs6000/rs6000.md:6661
0x556184 _fatal_insn(char const*, rtx_def const*, char const*, int, char
const*)
   
/var/tmp/portage/cross-powerpc-e300c3-linux-gnu/gcc-9.0.0_alpha20180429/work/gcc-9-20180429/gcc/rtl-error.c:108
0x5561c4 _fatal_insn_not_found(rtx_def const*, char const*, int, char const*)
   
/var/tmp/portage/cross-powerpc-e300c3-linux-gnu/gcc-9.0.0_alpha20180429/work/gcc-9-20180429/gcc/rtl-error.c:116
0x120cfdd insn_min_length(rtx_insn*)
   
/var/tmp/portage/cross-powerpc-e300c3-linux-gnu/gcc-9.0.0_alpha20180429/work/gcc-9-20180429/gcc/config/rs6000/rs6000.md:6661
0x896b4d shorten_branches(rtx_insn*)
   
/var/tmp/portage/cross-powerpc-e300c3-linux-gnu/gcc-9.0.0_alpha20180429/work/gcc-9-20180429/gcc/final.c:1190
0x8970a2 rest_of_handle_shorten_branches
   
/var/tmp/portage/cross-powerpc-e300c3-linux-gnu/gcc-9.0.0_alpha20180429/work/gcc-9-20180429/gcc/final.c:4764
0x8970a2 execute
   
/var/tmp/portage/cross-powerpc-e300c3-linux-gnu/gcc-9.0.0_alpha20180429/work/gcc-9-20180429/gcc/final.c:4793