[Bug debug/82718] Bad DWARF5 .debug_loclists generation

2017-11-21 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82718

--- Comment #7 from Jakub Jelinek  ---
Author: jakub
Date: Tue Nov 21 07:59:03 2017
New Revision: 254989

URL: https://gcc.gnu.org/viewcvs?rev=254989&root=gcc&view=rev
Log:
PR debug/82718
* dwarf2out.c (dw_loc_list): If crtl->has_bb_partition, temporarily
set in_cold_section_p to the partition containing loc_list->first.
When seeing loc_list->last_before_switch node, update secname and
perform range_across_switch second partition handling only after that.

* gcc.dg/debug/dwarf2/pr82718-1.c: New test.
* gcc.dg/debug/dwarf2/pr82718-2.c: New test.

Added:
trunk/gcc/testsuite/gcc.dg/debug/dwarf2/pr82718-1.c
trunk/gcc/testsuite/gcc.dg/debug/dwarf2/pr82718-2.c
Modified:
trunk/gcc/ChangeLog
trunk/gcc/dwarf2out.c
trunk/gcc/testsuite/ChangeLog

[Bug target/83068] Suboptimal code generated with -m32 using MMX reg

2017-11-21 Thread bradfier at fstab dot me
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83068

--- Comment #3 from Richard Bradfield  ---
I bisected forward from a few months ago.

The proximate cause is commit r253934, specifically the reduction in cost of
the SSE Load & Store ops, and the costs of moving SSE to and from integer regs.

There's probably more to this than the tuning constants, but if it helps your
investigation, the minimal change required to restore the old behaviour is the
following:

> @@ -2283,13 +2283,13 @@ struct processor_costs core_cost = {
>{6, 6},/* cost of storing MMX registers
>  in SImode and DImode */
>2, 2, 4,   /* cost of moving XMM,YMM,ZMM register */
> -  {6, 6, 6, 6, 12},  /* cost of loading SSE registers
> +  {8, 8, 8, 8, 12},  /* cost of loading SSE registers
>  in 32,64,128,256 and 512-bit */
>{6, 6, 6, 6, 12},  /* cost of unaligned loads.  */
> -  {6, 6, 6, 6, 12},  /* cost of storing SSE registers
> +  {8, 8, 8, 8, 12},  /* cost of storing SSE registers
>  in 32,64,128,256 and 512-bit */
>{6, 6, 6, 6, 12},  /* cost of unaligned stores.  */
> -  2, 2,  /* SSE->integer and integer->SSE moves */
> +  5, 5,  /* SSE->integer and integer->SSE moves */

[Bug tree-optimization/83041] redundant assignment from member array not eliminated

2017-11-21 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83041

Richard Biener  changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution|--- |DUPLICATE

--- Comment #4 from Richard Biener  ---
Dup (has patch).

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

[Bug tree-optimization/23094] store ccp, or store copy prop misses an optimization

2017-11-21 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=23094

Richard Biener  changed:

   What|Removed |Added

 CC||msebor at gcc dot gnu.org

--- Comment #17 from Richard Biener  ---
*** Bug 83041 has been marked as a duplicate of this bug. ***

[Bug c++/83059] ICE on invalid C++ code: in tree_to_uhwi, at tree.c:6633

2017-11-21 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83059

--- Comment #3 from Jakub Jelinek  ---
Author: jakub
Date: Tue Nov 21 08:06:28 2017
New Revision: 254990

URL: https://gcc.gnu.org/viewcvs?rev=254990&root=gcc&view=rev
Log:
PR c++/83059
* c-common.c (get_atomic_generic_size): Use TREE_INT_CST_LOW
instead of tree_to_uhwi, formatting fix.
* config/i386/i386.c (ix86_memmodel_check): Start
-Winvalid-memory-model diagnostics with lowercase letter.

* c-c++-common/pr83059.c: New test.

Added:
trunk/gcc/testsuite/c-c++-common/pr83059.c
Modified:
trunk/gcc/ChangeLog
trunk/gcc/c-family/ChangeLog
trunk/gcc/c-family/c-common.c
trunk/gcc/config/i386/i386.c
trunk/gcc/testsuite/ChangeLog

[Bug tree-optimization/67530] Failure to eliminate dead code produced by vector lowering

2017-11-21 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67530

Richard Biener  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
  Known to work||6.1.0
 Resolution|--- |FIXED

--- Comment #5 from Richard Biener  ---
During GCC 6 we added a late DCE pass which fixes this.

[Bug ada/83027] program hangs when Ada.Text_IO is with'ed both in executable and shared library

2017-11-21 Thread simon at pushface dot org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83027

simon at pushface dot org changed:

   What|Removed |Added

 CC||simon at pushface dot org

--- Comment #19 from simon at pushface dot org ---
The small reproducer (minimal.tar.gz) doesn’t show the error with

macOS : GCC 6.1.0, GCC 7.1.0, GCC 8.0.0, GNAT GPL 2017
debian jessie: GNAT GPL 2017

NB, for GNAT GPL 2017 I had to add Astrings to the interface set in
ahven_simple_lib.gpr.

[Bug tree-optimization/83047] [8 regression] glibc/crypt/crypt_util.c gets miscompiled

2017-11-21 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83047

--- Comment #6 from Jakub Jelinek  ---
Author: jakub
Date: Tue Nov 21 08:41:47 2017
New Revision: 254992

URL: https://gcc.gnu.org/viewcvs?rev=254992&root=gcc&view=rev
Log:
PR tree-optimization/83047
* gimple-ssa-store-merging.c
(imm_store_chain_info::output_merged_store): If the loads with the
same vuse are in different basic blocks, for load_gsi pick a load
location that is dominated by the other loads.

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

Added:
trunk/gcc/testsuite/gcc.dg/pr83047.c
Modified:
trunk/gcc/ChangeLog
trunk/gcc/gimple-ssa-store-merging.c
trunk/gcc/testsuite/ChangeLog

[Bug tree-optimization/78821] GCC7: Copying whole 32 bits structure field by field not optimised into copying whole 32 bits at once

2017-11-21 Thread rguenther at suse dot de
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78821

--- Comment #33 from rguenther at suse dot de  ---
On Mon, 20 Nov 2017, ubizjak at gmail dot com wrote:

> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78821
> 
> --- Comment #32 from Uroš Bizjak  ---
> (In reply to rguent...@suse.de from comment #20)
> 
> > Index: gcc/tree-ssa-sccvn.c
> > ===
> > --- gcc/tree-ssa-sccvn.c(revision 254945)
> > +++ gcc/tree-ssa-sccvn.c(working copy)
> > @@ -3632,6 +3632,38 @@ visit_nary_op (tree lhs, gassign *stmt)
> 
> The patched compiler works for this particular case (a "break" is needed at 
> the
> top of the patch, though), but there are many other cases where a temporary
> should be calculated and its value stored, e.g.:
> 
> --cut here--
> void foo_OK (char *buf, unsigned int data)
> {
>   buf[0] = ~data >> 8;
>   buf[1] = ~data;
> }
> 
> void foo (char *buf, unsigned int data)
> {
>   buf[0] = ~data;
>   buf[1] = ~data >> 8;
> }
> 
> void bar (char *buf, unsigned int data)
> {
>   buf[0] = -data >> 8;
>   buf[1] = -data;
> }
> 
> void baz (char *buf, unsigned int data)
> {
>   buf[0] = (data+3) >> 8;
>   buf[1] = (data+3);
> }
> --cut here--
> 
> Only foo_OK compiles (-O2 -march=haswell) to expected asm:
> 
> notl%esi
> movbe   %si, (%rdi)
> 
> all others generate duplicated operation:
> 
> movb%sil, %al
> notl%esi
> notl%eax
> movb%al, (%rdi)
> movl%esi, %eax
> movb%ah, 1(%rdi)
> 
> Should I open a new PR for the above enhancement?

Ok, I fear we're missing some canonicalization here.  For foo we see

   :
  _1 = (char) data_7(D);
  _2 = ~_1;
  *buf_9(D) = _2;
  _3 = ~data_7(D);
  _4 = _3 >> 8;
  _6 = (char) _4;
  MEM[(char *)buf_9(D) + 1B] = _6;

for bar (patch didn't handle negates which I'm not sure are as easily
handled correctness wise?)

   :
  _1 = -data_8(D);
  _2 = _1 >> 8;
  _3 = (char) _2;
  *buf_10(D) = _3;
  _4 = (unsigned char) data_8(D);
  _5 = -_4;
  _7 = (char) _5;
  MEM[(char *)buf_10(D) + 1B] = _7;

for baz

   :
  _1 = data_8(D) + 3;
  _2 = _1 >> 8;
  _3 = (char) _2;
  *buf_10(D) = _3;
  _4 = (unsigned char) data_8(D);
  _5 = _4 + 3;
  _7 = (char) _5;
  MEM[(char *)buf_10(D) + 1B] = _7;

and it's already the FEs shortening optimization or folding that
makes the operations non-canonical.  .original dumps:

  *buf = (char) (~data >> 8);
  *(buf + 1) = ~(char) data;

  *buf = ~(char) data;
  *(buf + 1) = (char) (~data >> 8);

  *buf = (char) (-data >> 8);
  *(buf + 1) = (char) -(unsigned char) data;

  *buf = (char) (data + 3 >> 8);
  *(buf + 1) = (char) ((unsigned char) data + 3);

note there's conflicting interest from targets like AVR that
prefer truncation to be moved innermost (which would argue
for a CSE-only solution together with aggressive shortening
of operations).  In the above case that probably means
(char) (~data >> 8) -> ~(char)(data >> 8) or alternatively
figure we're interested in short only and thus
(char)~(short)data and (char)(~(short)data >> 8) so we can
CSE ~(short)data.

Note that within CSE we have the difficulty that the first
stmt is basically unchangeable with the trick we're doing
right now.  This means CSE requires the first stmt to be
in useful canonical form.

That said, bar is easily handled in the proposed patch
(though I have to think about correctness).  The other
two can't be done easily - what would fix it would be
not narrowing the ~- operation in the FE.  In this
case it is convert_to_integer_1 doing the narrowing
and also fold_unary having a related transform.

Removing the convert_to_integer_1 code fixes the missed
transforms but in baz where we have similar narrowing
being performed for the add...

I suppose we do want to narrow at some point (and in fact
the user might already write ~(char)data ...).

As usual we have conflicting interests here.  Note that
undoing narrowing isn't easily done so narrowing very early
is certainly unwanted.

[Bug bootstrap/83015] [8 regression] bootstrap comparison failure on ia64

2017-11-21 Thread sch...@linux-m68k.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83015

Andreas Schwab  changed:

   What|Removed |Added

 Status|WAITING |NEW

--- Comment #8 from Andreas Schwab  ---
Still broken.

[Bug go/83071] gccgo: ICE in set_type

2017-11-21 Thread pmatos at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83071

--- Comment #5 from pmatos at gcc dot gnu.org ---
Thanks. It's working.

[Bug ada/83027] program hangs when Ada.Text_IO is with'ed both in executable and shared library

2017-11-21 Thread ebotcazou at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83027

--- Comment #20 from Eric Botcazou  ---
> Thanks for the small reproducer.  This has apparently never worked 
> correctly...

And the workaround is to pass -F to gnatbind for the main program.

[Bug bootstrap/83015] [8 regression] bootstrap comparison failure on ia64

2017-11-21 Thread igor.v.tsimbalist at intel dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83015

--- Comment #9 from igor.v.tsimbalist at intel dot com ---
I do not have an ia64 system at hand to reproduce. Could you please send me the
log file  or at least the part with error? Is the error still the same or is it
different
error? Or could you please update the bug with how it fails now?

Igor


> -Original Message-
> From: sch...@linux-m68k.org [mailto:gcc-bugzi...@gcc.gnu.org]
> Sent: Tuesday, November 21, 2017 10:24 AM
> To: Tsimbalist, Igor V 
> Subject: [Bug bootstrap/83015] [8 regression] bootstrap comparison failure
> on ia64
> 
> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83015
> 
> Andreas Schwab  changed:
> 
>What|Removed |Added
> 
>  Status|WAITING |NEW
> 
> --- Comment #8 from Andreas Schwab  ---
> Still broken.
> 
> --
> You are receiving this mail because:
> You are on the CC list for the bug.

[Bug bootstrap/83015] [8 regression] bootstrap comparison failure on ia64

2017-11-21 Thread sch...@linux-m68k.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83015

--- Comment #10 from Andreas Schwab  ---
See comment#0.

[Bug c++/83085] New: Suspicious type qualifiers ignored on cast result type [-Werror=ignored-qualifiers]

2017-11-21 Thread andi at mozilla dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83085

Bug ID: 83085
   Summary: Suspicious type qualifiers ignored on cast result type
[-Werror=ignored-qualifiers]
   Product: gcc
   Version: 8.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c++
  Assignee: unassigned at gcc dot gnu.org
  Reporter: andi at mozilla dot com
  Target Milestone: ---

I'm using this debian snapshop,https://tracker.debian.org/pkg/gcc-8, of gcc8 in
order to build mozilla firefox, and I encountered this potential issue when
building with -Werror=ignored-qualifiers.

>> 2:46.84 In file included from 
>> /root/firefox-gcc-last/obj-x86_64-pc-linux-gnu/dist/include/mozilla/Result.h:17:0,
>> 2:46.84  from 
>> /root/firefox-gcc-last/obj-x86_64-pc-linux-gnu/dist/include/js/Result.h:119,
>> 2:46.84  from 
>> /root/firefox-gcc-last/obj-x86_64-pc-linux-gnu/dist/include/jspubtd.h:22,
>> 2:46.84  from 
>> /root/firefox-gcc-last/obj-x86_64-pc-linux-gnu/dist/include/nsCycleCollectionTraversalCallback.h:10,
>> 2:46.84  from 
>> /root/firefox-gcc-last/obj-x86_64-pc-linux-gnu/dist/include/nsCycleCollectionNoteChild.h:13,
>> 2:46.84  from 
>> /root/firefox-gcc-last/obj-x86_64-pc-linux-gnu/dist/include/nsCOMPtr.h:33,
>> 2:46.84  from 
>> /root/firefox-gcc-last/obj-x86_64-pc-linux-gnu/dist/include/nsAutoPtr.h:10,
>> 2:46.84  from 
>> /root/firefox-gcc-last/ipc/chromium/src/chrome/common/ipc_message.h:21,
>> 2:46.84  from 
>> /root/firefox-gcc-last/ipc/chromium/src/chrome/common/ipc_message_utils.h:22,
>> 2:46.84  from 
>> /root/firefox-gcc-last/obj-x86_64-pc-linux-gnu/dist/include/ipc/IPCMessageUtils.h:11,
>> 2:46.84  from 
>> /root/firefox-gcc-last/obj-x86_64-pc-linux-gnu/ipc/ipdl/_ipdlheaders/mozilla/ipc/IPCStream.h:11,
>> 2:46.84  from 
>> /root/firefox-gcc-last/ipc/glue/IPCStreamUtils.h:10,
>> 2:46.84  from 
>> /root/firefox-gcc-last/ipc/glue/IPCStreamUtils.cpp:7,
>> 2:46.84  from 
>> /root/firefox-gcc-last/obj-x86_64-pc-linux-gnu/ipc/glue/Unified_cpp_ipc_glue1.cpp:2:
>> 2:46.84 
>> /root/firefox-gcc-last/obj-x86_64-pc-linux-gnu/dist/include/mozilla/Variant.h:
>>  In instantiation of 'typename mozilla::detail::Nth::Type 
>> mozilla::Variant::extract() [with long unsigned int N = 0; Ts = {const 
>> int, const char*, void (*)(nsITimer*, bool, void*, char*, long unsigned 
>> int)}; typename mozilla::detail::Nth::Type = const int]':
>> 2:46.84 
>> /root/firefox-gcc-last/obj-x86_64-pc-linux-gnu/dist/include/mozilla/Variant.h:219:7:
>>required from 'static void mozilla::detail::VariantImplementation> T, Ts ...>::moveConstruct(void*, Variant&&) [with Variant = 
>> mozilla::Variant> char*, long unsigned int)>; Tag = unsigned char; long unsigned int N = 0; T 
>> = const int; Ts = {const char*, void (*)(nsITimer*, bool, void*, char*, long 
>> unsigned int)}]'
>> 2:46.84 
>> /root/firefox-gcc-last/obj-x86_64-pc-linux-gnu/dist/include/mozilla/Variant.h:588:24:
>>required from 'mozilla::Variant::Variant(mozilla::Variant&&) 
>> [with Ts = {const int, const char*, void (*)(nsITimer*, bool, void*, char*, 
>> long unsigned int)}]'
>> 2:46.84 /usr/include/c++/8/bits/move.h:193:11:   required from 'typename 
>> std::enable_if >, 
>> std::is_move_constructible<_Tp>, std::is_move_assignable<_Tp> 
>> >::value>::type std::swap(_Tp&, _Tp&) [with _Tp = mozilla::Variant> int, const char*, void (*)(nsITimer*, bool, void*, char*, long unsigned 
>> int)>; typename 
>> std::enable_if >, 
>> std::is_move_constructible<_Tp>, std::is_move_assignable<_Tp> 
>> >::value>::type = void]'
>> 2:46.84 /root/firefox-gcc-last/xpcom/threads/nsTimerImpl.h:98:35:   required 
>> from here
>> 2:46.84 
>> /root/firefox-gcc-last/obj-x86_64-pc-linux-gnu/dist/include/mozilla/Variant.h:714:44:
>>  error: type qualifiers ignored on cast result type 
>> [-Werror=ignored-qualifiers]
>> 2:46.84  return typename detail::Nth::Type(Move(as()));
>> 2:46.84 

Looking at the code the issue is reported here:
https://dxr.mozilla.org/mozilla-central/source/mfbt/Variant.h?q=return+typename+detail%3A%3ANth%3CN%2C+Ts...%3E%3A%3AType%28Move%28as%3CN%3E%28%29%29%29%3B&redirect_type=single#709

That gets called from here:
https://dxr.mozilla.org/mozilla-central/source/xpcom/threads/nsTimerImpl.h?q=nsTimerImpl.h&redirect_type=direct#98
I personally believe that in this context the warning just adds noise since
nothing dangerous nor standard compliant happens.

[Bug target/82615] [8 Regression] SPEC CPU2006 453.povray ~10% performance deviation with r248863

2017-11-21 Thread marxin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82615

Martin Liška  changed:

   What|Removed |Added

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

--- Comment #5 from Martin Liška  ---
Same for Zen, thus fixed.

[Bug fortran/83076] [8 Regression] ICE in gfc_deallocate_scalar_with_status, at fortran/trans.c:1598

2017-11-21 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83076

Richard Biener  changed:

   What|Removed |Added

   Target Milestone|--- |8.0

[Bug tree-optimization/83080] [8 Regression] ICE at -Os and above with -Wall on C++ code: Segmentation fault

2017-11-21 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83080

Richard Biener  changed:

   What|Removed |Added

Version|unknown |8.0
   Target Milestone|--- |8.0
Summary|ICE at -Os and above with   |[8 Regression] ICE at -Os
   |-Wall on C++ code:  |and above with -Wall on C++
   |Segmentation fault  |code: Segmentation fault

--- Comment #2 from Richard Biener  ---
I think I've seen a dup as well.

[Bug tree-optimization/83081] [8 regression][arm] gcc.dg/pr80218.c fails since r254888

2017-11-21 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83081

Richard Biener  changed:

   What|Removed |Added

   Target Milestone|--- |8.0

[Bug c++/82711] -Wignored-qualifiers could be moved into -Wextra

2017-11-21 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82711

Jonathan Wakely  changed:

   What|Removed |Added

 CC||andi at mozilla dot com

--- Comment #2 from Jonathan Wakely  ---
*** Bug 83085 has been marked as a duplicate of this bug. ***

[Bug c++/83085] Suspicious type qualifiers ignored on cast result type [-Werror=ignored-qualifiers]

2017-11-21 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83085

Jonathan Wakely  changed:

   What|Removed |Added

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

--- Comment #1 from Jonathan Wakely  ---
(In reply to Andi from comment #0)
> I'm using this debian snapshop,https://tracker.debian.org/pkg/gcc-8, of gcc8
> in order to build mozilla firefox, and I encountered this potential issue
> when building with -Werror=ignored-qualifiers.

"Doctor, doctor, it hurts when I do this"

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

[Bug tree-optimization/83082] [8 regression] libgomp.graphite/force-parallel-1.c fails starting with r254888

2017-11-21 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83082

Richard Biener  changed:

   What|Removed |Added

   Target Milestone|--- |8.0

[Bug target/83084] [7/8 Regression] -fcompare-debug failure on ppc64le

2017-11-21 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83084

Richard Biener  changed:

   What|Removed |Added

   Target Milestone|--- |7.3

[Bug bootstrap/83015] [8 regression] bootstrap comparison failure on ia64

2017-11-21 Thread hubicka at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83015

--- Comment #11 from Jan Hubicka  ---
I was able to bootstrap on ia64 box (terbium) shortly before the unwind changes
went in without the bootstrap miscompare.
So does the miscompare still reproduce for you and if so, would be posible to
attach dumps?

[Bug fortran/82995] Segmentation fault passing optional argument to intrinsic sum function

2017-11-21 Thread tkoenig at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82995

Thomas Koenig  changed:

   What|Removed |Added

 CC||tkoenig at gcc dot gnu.org

--- Comment #4 from Thomas Koenig  ---
This would need to be fixed in two parts, in the inlined
version and the library version. I'll take a look at the
library part, that should be rather easy.

[Bug c/83086] New: valgrind error in recent build

2017-11-21 Thread dcb314 at hotmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83086

Bug ID: 83086
   Summary: valgrind error in recent build
   Product: gcc
   Version: 8.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c
  Assignee: unassigned at gcc dot gnu.org
  Reporter: dcb314 at hotmail dot com
  Target Milestone: ---

I tried a valgrind build of recent gcc trunk with -O3 and got this:

==26140== Conditional jump or move depends on uninitialised value(s)
==26140==at 0x145D303: (anonymous
namespace)::imm_store_chain_info::try_coalesce_bswap((anonymous
namespace)::merged_store_group*, unsigned int, unsigned int)
(gimple-ssa-store-merging.c:2393)
==26140==by 0x146390F: coalesce_immediate_stores
(gimple-ssa-store-merging.c:2575)
==26140==by 0x146390F: terminate_and_process_chain
(gimple-ssa-store-merging.c:3726)

Source code is

254948  jakub   if (n.base_addr && vuse_store)

Configure is

../trunk/configure --prefix=/home/dcb/gcc/results.254990.valgrind \
--disable-bootstrap \
--disable-multilib \
--disable-werror \
--enable-checking=valgrind \
--enable-languages=c,c++,fortran

sed 's/-O2/-O3 -funroll-loops -Wtautological-compare/' < Makefile >
Makefile.tmp
mv Makefile.tmp Makefile

[Bug middle-end/78468] [8 regression] libgomp.c/reduction-10.c and many more FAIL

2017-11-21 Thread ebotcazou at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78468

Eric Botcazou  changed:

   What|Removed |Added

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

--- Comment #44 from Eric Botcazou  ---
Fixing again.

[Bug bootstrap/83015] [8 regression] bootstrap comparison failure on ia64

2017-11-21 Thread sch...@linux-m68k.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83015

--- Comment #12 from Andreas Schwab  ---
See yttrium:/usr/local/gcc.

[Bug target/83087] New: -fcf-protection -mcet enabled unconditionally for target libs

2017-11-21 Thread trippels at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83087

Bug ID: 83087
   Summary: -fcf-protection -mcet enabled unconditionally for
target libs
   Product: gcc
   Version: 8.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: target
  Assignee: unassigned at gcc dot gnu.org
  Reporter: trippels at gcc dot gnu.org
  Target Milestone: ---

On x86_64 -fcf-protection -mcet gets enabled unconditionally for target libs.
It should be controlled by a configuration flag instead.

[Bug fortran/83017] DO CONCURRENT not parallelizing

2017-11-21 Thread cfztol at hotmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83017

--- Comment #18 from Christian Felter  ---
Thanks for the great work!! I've tested the new version and found similar
results. 

I think the wrong results (which are actually random results) mean there is
another related bug still, so I've opened bug report 83064 for that.

[Bug target/83087] -fcf-protection -mcet enabled unconditionally for target libs

2017-11-21 Thread trippels at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83087

--- Comment #1 from Markus Trippelsdorf  ---
# Add CET specific flags if Intel CET is enabled.   
 # Check whether --enable-cet was given.
if test "${enable_cet+set}" = set; then :   
  enableval=$enable_cet;
  case "$enableval" in  
   yes|no|default) ;;   
   *) as_fn_error "Unknown argument to enable/disable cet" "$LINENO" 5 ;;   
  esac  

else
  enable_cet=default
fi  


case "$host" in 
  i[34567]86-*-linux* | x86_64-*-linux*)
case "$enable_cet" in   
  default)  
# Check if assembler supports CET.  
cat confdefs.h - <<_ACEOF >conftest.$ac_ext 
/* end confdefs.h.  */  

int 
main () 
{   
asm ("setssbsy");   
  ; 
  return 0; 
}   
_ACEOF  
if ac_fn_c_try_compile "$LINENO"; then :
  enable_cet=yes
else
  enable_cet=no 
fi  
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
;;  
  yes)  
# Check if assembler supports CET.  
cat confdefs.h - <<_ACEOF >conftest.$ac_ext 
/* end confdefs.h.  */  

int 
main () 
{   
asm ("setssbsy");   
  ; 
  return 0; 
}   
_ACEOF  
if ac_fn_c_try_compile "$LINENO"; then :

else
  as_fn_error "assembler with CET support is required for --enable-cet"
"$LINENO" 5 
fi  
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
;;  
esac
;;  
  *)
enable_cet=no   
;;  
esac
if test x$enable_cet = xyes; then   
  CET_FLAGS="-fcf-protection -mcet" 
fi   

[Bug c/83086] valgrind error in gimple-ssa-store-merging.c for recent build

2017-11-21 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83086

--- Comment #1 from Jakub Jelinek  ---
On which source file it is?  Can you attach it preprocessed + full command
line?

[Bug fortran/83088] New: ICE with -init-derived

2017-11-21 Thread valeryweber at hotmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83088

Bug ID: 83088
   Summary: ICE with -init-derived
   Product: gcc
   Version: 8.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: fortran
  Assignee: unassigned at gcc dot gnu.org
  Reporter: valeryweber at hotmail dot com
  Target Milestone: ---

hi all
the following code is ICEing
v

gfortran-intel-trunk -free -c -finit-derived  hfx_libint_wrapper.F90   
 hfx_libint_wrapper.F90:101:0:

 END MODULE hfx_libint_wrapper

internal compiler error: Segmentation fault
0xc2f705 crash_signal
../../gcc-trunk-src/gcc/toplev.c:325
0x6ba206 contains_struct_check
../../gcc-trunk-src/gcc/tree.h:3203
0x6ba206 gfc_conv_structure(gfc_se*, gfc_expr*, int)
../../gcc-trunk-src/gcc/fortran/trans-expr.c:7751
0x674480 gfc_conv_array_initializer(tree_node*, gfc_expr*)
../../gcc-trunk-src/gcc/fortran/trans-array.c:5894
0x6b9dfa gfc_conv_initializer(gfc_expr*, gfc_typespec*, tree_node*, bool, bool,
bool)
../../gcc-trunk-src/gcc/fortran/trans-expr.c:6848
0x69c48f gfc_get_symbol_decl(gfc_symbol*)
../../gcc-trunk-src/gcc/fortran/trans-decl.c:1825
0x69e063 gfc_create_module_variable
../../gcc-trunk-src/gcc/fortran/trans-decl.c:4943
0x653930 do_traverse_symtree
../../gcc-trunk-src/gcc/fortran/symbol.c:4157
0x69d4d2 gfc_generate_module_vars(gfc_namespace*)
../../gcc-trunk-src/gcc/fortran/trans-decl.c:5415
0x66b2c8 gfc_generate_module_code(gfc_namespace*)
../../gcc-trunk-src/gcc/fortran/trans.c:2180
0x6212c2 translate_all_program_units
../../gcc-trunk-src/gcc/fortran/parse.c:6078
0x6212c2 gfc_parse_file()
../../gcc-trunk-src/gcc/fortran/parse.c:6294
0x66775f gfc_be_parse_file
../../gcc-trunk-src/gcc/fortran/f95-lang.c:204
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See  for instructions.





cat hfx_libint_wrapper.F90
MODULE hfx_libint_wrapper
   USE ISO_C_BINDING,   ONLY: C_DOUBLE,&
  C_F_POINTER,&
  C_F_PROCPOINTER,&
  C_INT,&
  C_LOC,&
  C_PTR,&
  c_funptr

   IMPLICIT NONE
   PRIVATE

   INTEGER, PARAMETER :: dp = SELECTED_REAL_KIND(14, 200)

   integer,parameter :: build_deriv1_eri_size=10,build_eri_size=2,
libderiv_max_am1=4, &
libint_max_am=4, libint_dvrr_classes_size=1, libint_vrr_classes_size=1,
prim_data_f_size=1
   integer, dimension(1):: nco

   TYPE, BIND(C) :: prim_data
  REAL(C_DOUBLE) :: F(prim_data_f_size)
  REAL(C_DOUBLE) :: U(3, 6)
  REAL(C_DOUBLE) :: twozeta_a
  REAL(C_DOUBLE) :: twozeta_b
  REAL(C_DOUBLE) :: twozeta_c
  REAL(C_DOUBLE) :: twozeta_d
  REAL(C_DOUBLE) :: oo2z
  REAL(C_DOUBLE) :: oo2n
  REAL(C_DOUBLE) :: oo2zn
  REAL(C_DOUBLE) :: poz
  REAL(C_DOUBLE) :: pon
  REAL(C_DOUBLE) :: oo2p
  REAL(C_DOUBLE) :: ss_r12_ss
   END TYPE prim_data


   TYPE, BIND(C) :: lib_int
  TYPE(C_PTR) :: int_stack
  TYPE(C_PTR) :: PrimQuartet
  REAL(C_DOUBLE)  :: AB(3)
  REAL(C_DOUBLE)  :: CD(3)
  TYPE(C_PTR) :: vrr_classes(libint_vrr_classes_size,
libint_vrr_classes_size)
  TYPE(C_PTR) :: vrr_stack
   END TYPE lib_int

   TYPE, BIND(C) :: lib_deriv
  TYPE(C_PTR) :: int_stack
  TYPE(C_PTR) :: PrimQuartet
  TYPE(C_PTR) :: zero_stack
  TYPE(C_PTR) :: ABCD(156)
  REAL(C_DOUBLE)  :: AB(3)
  REAL(C_DOUBLE)  :: CD(3)
  TYPE(C_PTR) :: deriv_classes(12, libint_dvrr_classes_size,
libint_dvrr_classes_size)
  TYPE(C_PTR) :: deriv2_classes(144, libint_dvrr_classes_size,
libint_dvrr_classes_size)
  TYPE(C_PTR) :: dvrr_classes(libint_dvrr_classes_size,
libint_dvrr_classes_size)
  TYPE(C_PTR) :: dvtt_stack
   END TYPE lib_deriv

   CHARACTER(len=*), PARAMETER, PRIVATE :: moduleN = 'hfx_libint_wrapper'


   TYPE(C_FUNPTR), DIMENSION(0:build_eri_size, 0:build_eri_size,
0:build_eri_size, 0:build_eri_size), BIND(C) :: build_eri
   TYPE(C_FUNPTR), DIMENSION(0:build_deriv1_eri_size, 0:build_deriv1_eri_size,
&
 0:build_deriv1_eri_size, 0:build_deriv1_eri_size),
BIND(C) :: build_deriv1_eri

   INTERFACE
  SUBROUTINE build_deriv1(deriv, np) BIND(C)
 IMPORT
 TYPE(lib_deriv):: deriv
 INTEGER(KIND=C_INT), VALUE  :: np
  END SUBROUTINE build_deriv1
   END INTERFACE

CONTAINS
   SUBROUTINE get_derivs(n_d, n_c, n_b, n_a, deriv, prim, work_forces,
a_mysize)
  INTEGER, INTENT(IN):: n_d, n_c, n_b, n_a
  TYPE(

[Bug target/83087] -fcf-protection -mcet enabled unconditionally for target libs

2017-11-21 Thread igor.v.tsimbalist at intel dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83087

igor.v.tsimbalist at intel dot com changed:

   What|Removed |Added

 CC||igor.v.tsimbalist at intel dot 
com

--- Comment #2 from igor.v.tsimbalist at intel dot com ---
It's controlled by --enable-cet configuration flag.

[Bug fortran/83064] DO CONCURRENT inconsistent results

2017-11-21 Thread dominiq at lps dot ens.fr
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83064

Dominique d'Humieres  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2017-11-21
 Ever confirmed|0   |1

--- Comment #1 from Dominique d'Humieres  ---
> GCC revision r254890

Are you sure of the revision? I more or less confirm your results with r254966,
but not with r254940 (the Unrolled do-loop is parallelized with -Ofast only and
gives the correct result). Also -ftree-parallelize-loops=4 gives the same
results as r254940.

[Bug c/83086] valgrind error in gimple-ssa-store-merging.c for recent build

2017-11-21 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83086

--- Comment #2 from Jakub Jelinek  ---
Actually no need, I see what's going on.

[Bug target/83087] -fcf-protection -mcet enabled unconditionally for target libs

2017-11-21 Thread trippels at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83087

--- Comment #3 from Markus Trippelsdorf  ---
(In reply to igor.v.tsimbalist from comment #2)
> It's controlled by --enable-cet configuration flag.

Unfortunately it isn't. It only checksif the assembler supports CET and then
enables it.
Without an explicit --enable-cet configuration flag it should be disabled.

[Bug tree-optimization/83086] [8 Regression] valgrind error in gimple-ssa-store-merging.c for recent build

2017-11-21 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83086

Jakub Jelinek  changed:

   What|Removed |Added

 Status|UNCONFIRMED |ASSIGNED
   Last reconfirmed||2017-11-21
  Component|c   |tree-optimization
   Target Milestone|--- |8.0
Summary|valgrind error in   |[8 Regression] valgrind
   |gimple-ssa-store-merging.c  |error in
   |for recent build|gimple-ssa-store-merging.c
   ||for recent build
 Ever confirmed|0   |1

--- Comment #3 from Jakub Jelinek  ---
Untested fix:

2017-11-21  Jakub Jelinek  

PR tree-optimization/83086
* gimple-ssa-store-merging.c
(imm_store_chain_info::try_coalesce_bswap): Test this_n.base_addr
rather than n.base_addr.

--- gcc/gimple-ssa-store-merging.c.jj   2017-11-21 09:41:00.0 +0100
+++ gcc/gimple-ssa-store-merging.c  2017-11-21 12:13:23.346947756 +0100
@@ -2390,7 +2390,7 @@ imm_store_chain_info::try_coalesce_bswap
? try_size - info->bitsize - bitpos
: bitpos))
return false;
-  if (n.base_addr && vuse_store)
+  if (this_n.base_addr && vuse_store)
{
  unsigned int j;
  for (j = first; j <= last; ++j)

[Bug fortran/83088] [8 Regression] ICE with -init-derived

2017-11-21 Thread dominiq at lps dot ens.fr
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83088

Dominique d'Humieres  changed:

   What|Removed |Added

   Keywords||ice-on-valid-code
   Priority|P3  |P4
 Status|UNCONFIRMED |NEW
   Last reconfirmed||2017-11-21
 CC||foreese at gcc dot gnu.org
Summary|ICE with -init-derived  |[8 Regression] ICE with
   ||-init-derived
 Ever confirmed|0   |1

--- Comment #1 from Dominique d'Humieres  ---
Confirmed, likely due to r254648.

[Bug target/83087] -fcf-protection -mcet enabled unconditionally for target libs

2017-11-21 Thread igor.v.tsimbalist at intel dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83087

--- Comment #4 from igor.v.tsimbalist at intel dot com ---
Yes, that's true. It was done deliberately so the libraries get ready for Intel
CET, it was reflected in commit message and changelog. The binaries compiled
with CET will continue to work on HW without CET support. Why it should not be
enabled by default?

[Bug fortran/83076] [8 Regression] ICE in gfc_deallocate_scalar_with_status, at fortran/trans.c:1598

2017-11-21 Thread dominiq at lps dot ens.fr
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83076

Dominique d'Humieres  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2017-11-21
 Ever confirmed|0   |1

--- Comment #1 from Dominique d'Humieres  ---
Confirmed between revisions r254227 (2017-10-30, OK) and r254498 (2017-11-07,
ICE).

[Bug target/83087] -fcf-protection -mcet enabled unconditionally for target libs

2017-11-21 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83087

--- Comment #5 from Jakub Jelinek  ---
My understanding has been that the CET stuff is essentially ABI incompatible
(CET enabled libraries/binaries vs. non-CET enabled ones) on CET HW, so it
should be better treated like a multilib.
So, unless everything on the system is CET enabled, putting the CET support in
is just waste of I-cache.

[Bug fortran/83064] DO CONCURRENT inconsistent results

2017-11-21 Thread cfztol at hotmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83064

--- Comment #2 from Christian Felter  ---
I did "svn up" and after that I found the revision number like this:

$ svn log --limit 1

r254890 | hjl | 2017-11-17 19:37:58 +0100 (Fri, 17 Nov 2017) | 14 lines

... more output, skipped

I hope that is the right way ?

[Bug target/83087] -fcf-protection -mcet enabled unconditionally for target libs

2017-11-21 Thread trippels at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83087

--- Comment #6 from Markus Trippelsdorf  ---
(In reply to igor.v.tsimbalist from comment #4)
> Yes, that's true. It was done deliberately so the libraries get ready for
> Intel CET, it was reflected in commit message and changelog. The binaries
> compiled with CET will continue to work on HW without CET support. Why it
> should not be enabled by default?

Because it bloats the binaries unnecessary?
Not sure about the additional run-time cost on non CET chips.
I guess most gcc users don't have CET capable hardware.

[Bug preprocessor/81794] "would be stringified in traditional C" warning should be controlled by -Wtraditional

2017-11-21 Thread egallager at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81794

--- Comment #7 from Eric Gallager  ---
(In reply to David Malcolm from comment #6)
> Should be fixed by r254981; marking as resolved.

Thank you!

[Bug tree-optimization/83089] New: [8 Regression] ICE: Segmentation fault (in instantiate_scev_name)

2017-11-21 Thread asolokha at gmx dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83089

Bug ID: 83089
   Summary: [8 Regression] ICE: Segmentation fault (in
instantiate_scev_name)
   Product: gcc
   Version: 8.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-8.0.0-alpha20171119 snapshot (r254939) ICEs when compiling the following
snippet w/ -O2 (-O3, -Ofast) -ftree-loop-if-convert -ftree-parallelize-loops=2:

int rl, s8;

void
it (int zy, short int el)
{
  int hb;

  while (el != 0)
{
  hb = el;
  for (rl = 0; rl < 200; ++rl)
{
  for (s8 = 0; s8 < 2; ++s8)
{
}
  if (s8 < 3)
zy = hb;
  if (hb == 0)
   ++s8;
  zy += (s8 != -1);
}
el = zy;
  }
}

% gcc-8.0.0-alpha20171119 -O2 -ftree-loop-if-convert -ftree-parallelize-loops=2
-c harzrp6v.c
during GIMPLE pass: cunroll
harzrp6v.c: In function 'it':
harzrp6v.c:4:1: internal compiler error: Segmentation fault
 it (int zy, short int el)
 ^~
0xc6c84f crash_signal
   
/var/tmp/portage/sys-devel/gcc-8.0.0_alpha20171119/work/gcc-8-20171119/gcc/toplev.c:325
0xd1ce15 tree_check(tree_node*, char const*, int, char const*, tree_code)
   
/var/tmp/portage/sys-devel/gcc-8.0.0_alpha20171119/work/gcc-8-20171119/gcc/tree.h:3089
0xd1ce15 instantiate_scev_name
   
/var/tmp/portage/sys-devel/gcc-8.0.0_alpha20171119/work/gcc-8-20171119/gcc/tree-scalar-evolution.c:2359
0xd1dae5 instantiate_scev_convert
   
/var/tmp/portage/sys-devel/gcc-8.0.0_alpha20171119/work/gcc-8-20171119/gcc/tree-scalar-evolution.c:2611
0xd1d36f instantiate_scev_r
   
/var/tmp/portage/sys-devel/gcc-8.0.0_alpha20171119/work/gcc-8-20171119/gcc/tree-scalar-evolution.c:2746
0xd1dd1f resolve_mixers(loop*, tree_node*, bool*)
   
/var/tmp/portage/sys-devel/gcc-8.0.0_alpha20171119/work/gcc-8-20171119/gcc/tree-scalar-evolution.c:2842
0xd1fe88 analyze_scalar_evolution_in_loop
   
/var/tmp/portage/sys-devel/gcc-8.0.0_alpha20171119/work/gcc-8-20171119/gcc/tree-scalar-evolution.c:2210
0xd1ff95 simple_iv_with_niters(loop*, loop*, tree_node*, affine_iv*,
tree_node**, bool)
   
/var/tmp/portage/sys-devel/gcc-8.0.0_alpha20171119/work/gcc-8-20171119/gcc/tree-scalar-evolution.c:3325
0xd857d4 number_of_iterations_exit_assumptions(loop*, edge_def*,
tree_niter_desc*, gcond**, bool)
   
/var/tmp/portage/sys-devel/gcc-8.0.0_alpha20171119/work/gcc-8-20171119/gcc/tree-ssa-loop-niter.c:2358
0xd85b81 number_of_iterations_exit_assumptions(loop*, edge_def*,
tree_niter_desc*, gcond**, bool)
   
/var/tmp/portage/sys-devel/gcc-8.0.0_alpha20171119/work/gcc-8-20171119/gcc/tree-ssa-loop-niter.c:2455
0xd85b81 number_of_iterations_exit(loop*, edge_def*, tree_niter_desc*, bool,
bool)
   
/var/tmp/portage/sys-devel/gcc-8.0.0_alpha20171119/work/gcc-8-20171119/gcc/tree-ssa-loop-niter.c:2442
0xd1ba7d number_of_latch_executions(loop*)
   
/var/tmp/portage/sys-devel/gcc-8.0.0_alpha20171119/work/gcc-8-20171119/gcc/tree-scalar-evolution.c:2902
0xd875df estimate_numbers_of_iterations(loop*)
   
/var/tmp/portage/sys-devel/gcc-8.0.0_alpha20171119/work/gcc-8-20171119/gcc/tree-ssa-loop-niter.c:3914
0xd87d27 estimate_numbers_of_iterations(function*)
   
/var/tmp/portage/sys-devel/gcc-8.0.0_alpha20171119/work/gcc-8-20171119/gcc/tree-ssa-loop-niter.c:4149
0xd67a51 tree_unroll_loops_completely(bool, bool)
   
/var/tmp/portage/sys-devel/gcc-8.0.0_alpha20171119/work/gcc-8-20171119/gcc/tree-ssa-loop-ivcanon.c:1367
0xd67d0d execute
   
/var/tmp/portage/sys-devel/gcc-8.0.0_alpha20171119/work/gcc-8-20171119/gcc/tree-ssa-loop-ivcanon.c:1525

[Bug c++/60095] Dubious diagnostics for attempted surrogate call function

2017-11-21 Thread egallager at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=60095

Eric Gallager  changed:

   What|Removed |Added

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

--- Comment #4 from Eric Gallager  ---
(In reply to Eric Gallager from comment #3)
> (In reply to lucdanton from comment #0)
> > Using ‘gcc version 4.9.0 20140123 (experimental) (GCC)’ with the following
> > snippet:
> > 
> > //
> > 
> > struct foo {
> > typedef void(*ptr)(int&);
> > operator ptr() const;
> > };
> > 
> > int main()
> > {
> > foo f;
> > void* p = 0;
> > f(p);
> > }
> > 
> > //
> > 
> > $ g++-trunk -std=c++03 main.cpp 
> > main.cpp: In function 'int main()':
> > main.cpp:10:8: error: no match for call to '(foo) (void*&)'
> >  f(p);
> > ^
> > main.cpp:1:8: note: candidate is:
> >  struct foo {
> > ^
> > main.cpp:10:8: note: foo::ptr {aka void (*)(int&)} 
> >  f(p);
> > ^
> > main.cpp:10:8: note:   candidate expects 2 arguments, 2 provided
> > 
> > Same output for all -std=c++{03,11,1y} modes. If e.g. foo has a call
> > operator instead, then the appropriate ‘no known conversion for argument 1
> > from 'void*' to 'int&'’ is produced.
> 
> Message is now:
> 
> $ /usr/local/bin/g++ -c -std=c++03 -Wall -Wextra -pedantic 60095.cc
> 60095.cc: In function ‘int main()’:
> 60095.cc:10:8: error: no match for call to ‘(foo) (void*&)’
>  f(p);
> ^
> 60095.cc:10:8: note: candidate: ‘foo::ptr {aka void (*)(int&)}’ 
> 60095.cc:10:8: note:   conversion of argument 2 would be ill-formed:
> 60095.cc:10:8: error: invalid conversion from ‘void*’ to ‘int’ [-fpermissive]
> 60095.cc:10:8: error: cannot bind rvalue ‘(int)p’ to ‘int&’
> $
> 
> Is that better enough for you? I think it's still kinda confusing, but at
> least there's no longer the bogus "expects 2 arguments, 2 provided" note
> anymore.

No reply so I guess it's better enough.

[Bug target/83084] [7/8 Regression] -fcompare-debug failure on ppc64le

2017-11-21 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83084

Jakub Jelinek  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2017-11-21
 Ever confirmed|0   |1

[Bug target/83084] [7/8 Regression] -fcompare-debug failure on ppc64le

2017-11-21 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83084

Jakub Jelinek  changed:

   What|Removed |Added

 CC||aoliva at gcc dot gnu.org,
   ||jakub at gcc dot gnu.org,
   ||vmakarov at gcc dot gnu.org

--- Comment #1 from Jakub Jelinek  ---
Seems this breaks during sched1, which given:
(insn 10031 10029 8 5 (set (mem/v:BLK (scratch:DI) [0  A8])
(unspec:BLK [
(mem/v:BLK (scratch:DI) [0  A8])
] UNSPEC_LWSYNC)) "pr83084.C":11 683 {*lwsync}
 (nil))
(debug_insn 8 10031 10032 5 (var_location:SI D#2 (unspec_volatile:SI [
(mem/v:SI (reg/f:DI 131 [ this ]) [-1  S4 A32])
] UNSPECV_LL)) -1
 (nil))
(insn 10032 8 10033 5 (set (reg:SI 138)
(unspec_volatile:SI [
(mem/v:SI (reg/f:DI 131 [ this ]) [-1  S4 A32])
] UNSPECV_LL)) "pr83084.C":11 694 {load_lockedsi}
 (nil))
with the debug_insn of course missing for -g0 reorders them if the debug_insn
is in there to:
(insn 10032 10029 10031 5 (set (reg:SI 138)
(unspec_volatile:SI [
(mem/v:SI (reg/f:DI 131 [ this ]) [-1  S4 A32])
] UNSPECV_LL)) "pr83084.C":11 694 {load_lockedsi}
 (nil))
(insn 10031 10032 8 5 (set (mem/v:BLK (scratch:DI) [0  A8])
(unspec:BLK [
(mem/v:BLK (scratch:DI) [0  A8])
] UNSPEC_LWSYNC)) "pr83084.C":11 683 {*lwsync}
 (nil))
(debug_insn 8 10031 10033 5 (var_location:SI D#2 (clobber (const_int 0 [0])))
-1
 (nil))
but without the debug_insn keeps them as is.

[Bug target/83084] [7/8 Regression] -fcompare-debug failure on ppc64le

2017-11-21 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83084

--- Comment #2 from Jakub Jelinek  ---
The sched1 dump differences are:
 // rs6000_sched_reorder :
 // rs6000_variable_issue (more = 7) = 0
-;;   0--> b  1: i10031 [scratch]=unspec[[scratch]] 36 
:DU_both_power8,LSU_power8:GENERAL_REGS+0(0)VSX_REGS+0(0)CR_REGS+0(0)SPECIAL_REGS+0(0):model
0
+;;   0--> b  1: i10032 r138=unspec/v[[r131]] 1
:DU_both_power8,LU_or_LSU_power8:GENERAL_REGS+1(1)VSX_REGS+0(0)CR_REGS+0(0)SPECIAL_REGS+0(0)
+rescanning insn with uid = 8.
 // rs6000_sched_reorder2 :
 // rs6000_sched_reorder :
 // rs6000_variable_issue (more = 7) = 0
-;;   1--> b  1: i10032 r138=unspec/v[[r131]] 1
:DU_both_power8,LU_or_LSU_power8:GENERAL_REGS+1(1)VSX_REGS+0(0)CR_REGS+0(0)SPECIAL_REGS+0(0):model
1
+;;   1--> b  1: i10031 [scratch]=unspec[[scratch]] 36 
:DU_both_power8,LSU_power8:@GENERAL_REGS+0(0)@VSX_REGS+0(0)@CR_REGS+0(0)@SPECIAL_REGS+0(0):model
0
+;;   1--> b  1: i   8 loc clobber
:nothing:GENERAL_REGS+0(0)VSX_REGS+0(0)CR_REGS+0(0)SPECIAL_REGS+0(0)
 // rs6000_sched_reorder2 :

[Bug tree-optimization/83047] [8 regression] glibc/crypt/crypt_util.c gets miscompiled

2017-11-21 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83047

Jakub Jelinek  changed:

   What|Removed |Added

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

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

[Bug c++/82781] [6/7 Regression] Vector extension operators return wrong result in constexpr

2017-11-21 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82781

Jakub Jelinek  changed:

   What|Removed |Added

Summary|[6/7/8 Regression] Vector   |[6/7 Regression] Vector
   |extension operators return  |extension operators return
   |wrong result in constexpr   |wrong result in constexpr

--- Comment #5 from Jakub Jelinek  ---
Fixed on the trunk so far.

[Bug fortran/83057] OPEN without a filename and without STATUS='SCRATCH' could produce a warning

2017-11-21 Thread dominiq at lps dot ens.fr
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83057

Dominique d'Humieres  changed:

   What|Removed |Added

   Keywords||diagnostic
   Priority|P3  |P5
 Status|UNCONFIRMED |NEW
   Last reconfirmed||2017-11-21
Summary|OPEN(3f) without a filename |OPEN without a filename and
   |and without |without STATUS='SCRATCH'
   |STATUS='SCRATCH' does not   |could produce a warning
   |produce a warning as being  |
   |an extension on unassigned  |
   |files   |
 Ever confirmed|0   |1
   Severity|normal  |enhancement

--- Comment #3 from Dominique d'Humieres  ---
Confirmed. As said in
https://groups.google.com/forum/#!topic/comp.lang.fortran/qZk0eLZ1l18: "it may
be processor-dependent as to whether any diagnostics is issued".

Marked as enhancement.

[Bug tree-optimization/83043] [8 Regression] FAIL: libgomp.graphite/force-parallel-1.c scan-tree-dump-times graphite "2 loops carried no dependency" 1 (found 0 times)

2017-11-21 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83043

Jakub Jelinek  changed:

   What|Removed |Added

 CC||seurer at gcc dot gnu.org

--- Comment #6 from Jakub Jelinek  ---
*** Bug 83082 has been marked as a duplicate of this bug. ***

[Bug tree-optimization/83082] [8 regression] libgomp.graphite/force-parallel-1.c fails starting with r254888

2017-11-21 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83082

Jakub Jelinek  changed:

   What|Removed |Added

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

--- Comment #1 from Jakub Jelinek  ---
Dup.

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

[Bug fortran/83078] ICE in gfc_typenode_for_spec, at fortran/trans-types.c:1110

2017-11-21 Thread dominiq at lps dot ens.fr
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83078

Dominique d'Humieres  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2017-11-21
 Ever confirmed|0   |1

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

[Bug fortran/83079] ICE in gfc_widechar_to_char, at fortran/scanner.c:198

2017-11-21 Thread dominiq at lps dot ens.fr
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83079

Dominique d'Humieres  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2017-11-21
 Ever confirmed|0   |1

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

[Bug tree-optimization/83044] [8 Regression] ice in contains_struct_check

2017-11-21 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83044

Jakub Jelinek  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2017-11-21
 CC||jakub at gcc dot gnu.org
 Ever confirmed|0   |1

--- Comment #2 from Jakub Jelinek  ---
Cleaned up testcase:

/* PR tree-optimization/83044 */
/* { dg-do compile } */
/* { dg-options "-Wall -std=gnu89 -O2" } */

struct A { int b[0]; };
struct B { struct A c[0]; };
void bar (int *);

void
foo (void)
{
  struct B d;
  bar (d.c->b);
}

[Bug libfortran/83070] -Wsign-compare warning in eoshift0

2017-11-21 Thread dominiq at lps dot ens.fr
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83070

Dominique d'Humieres  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2017-11-21
 Ever confirmed|0   |1

--- Comment #1 from Dominique d'Humieres  ---
Confirmed on trunk (8.0).

[Bug target/83087] -fcf-protection -mcet enabled unconditionally for target libs

2017-11-21 Thread igor.v.tsimbalist at intel dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83087

--- Comment #7 from igor.v.tsimbalist at intel dot com ---
(In reply to Jakub Jelinek from comment #5)
> My understanding has been that the CET stuff is essentially ABI incompatible
> (CET enabled libraries/binaries vs. non-CET enabled ones) on CET HW, so it
> should be better treated like a multilib.
> So, unless everything on the system is CET enabled, putting the CET support
> in is just waste of I-cache.

It's completely ABI compatible. ABI has not changed. You can mix object files.
But it's true that an app is CET enabled if all object files and libraries
linked in the app are CET enabled.

Code size should increased insignificantly, I do not have numbers right away. I
can collect it for the target libraries and post it here.

[Bug target/83087] -fcf-protection -mcet enabled unconditionally for target libs

2017-11-21 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83087

--- Comment #8 from Jakub Jelinek  ---
(In reply to igor.v.tsimbalist from comment #7)
> (In reply to Jakub Jelinek from comment #5)
> > My understanding has been that the CET stuff is essentially ABI incompatible
> > (CET enabled libraries/binaries vs. non-CET enabled ones) on CET HW, so it
> > should be better treated like a multilib.
> > So, unless everything on the system is CET enabled, putting the CET support
> > in is just waste of I-cache.
> 
> It's completely ABI compatible. ABI has not changed. You can mix object
> files. But it's true that an app is CET enabled if all object files and
> libraries linked in the app are CET enabled.

So there is some assembler/linker and dynamic linker magic that disables CET
for the process if not all libraries have the CET support?  If yes, what
happens if a process where the binary and all libraries it links directly
against are CET enabled and you dlopen a library that is not?

[Bug middle-end/83019] [8 Regression] Compiler dumps predictions with -nan%

2017-11-21 Thread ubizjak at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83019

Uroš Bizjak  changed:

   What|Removed |Added

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

--- Comment #2 from Uroš Bizjak  ---
Seems fixed as of revision 254948 [1].

[1] https://gcc.gnu.org/ml/gcc-testresults/2017-11/msg01793.html

[Bug sanitizer/82545] [7 Regression] -O2: ICE in gimple_split_edge, at tree-cfg.c:2838, during GIMPLE pass sanopt

2017-11-21 Thread ivo.raisr at oracle dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82545

--- Comment #11 from Ivo Raisr  ---
(In reply to Martin Liška from comment #9)
> Fixed on trunk, queued for backports.

I wonder if you had a chance for backporting this into gcc-7 branch?
Let me know if I can be of assistance here.

[Bug target/83087] -fcf-protection -mcet enabled unconditionally for target libs

2017-11-21 Thread igor.v.tsimbalist at intel dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83087

--- Comment #9 from igor.v.tsimbalist at intel dot com ---
Yes, there is "magic" and HJ is implementing this interface. Please see his
answer for the similar question:

https://gcc.gnu.org/ml/gcc-patches/2017-11/msg00693.html

[Bug target/83087] -fcf-protection -mcet enabled unconditionally for target libs

2017-11-21 Thread trippels at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83087

--- Comment #10 from Markus Trippelsdorf  ---
 % objdump -dS libstdc++.so.6 | grep endbr | wc -l
5508

[Bug c++/83046] ICE in nvptx offloading, C++ compilation of libgomp.oacc-c-c++-common/gang-static-2.c

2017-11-21 Thread marxin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83046

--- Comment #7 from Martin Liška  ---
Created attachment 42667
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=42667&action=edit
Untested patch

[Bug tree-optimization/83044] [8 Regression] ice in contains_struct_check

2017-11-21 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83044

Jakub Jelinek  changed:

   What|Removed |Added

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

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

Untested fix.

[Bug target/83087] -fcf-protection -mcet enabled unconditionally for target libs

2017-11-21 Thread igor.v.tsimbalist at intel dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83087

--- Comment #11 from igor.v.tsimbalist at intel dot com ---
So the increase compared to object file size is negligible. Increase of a text
segment is ~1.4%.

[Bug c++/83046] ICE in nvptx offloading, C++ compilation of libgomp.oacc-c-c++-common/gang-static-2.c

2017-11-21 Thread marxin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83046

Martin Liška  changed:

   What|Removed |Added

 Status|WAITING |NEW

--- Comment #8 from Martin Liška  ---
(In reply to Martin Liška from comment #7)
> Created attachment 42667 [details]
> Untested patch

Can you please Thomas test it and send to mailing list (and commit).
Thanks.

[Bug sanitizer/82545] [7 Regression] -O2: ICE in gimple_split_edge, at tree-cfg.c:2838, during GIMPLE pass sanopt

2017-11-21 Thread marxin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82545

--- Comment #12 from Martin Liška  ---
I'll backport it today.

[Bug tree-optimization/82042] signed integer overflow in ao_ref_init_from_ptr_and_size

2017-11-21 Thread marxin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82042

--- Comment #5 from Martin Liška  ---
Author: marxin
Date: Tue Nov 21 13:39:14 2017
New Revision: 255001

URL: https://gcc.gnu.org/viewcvs?rev=255001&root=gcc&view=rev
Log:
Fix UBSAN errors in dse.c (PR rtl-optimization/82044).

2017-11-21  Martin Liska  

PR rtl-optimization/82044
PR tree-optimization/82042
* dse.c (check_mem_read_rtx): Check for overflow.

Modified:
trunk/gcc/ChangeLog
trunk/gcc/dse.c

[Bug rtl-optimization/82044] runtime signed integer overflow in check_mem_read_rtx() and all_positions_needed_p() in dse.c

2017-11-21 Thread marxin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82044

--- Comment #3 from Martin Liška  ---
Author: marxin
Date: Tue Nov 21 13:39:14 2017
New Revision: 255001

URL: https://gcc.gnu.org/viewcvs?rev=255001&root=gcc&view=rev
Log:
Fix UBSAN errors in dse.c (PR rtl-optimization/82044).

2017-11-21  Martin Liska  

PR rtl-optimization/82044
PR tree-optimization/82042
* dse.c (check_mem_read_rtx): Check for overflow.

Modified:
trunk/gcc/ChangeLog
trunk/gcc/dse.c

[Bug rtl-optimization/82044] runtime signed integer overflow in check_mem_read_rtx() and all_positions_needed_p() in dse.c

2017-11-21 Thread marxin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82044

Martin Liška  changed:

   What|Removed |Added

 Status|NEW |ASSIGNED
  Known to work||8.0

--- Comment #4 from Martin Liška  ---
Fixed on trunk, planned for backports.

[Bug fortran/82250] Fortran OpenACC acc_on_device early folding

2017-11-21 Thread dominiq at lps dot ens.fr
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82250

Dominique d'Humieres  changed:

   What|Removed |Added

 Status|UNCONFIRMED |WAITING
   Last reconfirmed||2017-11-21
 Ever confirmed|0   |1

--- Comment #2 from Dominique d'Humieres  ---
Is this a gfortran bug/enhancement request?

[Bug fortran/82392] Allign arrays for faster execution

2017-11-21 Thread dominiq at lps dot ens.fr
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82392

Dominique d'Humieres  changed:

   What|Removed |Added

 Status|UNCONFIRMED |WAITING
   Last reconfirmed||2017-11-21
 Ever confirmed|0   |1

--- Comment #1 from Dominique d'Humieres  ---
Would it be possible to have reduced test case?

[Bug sanitizer/82484] [8 Regression] ICE in verify_gimple failed w/ -fsanitize=address

2017-11-21 Thread marxin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82484

Martin Liška  changed:

   What|Removed |Added

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

--- Comment #2 from Martin Liška  ---
Fixed.

[Bug ada/83027] program hangs when Ada.Text_IO is with'ed both in executable and shared library

2017-11-21 Thread porton at narod dot ru
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83027

--- Comment #21 from Victor Porton  ---
@Eric Botcazou:

Adding binder flag -F solves the problem in the attached examples
https://gcc.gnu.org/bugzilla/attachment.cgi?id=42630 and
https://gcc.gnu.org/bugzilla/attachment.cgi?id=42666 but not in my real code:

https://github.com/vporton/spawn-manager

[Bug tree-optimization/83086] [8 Regression] valgrind error in gimple-ssa-store-merging.c for recent build

2017-11-21 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83086

--- Comment #4 from Jakub Jelinek  ---
Author: jakub
Date: Tue Nov 21 13:54:08 2017
New Revision: 255002

URL: https://gcc.gnu.org/viewcvs?rev=255002&root=gcc&view=rev
Log:
PR tree-optimization/83086
* gimple-ssa-store-merging.c
(imm_store_chain_info::try_coalesce_bswap): Test this_n.base_addr
rather than n.base_addr.

Modified:
trunk/gcc/ChangeLog
trunk/gcc/gimple-ssa-store-merging.c

[Bug tree-optimization/83089] [8 Regression] ICE: Segmentation fault (in instantiate_scev_name)

2017-11-21 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83089

Richard Biener  changed:

   What|Removed |Added

 Status|UNCONFIRMED |ASSIGNED
   Last reconfirmed||2017-11-21
   Assignee|unassigned at gcc dot gnu.org  |rguenth at gcc dot 
gnu.org
   Target Milestone|--- |8.0
 Ever confirmed|0   |1

--- Comment #1 from Richard Biener  ---
I will have a look.

[Bug fortran/83088] [8 Regression] ICE with -init-derived

2017-11-21 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83088

Richard Biener  changed:

   What|Removed |Added

   Target Milestone|--- |8.0

[Bug tree-optimization/83086] [8 Regression] valgrind error in gimple-ssa-store-merging.c for recent build

2017-11-21 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83086

Richard Biener  changed:

   What|Removed |Added

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

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

[Bug target/82880] [6/7/8 Regression] gcc --help=target --help=optimizers hangs on mips

2017-11-21 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82880

--- Comment #2 from Jakub Jelinek  ---
Author: jakub
Date: Tue Nov 21 14:50:03 2017
New Revision: 255004

URL: https://gcc.gnu.org/viewcvs?rev=255004&root=gcc&view=rev
Log:
PR target/82880
* config/mips/frame-header-opt.c (mips_register_frame_header_opt):
Remove static keyword from f variable.

* gcc.dg/opts-8.c: New test.

Added:
trunk/gcc/testsuite/gcc.dg/opts-8.c
Modified:
trunk/gcc/ChangeLog
trunk/gcc/config/mips/frame-header-opt.c
trunk/gcc/testsuite/ChangeLog

[Bug target/82880] [6/7 Regression] gcc --help=target --help=optimizers hangs on mips

2017-11-21 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82880

Jakub Jelinek  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2017-11-21
Summary|[6/7/8 Regression] gcc  |[6/7 Regression] gcc
   |--help=target   |--help=target
   |--help=optimizers hangs on  |--help=optimizers hangs on
   |mips|mips
 Ever confirmed|0   |1

--- Comment #3 from Jakub Jelinek  ---
Fixed on the trunk so far.

[Bug gcov-profile/82702] gcov intermediate format is creating multiple 'gcov' files, it was creating a single file up to GCC 6

2017-11-21 Thread marxin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82702

Martin Liška  changed:

   What|Removed |Added

  Known to work||8.0
  Known to fail||7.2.0

--- Comment #10 from Martin Liška  ---
Fixed on trunk.

[Bug tree-optimization/83089] [8 Regression] ICE: Segmentation fault (in instantiate_scev_name)

2017-11-21 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83089

--- Comment #2 from Richard Biener  ---
if-conversion fails to do a scev_reset despite DCEing stmts.  testing patch.

[Bug debug/83034] [8 Regression] ice in mem_loc_descriptor, at dwarf2out.c :15669

2017-11-21 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83034

Jakub Jelinek  changed:

   What|Removed |Added

 Status|UNCONFIRMED |ASSIGNED
   Last reconfirmed||2017-11-21
   Assignee|unassigned at gcc dot gnu.org  |jakub at gcc dot gnu.org
 Ever confirmed|0   |1

--- Comment #1 from Jakub Jelinek  ---
Created attachment 42669
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=42669&action=edit
gcc8-pr83034.patch

Untested fix.

[Bug gcov-profile/82457] libgcov fork and exec hooks not always used

2017-11-21 Thread marxin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82457

Martin Liška  changed:

   What|Removed |Added

  Known to work||8.0
  Known to fail|8.0 |5.4.0, 6.4.0

--- Comment #10 from Martin Liška  ---
Fixed on trunk.

[Bug tree-optimization/83072] Late VRP optimization

2017-11-21 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83072

--- Comment #2 from Richard Biener  ---
The interesting bit is that during the stmt folding

/* For integral types with undefined overflow and C != 0 fold
   x * C EQ/NE y * C into x EQ/NE y.  */
(for cmp (eq ne)
 (simplify
  (cmp (mult:c @0 @1) (mult:c @2 @1))
  (if (INTEGRAL_TYPE_P (TREE_TYPE (@1))
   && TYPE_OVERFLOW_UNDEFINED (TREE_TYPE (@0))
   && tree_expr_nonzero_p (@1))
   (cmp @0 @2

has to apply.

The issue is that when EVRP records value-ranges that only hold temporarily
it doesn't update SSA_NAME_RANGE_INFO but only the internal lattice while
if the range is determined at the SSA definition point it also updates
SSA_NAME_RANGE_INFO.

[Bug fortran/34040] Support for DOUBLE_TYPE_SIZE != 64 targets

2017-11-21 Thread joel at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=34040

--- Comment #16 from Joel Sherrill  ---
I assume this ICE during a build of bfin-rtems on the master is indicative of
the same underlying problem. I have reported this before on the sh2e but didn't
know of this PR.

libtool: compile:  /home/joel/test-gcc/b-bfin-rtems5-gcc/./gcc/xgcc
-B/home/joel/test-gcc/b-bfin-rtems5-gcc/./gcc/ -nostdinc
-B/home/joel/test-gcc/b-bfin-rtems5-gcc/bfin-rtems5/newlib/ -isystem
/home/joel/test-gcc/b-bfin-rtems5-gcc/bfin-rtems5/newlib/targ-include -isystem
/home/joel/test-gcc/gcc/newlib/libc/include
-B/home/joel/test-gcc/install-master/bfin-rtems5/bin/
-B/home/joel/test-gcc/install-master/bfin-rtems5/lib/ -isystem
/home/joel/test-gcc/install-master/bfin-rtems5/include -isystem
/home/joel/test-gcc/install-master/bfin-rtems5/sys-include -DHAVE_CONFIG_H -I.
-I../../../gcc/libgfortran -iquote../../../gcc/libgfortran/io
-I../../../gcc/libgfortran/../gcc -I../../../gcc/libgfortran/../gcc/config
-I../.././gcc -I../../../gcc/libgfortran/../libgcc -I../libgcc
-I../../../gcc/libgfortran/../libbacktrace -I../libbacktrace -I../libbacktrace
-std=gnu11 -Wall -Wstrict-prototypes -Wmissing-prototypes
-Wold-style-definition -Wextra -Wwrite-strings
-Werror=implicit-function-declaration -Werror=vla -fcx-fortran-rules
-ffunction-sections -fdata-sections -g -O2 -MT sum_c8.lo -MD -MP -MF
.deps/sum_c8.Tpo -c ../../../gcc/libgfortran/generated/sum_c8.c -o sum_c8.o
during RTL pass: reload
../../../gcc/libgfortran/generated/sum_c8.c: In function 'sum_c8':
../../../gcc/libgfortran/generated/sum_c8.c:191:1: internal compiler error: in
require, at machmode.h:282
 }
 ^
0x59f58c opt_mode::require() const
../../gcc/gcc/machmode.h:282
0x59f58c replace_reg_with_saved_mem
../../gcc/gcc/caller-save.c:1151
0x5a00c6 mark_referenced_regs
../../gcc/gcc/caller-save.c:1073
0x5a00c6 mark_referenced_regs
../../gcc/gcc/caller-save.c:1073
0x5a1105 save_call_clobbered_regs()
../../gcc/gcc/caller-save.c:895
0x9ba530 reload(rtx_insn*, int)
../../gcc/gcc/reload1.c:980
0x8540ce do_reload
../../gcc/gcc/ira.c:5458
0x8540ce execute
../../gcc/gcc/ira.c:5630
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See  for instructions.
make[3]: *** [sum_c8.lo] Error 1

[Bug c++/83020] [7 Regression] ('17) Class template constructor call skipped with no error when substitution fails in default argument

2017-11-21 Thread paolo.carlini at oracle dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83020

Paolo Carlini  changed:

   What|Removed |Added

Summary|('17) Class template|[7 Regression] ('17) Class
   |constructor call skipped|template constructor call
   |with no error when  |skipped with no error when
   |substitution fails in   |substitution fails in
   |default argument|default argument

--- Comment #2 from Paolo Carlini  ---
Thus, for -std=c++17, this is a 7 Regression. First of all, I think I'm going
to add the testcase to trunk.

[Bug tree-optimization/82991] memcpy and strcpy return value can be assumed to be equal to first argument

2017-11-21 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82991

--- Comment #3 from Richard Biener  ---
Found it (old tree):

Index: tree-ssa-sccvn.c
===
--- tree-ssa-sccvn.c(revision 254072)
+++ tree-ssa-sccvn.c(working copy)
@@ -4123,6 +4234,25 @@ visit_use (tree use)
  changed = defs_to_varying (call_stmt);
  goto done;
}
+
+ int rflags = gimple_call_return_flags (call_stmt);
+ if (rflags & ERF_RETURNS_ARG)
+   {
+ unsigned argnum = rflags & ERF_RETURN_ARG_MASK;
+ if (argnum < gimple_call_num_args (call_stmt))
+   {
+ tree arg = gimple_call_arg (call_stmt, argnum);
+ if (TREE_CODE (arg) == SSA_NAME
+ /*|| is_gimple_min_invariant (arg)*/)
+   {
+ changed = visit_copy (lhs, arg);
+ if (gimple_vdef (call_stmt))
+   changed |= set_ssa_val_to (gimple_vdef (call_stmt),
+  gimple_vdef (call_stmt));
+ goto done;
+   }
+   }
+   }
}

   /* Pick up flags from a devirtualization target.  */
Index: tree-ssa-pre.c
===
--- tree-ssa-pre.c  (revision 254072)
+++ tree-ssa-pre.c  (working copy)
@@ -4309,6 +4369,14 @@ eliminate_dom_walker::before_dom_childre
eliminate_push_avail (sprime);
}

+ /* While we might have value numbered a call return value to
+one of its arguments the call itself might not be solely
+represented by its return value.  Thus do not ignore
+side-effects indicated by a VARYING vdef.  */
+ if (gimple_vdef (stmt)
+ && VN_INFO (gimple_vdef (stmt))->valnum == gimple_vdef (stmt))
+   sprime = NULL_TREE;
+
  /* If this now constitutes a copy duplicate points-to
 and range info appropriately.  This is especially
 important for inserted code.  See tree-ssa-copy.c

[Bug c++/83020] [7 Regression] ('17) Class template constructor call skipped with no error when substitution fails in default argument

2017-11-21 Thread paolo at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83020

--- Comment #3 from paolo at gcc dot gnu.org  ---
Author: paolo
Date: Tue Nov 21 15:36:25 2017
New Revision: 255006

URL: https://gcc.gnu.org/viewcvs?rev=255006&root=gcc&view=rev
Log:
2017-11-21  Paolo Carlini  

PR c++/83020
* g++.dg/cpp1z/pr83020.C: New.

Added:
trunk/gcc/testsuite/g++.dg/cpp1z/pr83020.C
Modified:
trunk/gcc/testsuite/ChangeLog

[Bug target/83090] New: ICE on lm32-rtems building newlib libm (in require, at machmode.h:282)

2017-11-21 Thread joel at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83090

Bug ID: 83090
   Summary: ICE on lm32-rtems building newlib libm (in require, at
machmode.h:282)
   Product: gcc
   Version: 8.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: target
  Assignee: unassigned at gcc dot gnu.org
  Reporter: joel at gcc dot gnu.org
  Target Milestone: ---

Created attachment 42670
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=42670&action=edit
Preprocessed output of file causing ICE

Target: lm32-rtems5
gcc master: 8 79218abbbc680d3329b2e3d460bb0414333f3889

The build fails during newlib's libm. Compiles at -O1 and -Os but not at -O2.

/home/joel/test-gcc/b-lm32-rtems5-gcc/./gcc/xgcc
-B/home/joel/test-gcc/b-lm32-rtems5-gcc/./gcc/ -nostdinc
-B/home/joel/test-gcc/b-lm32-rtems5-gcc/lm32-rtems5/mmultiply-enabled/newlib/
-isystem
/home/joel/test-gcc/b-lm32-rtems5-gcc/lm32-rtems5/mmultiply-enabled/newlib/targ-include
-isystem /home/joel/test-gcc/gcc/newlib/libc/include
-B/home/joel/test-gcc/install-master/lm32-rtems5/bin/
-B/home/joel/test-gcc/install-master/lm32-rtems5/lib/ -isystem
/home/joel/test-gcc/install-master/lm32-rtems5/include -isystem
/home/joel/test-gcc/install-master/lm32-rtems5/sys-include  -mmultiply-enabled
-DPACKAGE_NAME=\"newlib\" -DPACKAGE_TARNAME=\"newlib\"
-DPACKAGE_VERSION=\"2.5.0\" -DPACKAGE_STRING=\"newlib\ 2.5.0\"
-DPACKAGE_BUGREPORT=\"\" -DPACKAGE_URL=\"\" -I.
-I../../../../../../gcc/newlib/libm/math
-I../../../../../../gcc/newlib/libm/math/../common -D_COMPILING_NEWLIB
-DCLOCK_PROVIDED -DMALLOC_PROVIDED -DEXIT_PROVIDED -DSIGNAL_PROVIDED
-DREENTRANT_SYSCALLS_PROVIDED -DHAVE_NANOSLEEP -DHAVE_BLKSIZE -DHAVE_FCNTL
-DHAVE_ASSERT_FUNC -D_NO_GETLOGIN -D_NO_GETPWENT -D_NO_GETUT -D_NO_GETPASS
-D_NO_SIGSET -D_NO_WORDEXP -D_NO_POPEN -D_NO_POSIX_SPAWN -fno-builtin  -g
-O2  -mmultiply-enabled -c -o lib_a-e_j0.o `test -f 'e_j0.c' || echo
'../../../../../../gcc/newlib/libm/math/'`e_j0.c
during RTL pass: reload
../../../../../../gcc/newlib/libm/math/e_j0.c: In function 'pzero':
../../../../../../gcc/newlib/libm/math/e_j0.c:349:1: internal compiler error:
in require, at machmode.h:282
 }
 ^
0x59f48b opt_mode::require() const
../../gcc/gcc/machmode.h:282
0x59f48b replace_reg_with_saved_mem
../../gcc/gcc/caller-save.c:1151
0x59ffb6 mark_referenced_regs
../../gcc/gcc/caller-save.c:1073
0x59ffb6 mark_referenced_regs
../../gcc/gcc/caller-save.c:1073
0x59ffb6 mark_referenced_regs
../../gcc/gcc/caller-save.c:1073
0x59ffb6 mark_referenced_regs
../../gcc/gcc/caller-save.c:1073
0x5a1065 save_call_clobbered_regs()
../../gcc/gcc/caller-save.c:895
0x9b5498 reload(rtx_insn*, int)
../../gcc/gcc/reload1.c:980
0x853a3e do_reload
../../gcc/gcc/ira.c:5458
0x853a3e execute
../../gcc/gcc/ira.c:5630
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See  for instructions.

[Bug target/81804] m32c ICE during configure at leaf_function_p, at final.c:4317

2017-11-21 Thread joel at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81804

--- Comment #1 from Joel Sherrill  ---
Version: (GCC) 8.0.0 20171120
target: m32c-rtems, likely for m32c-elf

Still happens. line number has moved in the source file but ICE is still the
same.

[Bug middle-end/83004] [8 regression] gcc.dg/vect/pr81136.c fail

2017-11-21 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83004

Jakub Jelinek  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2017-11-21
 CC||jakub at gcc dot gnu.org
 Ever confirmed|0   |1

--- Comment #1 from Jakub Jelinek  ---
I think this test fails with -mavx and later since it has been introduced.
The test uses the VECTOR_BITS macro and assumes that is the vector size, but
tree-vect.h hardcodes VECTOR_BITS to 128 on all targets and all ISAs.
Strangely, various tests test for VECTOR_BITS > 128, > 256 etc.
So, shall we define VECTOR_BITS to higher values based on preprocessor macros?
For x86, the question then would be if __AVX__ without __AVX2__ should enable
VECTOR_BITS 256 or not, floating point vectors are 256-bit, but integral
128-bit.
Also, -mprefer-avx{128,256} change this stuff.
Or shall we have VECTOR_BITS as usual vector bits and MAX_VECTOR_BITS as
maximum for the current option?
Or shall the test use its own macro, defined by default to VECTOR_BITS but for
some ISAs to something different?

[Bug testsuite/82997] [8 regression] gcc.dg/cpp/sysmac1.c and gcc.dg/cpp/macsyntx.c fail starting with r254707

2017-11-21 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82997

Jakub Jelinek  changed:

   What|Removed |Added

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

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

[Bug c/83056] GCC suggests the use of previously reported undeclared identifiers when reporting new undeclared identifiers

2017-11-21 Thread dmalcolm at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83056

--- Comment #2 from David Malcolm  ---
Candidate patch:
  https://gcc.gnu.org/ml/gcc-patches/2017-11/msg01907.html

[Bug debug/82933] [8 Regression] valgrind error in set_cur_line_info_table with -g

2017-11-21 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82933

Jakub Jelinek  changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 Resolution|--- |FIXED
   Assignee|unassigned at gcc dot gnu.org  |jakub at gcc dot gnu.org

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

[Bug middle-end/82878] [7 Regression] ICE in assign_temp, at function.c:968 when using optimization

2017-11-21 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82878

Jakub Jelinek  changed:

   What|Removed |Added

Summary|[7/8 Regression] ICE in |[7 Regression] ICE in
   |assign_temp, at |assign_temp, at
   |function.c:968 when using   |function.c:968 when using
   |optimization|optimization

--- Comment #6 from Jakub Jelinek  ---
Fixed on the trunk so far.

[Bug middle-end/82987] [8 regression] gcc.dg/vect/slp-perm-9.c fail

2017-11-21 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82987

Jakub Jelinek  changed:

   What|Removed |Added

 CC||jakub at gcc dot gnu.org

--- Comment #1 from Jakub Jelinek  ---
Dup of PR82847?

  1   2   >