[Bug tree-optimization/80443] [7 Regression] ICE on valid code at -O2 on x86_64-linux-gnu: in set_value_range, at tree-vrp.c:367

2017-04-18 Thread marxin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80443

Martin Liška  changed:

   What|Removed |Added

 CC||marxin at gcc dot gnu.org,
   ||rguenth at gcc dot gnu.org
  Known to work||6.3.0
  Known to fail||7.0.1

--- Comment #2 from Martin Liška  ---
Confirmed, started with r240647.

[Bug sanitizer/80444] -fcompare-debug failures with -fsanitize-coverage=trace-pc

2017-04-18 Thread marxin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80444

Martin Liška  changed:

   What|Removed |Added

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

--- Comment #1 from Martin Liška  ---
Confirmed, started with r231296, where -fsanitize-coverage=trace-pc was added.

[Bug sanitizer/80444] -fcompare-debug failures with -fsanitize-coverage=trace-pc

2017-04-18 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80444

Jakub Jelinek  changed:

   What|Removed |Added

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

--- Comment #2 from Jakub Jelinek  ---
We just need to use gsi_start_nondebug_after_labels_bb.

[Bug sanitizer/80444] -fcompare-debug failures with -fsanitize-coverage=trace-pc

2017-04-18 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80444

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

Untested fix.

[Bug libstdc++/80446] UNRESOLVED: 18_support/launder/1.cc compilation failed to produce executable

2017-04-18 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80446

Jakub Jelinek  changed:

   What|Removed |Added

 CC||jakub at gcc dot gnu.org

--- Comment #1 from Jakub Jelinek  ---
#if __GNUC__ >= 7
# define _GLIBCXX_HAVE_BUILTIN_LAUNDER 1
#elif defined __has_builtin
# if __has_builtin(__builtin_launder)
#  define _GLIBCXX_HAVE_BUILTIN_LAUNDER 1
# endif
#endif
looks best to me.

[Bug gcov-profile/78783] gcov-tool fails in gcov_read_counter_mem

2017-04-18 Thread marxin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78783

--- Comment #5 from Martin Liška  ---
Author: marxin
Date: Tue Apr 18 07:24:20 2017
New Revision: 246961

URL: https://gcc.gnu.org/viewcvs?rev=246961&root=gcc&view=rev
Log:
Validate that destination gcov file does not exist for gcov-tool (PR
gcov-profile/78783).

2017-04-18  Martin Liska  

PR gcov-profile/78783
* libgcov-driver.c (gcov_get_filename): New function.
2017-04-18  Martin Liska  

PR gcov-profile/78783
* gcov-tool.c (gcov_output_files): Validate that destination
file is either removed by the tool or by a user.

Modified:
trunk/gcc/ChangeLog
trunk/gcc/gcov-tool.c
trunk/libgcc/ChangeLog
trunk/libgcc/libgcov-driver.c

[Bug gcov-profile/78783] gcov-tool fails in gcov_read_counter_mem

2017-04-18 Thread marxin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78783

Martin Liška  changed:

   What|Removed |Added

  Known to work||7.0
   Assignee|unassigned at gcc dot gnu.org  |marxin at gcc dot 
gnu.org
  Known to fail||5.4.0, 6.3.0

--- Comment #6 from Martin Liška  ---
Fixed on trunk, queued for backporting to active branches.

[Bug fortran/79430] [7 Regression] action of statement incorrectly optimised away

2017-04-18 Thread bijan at chokoufe dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79430

--- Comment #34 from Bijan Chokoufe  ---
(In reply to Thomas Koenig from comment #32)
> Running your testsuite on powerpc64-unknown-linux-gnu
> with a current trunk and "make -k check" gets me
> 
> PASS: mlm_matching_isr.run
> 
> but also a few more failures:
> 
> FAIL: bloch_vectors.run
> FAIL: processes.run
> FAIL: cascades.run
> FAIL: sf_isr.run
> 
> so I suspect a target issue.
> 
> Could you tell me how just to run a single testcase?

Does mlm_matching_isr.run also work if you remove all uses of volatile in
src/shower/*f90?

[Bug tree-optimization/80443] [7 Regression] ICE on valid code at -O2 on x86_64-linux-gnu: in set_value_range, at tree-vrp.c:367

2017-04-18 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80443

Jakub Jelinek  changed:

   What|Removed |Added

 Status|NEW |ASSIGNED
 CC||jakub at gcc dot gnu.org
   Assignee|unassigned at gcc dot gnu.org  |jakub at gcc dot gnu.org
   Target Milestone|--- |7.0

--- Comment #3 from Jakub Jelinek  ---
This is on a signed 1-bit precision type, with intersection:
~[0, +INF] (this is represented as VR_ANTI_RANGE 0 0)
and
[-INF, +INF] (and this one VR_RANGE -1 0)

But signed 1-bit precision type is always a nightmare to get right.
Debugging.

[Bug libstdc++/80448] New: #include fails with Clang 5.0

2017-04-18 Thread eric at efcs dot ca
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80448

Bug ID: 80448
   Summary: #include  fails with Clang
5.0
   Product: gcc
   Version: 7.0.1
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: libstdc++
  Assignee: unassigned at gcc dot gnu.org
  Reporter: eric at efcs dot ca
  Target Milestone: ---

Simply including  fails to compile when using Clang.
The first error in the stack is:

/opt/gcc-tot/lib/gcc/x86_64-pc-linux-gnu/7.0.1/../../../../include/c++/7.0.1/experimental/bits/fs_dir.h:265:5:
error: default member initializer for '_M_options' needed within definition of
enclosing
  class 'recursive_directory_iterator' outside of member functions
recursive_directory_iterator() noexcept = default;

The complete reproducer is:

// clang++ -std=c++1z -fsyntax-only --gcc-toolchain=/opt/gcc-tot test.cpp
// test.cpp
#include 

[Bug tree-optimization/80443] [7 Regression] ICE on valid code at -O2 on x86_64-linux-gnu: in set_value_range, at tree-vrp.c:367

2017-04-18 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80443

--- Comment #4 from Jakub Jelinek  ---
Created attachment 41210
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=41210&action=edit
gcc7-pr80443.patch

Untested fix.

[Bug testsuite/80220] relative line numbers don't work when put between braces

2017-04-18 Thread vries at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80220

Tom de Vries  changed:

   What|Removed |Added

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

--- Comment #4 from Tom de Vries  ---
Removed line numbers between braces in r246945 (
https://gcc.gnu.org/ml/gcc-patches/2017-04/msg00692.html ).

Closing as resolved-wontfix.

[Bug testsuite/80221] Contrib script to rewrite testcase from absolute to relative line numbers

2017-04-18 Thread vries at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80221
Bug 80221 depends on bug 80220, which changed state.

Bug 80220 Summary: relative line numbers don't work when put between braces
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80220

   What|Removed |Added

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

[Bug gcov-profile/80435] Expose __gcov_flush to allow developers to dump coverage numbers on demand

2017-04-18 Thread marxin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80435

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

[Bug middle-end/80423] [7 Regression] GC related -fcompare-debug failure

2017-04-18 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80423

Jakub Jelinek  changed:

   What|Removed |Added

 CC||jakub at gcc dot gnu.org

--- Comment #6 from Jakub Jelinek  ---
Unfortunately can't reproduce, neither with a cross, nor on powerpc64le-linux
configured with ../configure --enable-languages=c,c++,fortran .
Can this be reproduced on some GCCFarm box somewhere?

[Bug libstdc++/80448] #include fails with Clang 5.0

2017-04-18 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80448

Jonathan Wakely  changed:

   What|Removed |Added

 Status|UNCONFIRMED |ASSIGNED
   Last reconfirmed||2017-04-18
   Assignee|unassigned at gcc dot gnu.org  |redi at gcc dot gnu.org
 Ever confirmed|0   |1

[Bug middle-end/80423] [7 Regression] GC related -fcompare-debug failure

2017-04-18 Thread trippels at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80423

--- Comment #7 from Markus Trippelsdorf  ---
(In reply to Jakub Jelinek from comment #6)
> Unfortunately can't reproduce, neither with a cross, nor on
> powerpc64le-linux configured with ../configure
> --enable-languages=c,c++,fortran .
> Can this be reproduced on some GCCFarm box somewhere?

Yes, on gcc112:

trippels@gcc2-power8 ~ % /home/trippels/gcc_test/usr/local/bin/g++
-fcompare-debug --param ggc-min-expand=20 --param ggc-min-heapsize=0 -c -O3
SampleProfReader.ii -w

[Bug middle-end/80423] [7 Regression] GC related -fcompare-debug failure

2017-04-18 Thread trippels at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80423

--- Comment #8 from Markus Trippelsdorf  ---
Created attachment 41212
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=41212&action=edit
somewhat reduced testcase

[Bug c++/80449] New: ICE reporting failed partial class template specialization class template argument deduction

2017-04-18 Thread ed at catmur dot co.uk
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80449

Bug ID: 80449
   Summary: ICE reporting failed partial class template
specialization class template argument deduction
   Product: gcc
   Version: 7.0.1
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c++
  Assignee: unassigned at gcc dot gnu.org
  Reporter: ed at catmur dot co.uk
  Target Milestone: ---

The following invalid code ICEs:

template struct C;
template<> struct C { C(int, int) {} };
auto k = C{0, 0};

:4:16: error: class template argument deduction failed:
 auto k = C{0, 0};
^
:4:16: internal compiler error: Segmentation fault
mmap: Cannot allocate memory

ICE also occurs if the primary template is complete and does not provide an
appropriate constructor:

template struct C {};
template<> struct C { C(int, int) {} };
auto k = C{0, 0};

Looks similar to bug 79790.

[Bug target/80450] New: -std=c99 breaks -frounding-math on i686

2017-04-18 Thread nsz at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80450

Bug ID: 80450
   Summary: -std=c99 breaks -frounding-math on i686
   Product: gcc
   Version: 7.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: target
  Assignee: unassigned at gcc dot gnu.org
  Reporter: nsz at gcc dot gnu.org
  Target Milestone: ---

on i686 the following code is miscompiled with -std=c99:

void f() { volatile double x = 0x1p-1000*0x1p-1000; }

with -S -O2 -frounding-math:
f:
subl$20, %esp
fldl.LC0// 0x1p-1000
fmul%st(0), %st
fstpl   8(%esp)
addl$20, %esp
ret

with -S -O2 -frounding-math -std=c99 a.c:
f:
subl$20, %esp
fldz// unconditional 0.0
fstpl   8(%esp)
addl$20, %esp
ret

note that there is double rounding (first to 80bit floats then to 64bit),
but with upward rounding the result is non-zero either way so the -std=c99
code is wrong (in c99 only static initializers are evaluated in default fenv).

[Bug c++/80244] [6/7 Regression] ICE with attribute in template alias

2017-04-18 Thread mpolacek at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80244

--- Comment #2 from Marek Polacek  ---
Author: mpolacek
Date: Tue Apr 18 09:34:10 2017
New Revision: 246962

URL: https://gcc.gnu.org/viewcvs?rev=246962&root=gcc&view=rev
Log:
PR c++/80244 - ICE with attribute in template alias.
* tree.c (strip_typedefs): Handle UNDERLYING_TYPE.

* g++.dg/cpp0x/alias-decl-59.C: New test.

Added:
trunk/gcc/testsuite/g++.dg/cpp0x/alias-decl-59.C
Modified:
trunk/gcc/cp/ChangeLog
trunk/gcc/cp/tree.c
trunk/gcc/testsuite/ChangeLog

[Bug c++/80241] [5/6/7 Regression] Broken error message + ICE with invalid attribute

2017-04-18 Thread mpolacek at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80241

--- Comment #3 from Marek Polacek  ---
Author: mpolacek
Date: Tue Apr 18 09:38:55 2017
New Revision: 246963

URL: https://gcc.gnu.org/viewcvs?rev=246963&root=gcc&view=rev
Log:
PR c++/80241 - ICE with alignas pack expansion.
* error.c (dump_expr): Handle TREE_LIST.
* parser.c (cp_parser_std_attribute_list): Return error_mark if
make_pack_expansion returns an error.

* g++.dg/cpp0x/alignas11.C: New test.

Added:
trunk/gcc/testsuite/g++.dg/cpp0x/alignas11.C
Modified:
trunk/gcc/cp/ChangeLog
trunk/gcc/cp/error.c
trunk/gcc/cp/parser.c
trunk/gcc/testsuite/ChangeLog

[Bug c++/80241] [5/6 Regression] Broken error message + ICE with invalid attribute

2017-04-18 Thread mpolacek at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80241

Marek Polacek  changed:

   What|Removed |Added

Summary|[5/6/7 Regression] Broken   |[5/6 Regression] Broken
   |error message  + ICE with   |error message  + ICE with
   |invalid attribute   |invalid attribute

--- Comment #4 from Marek Polacek  ---
Fixed on trunk so far.

[Bug c++/80244] [6 Regression] ICE with attribute in template alias

2017-04-18 Thread mpolacek at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80244

Marek Polacek  changed:

   What|Removed |Added

Summary|[6/7 Regression] ICE with   |[6 Regression] ICE with
   |attribute in template alias |attribute in template alias

--- Comment #3 from Marek Polacek  ---
Fixed on trunk so far.

[Bug target/80236] ARM NEON: Crash in std::map

2017-04-18 Thread d...@dominik-schmidt.de
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80236

--- Comment #12 from Dominik Schmidt  ---
I'm using glibc-2.25.

Anything else I can provide?

[Bug testsuite/80221] Contrib script to rewrite testcase from absolute to relative line numbers

2017-04-18 Thread vries at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80221

--- Comment #12 from Tom de Vries  ---
(In reply to Mike Stump from comment #6)
> The . and .-1, .+1, .-2 forms are fine.  The .-62 forms are as problematic
> as the original I suspect.  I think we should exclude any number greater
> than some small int, say, 9.  So, .-9 .. .+9 in the new form only.  If
> outside that range, I think I'd rather punt.  The idea is that the absolute
> number at least has a line number that in an editor you can go directly to,
> and it corresponds with the number in the error messages directly, aiding
> understanding which one is referred to without having to ungoop the relative
> number first.

I've run the script with the range abs(rellinenr) >= 10, and looked at the
affected testcases.

I found gcc/testsuite/c-c++-common/Wshift-negative-value-1.c, where a dg-error
is added on the last line of the test-case, but it seems more suited to be
added after the line generating the error. [ Perhaps this adding on last line
is a pattern that has been used to avoid the problem of tests starting to fail
when adding a line where it's appropriate due to using absolute line numbers. ]

I also found gcc/testsuite/objc.dg/try-catch-12.m:
...
12  extern void some_func (int *);
13  
14  @implementation TestMyTests
15  - (void) testSpoon {
16volatile int i = 5;
17int q = 99;
18  
19do {
20  @try {
21typeof(i) j = 6;
22typeof(q) k = 66;
23some_func (&j); /* { dg-warning "discards .volatile. qualifier
from pointer target type" } */
24/* { dg-message "but argument is of type" "" { target *-*-* } 12
} */
 ...

The dg-message on line 24 with line argument 12 refers back to the declaration
of some_func.

Using the relative line number for this sort of example doesn't make sense,
given the large distance there can be between decl and use. But keeping the
absolute line number also keeps the problem of tests starting to fail when you
add a line at the start. I think this sort of example is better handled with a
directive dg-save-linenr:
...
12  extern void some_func (int *); /* { dg-save-linenr some_func_decl } */
13  
14  @implementation TestMyTests
15  - (void) testSpoon {
16volatile int i = 5;
17int q = 99;
18  
19do {
20  @try {
21typeof(i) j = 6;
22typeof(q) k = 66;
23some_func (&j); /* { dg-warning "discards .volatile. qualifier
from pointer target type" } */
24/* { dg-message "but argument is of type" "" { target *-*-* }
$some_func_decl } */

[Bug c++/80451] New: return implicit type conversion to std::optional does not compile

2017-04-18 Thread krisk0.2017.02.27 at protonmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80451

Bug ID: 80451
   Summary: return implicit type conversion to std::optional does
not compile
   Product: gcc
   Version: 6.3.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c++
  Assignee: unassigned at gcc dot gnu.org
  Reporter: krisk0.2017.02.27 at protonmail dot com
  Target Milestone: ---
  Host: x86_64-pc-linux-gnu
Target: x86_64-pc-linux-gnu
 Build: x86_64-pc-linux-gnu

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

* Short story: 

under certain conditions, `return v;` statement does not compile.

 * the exact version of GCC;

gcc-6.3.0 (Gentoo 6.3.0 p1.0) 6.3.0

 * the system type;

Gentoo on x86_64

 * the options given when GCC was configured/built;

COLLECT_GCC=gcc-6.3.0
COLLECT_LTO_WRAPPER=/usr/libexec/gcc/x86_64-pc-linux-gnu/6.3.0/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: /tmp/portage/sys-devel/gcc-6.3.0/work/gcc-6.3.0/configure
--host=x86_64-pc-linux-gnu --build=x86_64-pc-linux-gnu --prefix=/usr
--bindir=/usr/x86_64-pc-linux-gnu/gcc-bin/6.3.0
--includedir=/usr/lib/gcc/x86_64-pc-linux-gnu/6.3.0/include
--datadir=/usr/share/gcc-data/x86_64-pc-linux-gnu/6.3.0
--mandir=/usr/share/gcc-data/x86_64-pc-linux-gnu/6.3.0/man
--infodir=/usr/share/gcc-data/x86_64-pc-linux-gnu/6.3.0/info
--with-gxx-include-dir=/usr/lib/gcc/x86_64-pc-linux-gnu/6.3.0/include/g++-v6
--with-python-dir=/share/gcc-data/x86_64-pc-linux-gnu/6.3.0/python
--enable-languages=c,c++ --enable-obsolete --enable-secureplt --disable-werror
--with-system-zlib --disable-nls --enable-checking=release
--with-bugurl=https://bugs.gentoo.org/ --with-pkgversion='Gentoo 6.3.0 p1.0'
--disable-esp --enable-libstdcxx-time --enable-shared --enable-threads=posix
--enable-__cxa_atexit --enable-clocale=gnu --enable-multilib
--with-multilib-list=m32,m64 --disable-altivec --disable-fixed-point
--enable-targets=all --disable-libgcj --enable-libgomp --disable-libmudflap
--disable-libssp --disable-libcilkrts --disable-libmpx --enable-vtable-verify
--enable-libvtv --disable-libquadmath --enable-lto --without-isl
--enable-libsanitizer --disable-default-pie --disable-default-ssp
Thread model: posix
gcc version 6.3.0 (Gentoo 6.3.0 p1.0) 

 * the complete command line that triggers the bug;

gcc-6.3.0 -xc++ -O2 -std=gnu++14 return-bug.c

 * the compiler output (error messages, warnings, etc.); 

return-bug.cc: In function
'std::experimental::fundamentals_v1::optional
meal(std::__cxx11::string)':
return-bug.cc:39:12: error: could not convert 'b' from 'Bread_and_butter' to
'std::experimental::fundamentals_v1::optional'
 return b;
^

 * the preprocessed file (*.i*) that triggers the bug

see attachment

 * Why the code should compile

 1. According to C++ standard §6.6.3 `The value of the expression is implicitly
converted to the return type of the function in which it appears.`
 2. According to
http://en.cppreference.com/w/cpp/experimental/optional/optional, non-explicit
constructor from T& to std::experimental::optional should exist.
 3. The code compiles under gcc 5.4

[Bug tree-optimization/80426] [7 Regression] Wrong constant folding

2017-04-18 Thread ebotcazou at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80426

--- Comment #5 from Eric Botcazou  ---
Created attachment 41214
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=41214&action=edit
Tentative fix

Same fix as PR tree-opt/79666, but for the invariant part.

[Bug middle-end/80423] [7 Regression] GC related -fcompare-debug failure

2017-04-18 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80423

--- Comment #9 from Jakub Jelinek  ---
I think the bug is in:
  t = build_array_type (elt_type, index_type);
  if (elt_type == unsigned_char_type_node
  || elt_type == signed_char_type_node
  || elt_type == char_type_node
  || (TREE_CODE (elt_type) == ENUMERAL_TYPE
  && TYPE_CONTEXT (elt_type) == std_node
  && !strcmp ("byte", TYPE_NAME_STRING (elt_type
TYPE_TYPELESS_STORAGE (t) = 1;
We modify a flag on a cached shared type.  Now, as the flag is controlled
solely by the element type, if all the build_array_type{,_nelts} calls were
done only through this routine, it would just be set everywhere and not a
problem.
But that is not the case, the middle-end etc. also build array types and don't
set the typeless storage flag on it anywhere.
So, either the above needs to be a langhook and we'd need to force that flag on
every array building (but then we need to handle it somehow with LTO too),
or we must not share array types with/without the TYPE_TYPELESS_STORAGE flag.
I'll try to write an untested patch for the latter.

[Bug libstdc++/80451] return implicit type conversion to std::experimental::optional does not compile

2017-04-18 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80451

Jonathan Wakely  changed:

   What|Removed |Added

 CC||ville at gcc dot gnu.org

--- Comment #1 from Jonathan Wakely  ---
This is due to the resolution of
http://cplusplus.github.io/LWG/lwg-defects.html#2451

#include 

class B {
public:
B(const B&) = delete;
B(B&&) { }
B& operator=(const B&) = delete;
B& operator=(B&&) = delete;

B() noexcept {};
};

inline std::experimental::optional
meal() {
B b;
return b;
}

int main() {
auto k = meal();
}

The example tries to construct optional from an lvalue of type B, which
would require a copy, which is deleted. Doing "return std::move(b);" would
work.

[Bug libstdc++/80451] return implicit type conversion to std::experimental::optional does not compile

2017-04-18 Thread krisk0.2017.02.27 at protonmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80451

--- Comment #2 from Денис Крыськов  ---
None of official documents I read says that optional invokes
copy-constructor of T.

Jonathan, did you describe a change in specification, or a temporary
walkaround?

[Bug middle-end/80423] [7 Regression] GC related -fcompare-debug failure

2017-04-18 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80423

--- Comment #10 from Jakub Jelinek  ---
Created attachment 41215
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=41215&action=edit
gcc7-pr80423.patch

Untested fix.

[Bug gcov-profile/71672] inlining indirect calls does not work with autofdo

2017-04-18 Thread marxin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71672

Martin Liška  changed:

   What|Removed |Added

 Status|WAITING |NEW

--- Comment #3 from Martin Liška  ---
Good, using perf 4.6 works for me. However the profile is rejected here:

  if (total >= info->count / 2)
{
  if (dump_file)
fprintf (dump_file, " not hot anymore %ld >= %ld",
 (long)total,
 (long)info->count /2);
  return false;
}

where total == 388 and info->count == 360. IIUC the count belongs to a BB where
the indirect call is triggered? If so, the bail out does not make much sense.
Anyhow, commenting out the return statement, I fails dues to "no target map".

Debugging find_icall_target_map function which is correctly called for p_10 (),
but callsites of main is just single and equal to 'setp'. That's strange, as
the call is completely inlined.

Simple dump patch generates:

f: a1, num_callsites: 0
num_targets: 0
f: main, num_callsites: 1
num_targets: 0
num_targets: 0
num_targets: 1
num_targets: 0
f: setp, num_callsites: 0
num_targets: 0
num_targets: 0

So it looks main contains just the callsite to 'setp', call of 'p' is missing.
Would it be related to a gcov_create issue. Any verbose debug option I can use?

[Bug libstdc++/80451] return implicit type conversion to std::experimental::optional does not compile

2017-04-18 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80451

--- Comment #3 from Jonathan Wakely  ---
LWG 2451 is a specification change, which isn't reflected in the
cppreference.com docs. Using std::move(b) is a workaround. I'm still trying to
determine why the workaround is needed.

[Bug other/80434] internal compiler error: Killed (program cc1plus)

2017-04-18 Thread mpolacek at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80434

Marek Polacek  changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 CC||mpolacek at gcc dot gnu.org
 Resolution|--- |INVALID

--- Comment #4 from Marek Polacek  ---
Closing.

[Bug gcov-profile/71672] inlining indirect calls does not work with autofdo

2017-04-18 Thread marxin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71672

--- Comment #4 from Martin Liška  ---
Another objections is that speculative devirtualization is responsible for
wrong data. However having a simple test-case:

int counter = 0;

class A
{
  public:
virtual void foo () { counter++; }
};


int main()
{
  A *a = new A();

  for (unsigned i = 0; i < 100 * 1000 * 1000; i++)
a->foo ();
}

I still can't see any callsites for function main. Debugging create_gcov would
be necessary I guess.

[Bug c++/80427] DR1658 is implemented in C++03 and C++14 mode, but not C++11

2017-04-18 Thread mpolacek at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80427

Marek Polacek  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2017-04-18
 CC||mpolacek at gcc dot gnu.org
 Ever confirmed|0   |1

--- Comment #1 from Marek Polacek  ---
This has changed in r240874.

[Bug c++/80449] [7 Regression] ICE reporting failed partial class template specialization class template argument deduction

2017-04-18 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80449

Jakub Jelinek  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2017-04-18
 CC||jakub at gcc dot gnu.org,
   ||jason at gcc dot gnu.org
   Target Milestone|--- |7.0
Summary|ICE reporting failed|[7 Regression] ICE
   |partial class template  |reporting failed partial
   |specialization class|class template
   |template argument deduction |specialization class
   ||template argument deduction
 Ever confirmed|0   |1

--- Comment #1 from Jakub Jelinek  ---
Only ICEs with -std=c++17.

Started with r245796.

[Bug c++/80452] New: [DR 1579] incorrect value category deduced for return value

2017-04-18 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80452

Bug ID: 80452
   Summary: [DR 1579] incorrect value category deduced for return
value
   Product: gcc
   Version: 6.3.1
Status: UNCONFIRMED
  Keywords: rejects-valid
  Severity: normal
  Priority: P3
 Component: c++
  Assignee: unassigned at gcc dot gnu.org
  Reporter: redi at gcc dot gnu.org
  Target Milestone: ---

Core 1579 says this should compile, but the type is deduced as an lvalue
reference:

template struct check { };
template struct check;

struct A {
  A() = default;
  A(A&&) = default;
  A(const A&) = delete;
};

template 
struct B {
  template  B(U&&) { check u; }
};

B f()
{
  A a;
  return a;
}


bug.cc: In instantiation of ‘B::B(U&&) [with U = A&; T = A]’:
bug.cc:18:10:   required from here
bug.cc:12:40: error: ‘check u’ has incomplete type
   template  B(U&&) { check u; }
^


It seems r212099 was not enough to implement the DR.

[Bug libstdc++/80451] [6/7 Regression] return implicit type conversion to std::experimental::optional does not compile

2017-04-18 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80451

Jonathan Wakely  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2017-04-18
Summary|return implicit type|[6/7 Regression] return
   |conversion to   |implicit type conversion to
   |std::experimental::optional |std::experimental::optional
   |does not compile|does not compile
 Ever confirmed|0   |1

--- Comment #4 from Jonathan Wakely  ---
This isn't a bug in optional, it's a bug in the implementation of Core 1579 in
r212099 (so my fault). Reported as PR 80452.

The implementation of experimental::optional in GCC 5 didn't rely on converting
moves, so wasn't affected by this bug. We might need a workaround in optional
until the compiler is fixed.

[Bug middle-end/80411] DCE vs. offloading

2017-04-18 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80411

Jakub Jelinek  changed:

   What|Removed |Added

 CC||hubicka at gcc dot gnu.org

--- Comment #2 from Jakub Jelinek  ---
So, do we want to force output of everything we reference from the offload
tables, like untested:
--- gcc/omp-offload.c.jj2017-03-29 07:11:21.0 +0200
+++ gcc/omp-offload.c   2017-04-18 14:08:25.154650257 +0200
@@ -152,6 +152,11 @@ add_decls_addresses_to_decl_constructor
   CONSTRUCTOR_APPEND_ELT (v_ctor, NULL_TREE, addr);
   if (is_var)
CONSTRUCTOR_APPEND_ELT (v_ctor, NULL_TREE, size);
+
+  if (is_var)
+   varpool_node::get (it)->force_output = 1;
+  else
+   cgraph_node::get (it)->mark_force_output ();
 }
 }


?
Note I have no idea why the cgraph/symtab code doesn't see those table ctors
and figure this out from those.

[Bug tree-optimization/80426] [7 Regression] wrong manipulation of range based on INT_MIN

2017-04-18 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80426

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

[Bug libstdc++/80451] [6/7 Regression] return implicit type conversion to std::experimental::optional does not compile

2017-04-18 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80451

Jonathan Wakely  changed:

   What|Removed |Added

 Depends on||80452

--- Comment #5 from Jonathan Wakely  ---
Fixing this in the library might not be feasible without regressing something
else.


Referenced Bugs:

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80452
[Bug 80452] [DR 1579] incorrect value category deduced for return value

[Bug middle-end/80423] [7 Regression] GC related -fcompare-debug failure

2017-04-18 Thread trippels at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80423

--- Comment #11 from Markus Trippelsdorf  ---
With the proposed patch:

trippels@gcc2-power8 llvm_build % cat ClangOffloadBundler.ii
typedef unsigned char uint8_t;
struct A {
  template  A(unsigned char (&)[N]);
};
void fn1(A) {
  uint8_t a[]{0};
  fn1(a);
}

trippels@gcc2-power8 llvm_build % /home/trippels/gcc_test/usr/local/bin/g++ -c
ClangOffloadBundler.ii
ClangOffloadBundler.ii: In function ‘void fn1(A)’:
ClangOffloadBundler.ii:7:8: internal compiler error: canonical types differ for
identical types unsigned char [1] and uint8_t [1] {aka unsigned char [1]}
   fn1(a);
^
0x1038d76b comptypes(tree_node*, tree_node*, int)
../../gcc/gcc/cp/typeck.c:1433
0x10191a53 reference_related_p(tree_node*, tree_node*)
../../gcc/gcc/cp/call.c:1442
0x101a68b3 reference_binding
../../gcc/gcc/cp/call.c:1595
0x101a793b implicit_conversion
../../gcc/gcc/cp/call.c:1837
0x101a9c5b add_function_candidate
../../gcc/gcc/cp/call.c:2196
0x101ab0c7 add_template_candidate_real
../../gcc/gcc/cp/call.c:3208
0x101abc57 add_template_candidate
../../gcc/gcc/cp/call.c:3252
0x101abc57 add_candidates
../../gcc/gcc/cp/call.c:5483
0x101a5933 build_user_type_conversion_1
../../gcc/gcc/cp/call.c:3799
0x101a7853 implicit_conversion
../../gcc/gcc/cp/call.c:1898
0x101a9c5b add_function_candidate
../../gcc/gcc/cp/call.c:2196
0x101aba8f add_candidates
../../gcc/gcc/cp/call.c:5496
0x101ac593 perform_overload_resolution
../../gcc/gcc/cp/call.c:4143
0x101afef3 build_new_function_call(tree_node*, vec**, bool, int)
../../gcc/gcc/cp/call.c:4232
0x103fd9f3 finish_call_expr(tree_node*, vec**,
bool, bool, int)
../../gcc/gcc/cp/semantics.c:2441
0x10348197 cp_parser_postfix_expression
../../gcc/gcc/cp/parser.c:6992
0x10348f9f cp_parser_unary_expression
../../gcc/gcc/cp/parser.c:8103
0x1034a613 cp_parser_cast_expression
../../gcc/gcc/cp/parser.c:8781
0x1034af87 cp_parser_binary_expression
../../gcc/gcc/cp/parser.c:8882
0x1034bab7 cp_parser_assignment_expression
../../gcc/gcc/cp/parser.c:9169

[Bug libstdc++/80448] #include fails with Clang 5.0

2017-04-18 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80448

--- Comment #1 from Jonathan Wakely  ---
What are the following errors? I can't see why a default member initializer for
an enum can cause a problem.

[Bug fortran/79430] [7 Regression] action of statement incorrectly optimised away

2017-04-18 Thread tkoenig at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79430

--- Comment #35 from Thomas Koenig  ---
(In reply to Bijan Chokoufe from comment #34)

> Does mlm_matching_isr.run also work if you remove all uses of volatile in
> src/shower/*f90?

Yes, the test was with the original tarball mentioned in
comment#1.

[tkoenig@gcc1-power7 shower]$ pwd
/home/tkoenig/whizard-2.4.1/src/shower
[tkoenig@gcc1-power7 shower]$ grep -i volatile *.f90
[tkoenig@gcc1-power7 shower]$ 

Did you run a diff on the generated assembly with and without
the VOLATILE statement?  You can use the -save-temps option for that.

[Bug driver/79637] missing documentation for PARAM_MAX_FSM_THREAD_LENGTH

2017-04-18 Thread marxin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79637

Martin Liška  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2017-04-18
 CC||marxin at gcc dot gnu.org,
   ||spop at gcc dot gnu.org
 Ever confirmed|0   |1

--- Comment #1 from Martin Liška  ---
Confirmed, adding the author of the patch. I guess Jeff is also familiar with
the option.

[Bug libstdc++/69769] arithmetic operation on pointer to a function

2017-04-18 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69769

Jonathan Wakely  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2017-04-18
 Ever confirmed|0   |1

--- Comment #5 from Jonathan Wakely  ---
P0558R1 added the following to the atomic specialization:

Requires: T shall be an object type, otherwise the program is ill-formed.
[Note: Pointer arithmetic on void* or function pointers is ill-formed. — end
note ]

[Bug middle-end/77475] unnecessary or misleading context in reporting command line problems

2017-04-18 Thread marxin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77475

Martin Liška  changed:

   What|Removed |Added

 CC||noloader at gmail dot com

--- Comment #9 from Martin Liška  ---
*** Bug 79974 has been marked as a duplicate of this bug. ***

[Bug driver/79974] First line of file is printed with unrecognized -mtune x86 option

2017-04-18 Thread marxin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79974

Martin Liška  changed:

   What|Removed |Added

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

--- Comment #1 from Martin Liška  ---
Dup.

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

[Bug ipa/79763] [CHKP] ICE in chkp_find_bounds: Unexpected tree code real_cst in tree-chkp.c:3681

2017-04-18 Thread marxin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79763

Martin Liška  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2017-04-18
 Ever confirmed|0   |1

[Bug middle-end/79989] [7 Regression][CHKP] ICE in assign_temp, at function.c:968

2017-04-18 Thread marxin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79989

Martin Liška  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2017-04-18
 Ever confirmed|0   |1

[Bug testsuite/80221] Contrib script to rewrite testcase from absolute to relative line numbers

2017-04-18 Thread vries at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80221

--- Comment #13 from Tom de Vries  ---
Created attachment 41216
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=41216&action=edit
updated script patch

This updated patch rewrites a line from absolute to relative linenumber if:
- the relative line number is '.-1', '.' or '.+1', or
- it's adjacent to a line we will rewrite (with the line numbers being
  consecutive)

The biggest relative line number generated by the script is 6.

[Bug testsuite/80221] Contrib script to rewrite testcase from absolute to relative line numbers

2017-04-18 Thread vries at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80221

--- Comment #14 from Tom de Vries  ---
Created attachment 41217
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=41217&action=edit
Result from running updated script

Untested for now.

[Bug middle-end/80423] [7 Regression] GC related -fcompare-debug failure

2017-04-18 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80423

Jakub Jelinek  changed:

   What|Removed |Added

  Attachment #41215|0   |1
is obsolete||

--- Comment #12 from Jakub Jelinek  ---
Created attachment 41218
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=41218&action=edit
gcc7-pr80423.patch

Updated patch (still untested).

[Bug target/79242] ICE in simplify_subreg, at simplify-rtx.c:6029

2017-04-18 Thread marxin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79242

Martin Liška  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2017-04-18
 CC||marxin at gcc dot gnu.org
  Component|middle-end  |target
 Ever confirmed|0   |1

--- Comment #1 from Martin Liška  ---
Confirmed, there's reduced test-case for C:

typedef __int20 unsigned a;
int b, c (c > a (-1) / b);

./xgcc -B. tc.ii
tc.ii: In function ‘void __static_initialization_and_destruction_0(int, int)’:
tc.ii:2:13: internal compiler error: in simplify_subreg, at simplify-rtx.c:6034
 int b, c (c > a (-1) / b);
   ~~^~~~
0x105d288 simplify_subreg(machine_mode, rtx_def*, machine_mode, unsigned int)
../../gcc/simplify-rtx.c:6034
0x105dfd7 simplify_gen_subreg(machine_mode, rtx_def*, machine_mode, unsigned
int)
../../gcc/simplify-rtx.c:6265
0x105e07e lowpart_subreg(machine_mode, rtx_def*, machine_mode)
../../gcc/simplify-rtx.c:6288
0xc40370 gen_lowpart_common(machine_mode, rtx_def*)
../../gcc/emit-rtl.c:1456
0x103c314 gen_lowpart_general(machine_mode, rtx_def*)
../../gcc/rtlhooks.c:47
0xc7816d convert_move(rtx_def*, rtx_def*, int)
../../gcc/expr.c:530
0xc77f96 convert_move(rtx_def*, rtx_def*, int)
../../gcc/expr.c:508
0xc78ad5 convert_modes(machine_mode, machine_mode, rtx_def*, int)
../../gcc/expr.c:685
0xdf2639 expand_arith_overflow_result_store
../../gcc/internal-fn.c:568
0xdf68da expand_mul_overflow
../../gcc/internal-fn.c:1849
0xdf7f41 expand_arith_overflow
../../gcc/internal-fn.c:2149
0xdf8317 expand_MUL_OVERFLOW
../../gcc/internal-fn.c:2242
0xdfab1a expand_internal_call(internal_fn, gcall*)
../../gcc/internal-fn.c:2778
0xdfab45 expand_internal_call(gcall*)
../../gcc/internal-fn.c:2786
0xb42e0f expand_call_stmt
../../gcc/cfgexpand.c:2569
0xb42e0f expand_gimple_stmt_1
../../gcc/cfgexpand.c:3571
0xb42e0f expand_gimple_stmt
../../gcc/cfgexpand.c:3737
0xb4486e expand_gimple_basic_block
../../gcc/cfgexpand.c:5744
0xb4a4d6 execute
../../gcc/cfgexpand.c:6357

[Bug libstdc++/80451] [6/7 Regression] return implicit type conversion to std::experimental::optional does not compile

2017-04-18 Thread krisk0.2017.02.27 at protonmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80451

--- Comment #6 from Денис Крыськов  ---
Seems like a serious bug in compiler.

Jonathan, thanks for quick investigation.

[Bug libstdc++/80451] [6/7 Regression] return implicit type conversion to std::experimental::optional does not compile

2017-04-18 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80451

--- Comment #7 from Jonathan Wakely  ---
(In reply to Денис Крыськов from comment #6)
> Seems like a serious bug in compiler.

No, it's just an incomplete implementation of a new feature added in C++14.

[Bug c++/79435] [7 Regression] ICE on invalid C++ code (with member access into an incomplete type) on x86_64-linux-gnu: Segmentation fault

2017-04-18 Thread gjl at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79435

--- Comment #5 from Georg-Johann Lay  ---
Author: gjl
Date: Tue Apr 18 13:15:47 2017
New Revision: 246966

URL: https://gcc.gnu.org/viewcvs?rev=246966&root=gcc&view=rev
Log:
gcc/
PR target/79435
* config/avr/avr.c (intl.h): Include it.
(avr_pgm_check_var_decl) [reason]: Wrap diagnostic snippets into _().


Modified:
trunk/gcc/ChangeLog
trunk/gcc/config/avr/avr.c

[Bug middle-end/80375] [5/6/7 Regression] ICE in expand_expr_real_2, at expr.c:9382 with -ftrapv

2017-04-18 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80375

--- Comment #4 from Jakub Jelinek  ---
Author: jakub
Date: Tue Apr 18 13:15:46 2017
New Revision: 246965

URL: https://gcc.gnu.org/viewcvs?rev=246965&root=gcc&view=rev
Log:
PR middle-end/79788
PR middle-end/80375
* c-common.c (c_common_type_for_mode): Don't handle
widest_*_literal_type_node here.
c_common_signed_or_unsigned_type): Likewise.
(c_common_nodes_and_builtins): Set widest_*_literal_type_node
to *intTI_type_node or *intDI_type_node depending on whether
TImode is supported by the target or not.

* gcc.dg/pr79788-1.c: New test.
* gcc.dg/pr79788-2.c: New test.

Added:
trunk/gcc/testsuite/gcc.dg/pr79788-1.c
trunk/gcc/testsuite/gcc.dg/pr79788-2.c
Modified:
trunk/gcc/c-family/ChangeLog
trunk/gcc/c-family/c-common.c
trunk/gcc/testsuite/ChangeLog

[Bug middle-end/79788] ICE in expand_expr_real_2, at expr.c:9557

2017-04-18 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79788

--- Comment #8 from Jakub Jelinek  ---
Author: jakub
Date: Tue Apr 18 13:15:46 2017
New Revision: 246965

URL: https://gcc.gnu.org/viewcvs?rev=246965&root=gcc&view=rev
Log:
PR middle-end/79788
PR middle-end/80375
* c-common.c (c_common_type_for_mode): Don't handle
widest_*_literal_type_node here.
c_common_signed_or_unsigned_type): Likewise.
(c_common_nodes_and_builtins): Set widest_*_literal_type_node
to *intTI_type_node or *intDI_type_node depending on whether
TImode is supported by the target or not.

* gcc.dg/pr79788-1.c: New test.
* gcc.dg/pr79788-2.c: New test.

Added:
trunk/gcc/testsuite/gcc.dg/pr79788-1.c
trunk/gcc/testsuite/gcc.dg/pr79788-2.c
Modified:
trunk/gcc/c-family/ChangeLog
trunk/gcc/c-family/c-common.c
trunk/gcc/testsuite/ChangeLog

[Bug fortran/79430] [7 Regression] action of statement incorrectly optimised away

2017-04-18 Thread bijan at chokoufe dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79430

--- Comment #36 from Bijan Chokoufe  ---
Created attachment 41219
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=41219&action=edit
Diff of generalized assembly with and without volatile

[Bug libstdc++/80448] #include fails with Clang 5.0

2017-04-18 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80448

--- Comment #2 from Jonathan Wakely  ---
Apparently related to CWG1351  and solved by
removing 'noexcept' from the ctor.

[Bug c++/79435] [7 Regression] ICE on invalid C++ code (with member access into an incomplete type) on x86_64-linux-gnu: Segmentation fault

2017-04-18 Thread gjl at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79435

--- Comment #6 from Georg-Johann Lay  ---
Author: gjl
Date: Tue Apr 18 13:23:01 2017
New Revision: 246967

URL: https://gcc.gnu.org/viewcvs?rev=246967&root=gcc&view=rev
Log:
gcc/
Backport from 2017-04-18 trunk r246966.
PR target/79435
* config/avr/avr.c (intl.h): Include it.
(avr_pgm_check_var_decl) [reason]: Wrap diagnostic snippets into _().


Modified:
branches/gcc-6-branch/gcc/ChangeLog
branches/gcc-6-branch/gcc/config/avr/avr.c

[Bug driver/69754] --print-{file,prog}-name don't work for liblto_plugin.so

2017-04-18 Thread marxin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69754

Martin Liška  changed:

   What|Removed |Added

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

--- Comment #1 from Martin Liška  ---
Confirmed, can you please send the patch to mailing list
gcc-patc...@gcc.gnu.org? Looks it's overlooked here.

[Bug fortran/79430] [7 Regression] action of statement incorrectly optimised away

2017-04-18 Thread bijan at chokoufe dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79430

--- Comment #37 from Bijan Chokoufe  ---
(In reply to Thomas Koenig from comment #35)

> [tkoenig@gcc1-power7 shower]$ pwd
> /home/tkoenig/whizard-2.4.1/src/shower
> [tkoenig@gcc1-power7 shower]$ grep -i volatile *.f90
> [tkoenig@gcc1-power7 shower]$ 
> 
> Did you run a diff on the generated assembly with and without
> the VOLATILE statement?  You can use the -save-temps option for that.

I generated the .s files with -save-temps with and without volatile attributes.
The diff is attached. I can say the instructions are different but that's about
it.

Concerning your PowerPC compilation: Have you set FCLAGS yourself and if so
have you included -O2? That other tests are failing is not too suprising and
doesn't have to be a major problem as the test suite is not numerically
waterproof (and partly can't be). The issue with memcpy looks like a bug
though.

[Bug middle-end/70897] Confused branch predictors

2017-04-18 Thread marxin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70897

Martin Liška  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2017-04-18
 CC||marxin at gcc dot gnu.org
   Assignee|unassigned at gcc dot gnu.org  |marxin at gcc dot 
gnu.org
 Ever confirmed|0   |1

--- Comment #1 from Martin Liška  ---
Confirmed, I'll take a look at these predictors in GCC8.

[Bug driver/79637] missing documentation for PARAM_MAX_FSM_THREAD_LENGTH

2017-04-18 Thread spop at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79637

--- Comment #2 from Sebastian Pop  ---
Here is what I see in doc/invoke.texi:

@item max-fsm-thread-path-insns
Maximum number of instructions to copy when duplicating blocks on a
finite state automaton jump thread path.  The default is 100.

@item max-fsm-thread-length
Maximum number of basic blocks on a finite state automaton jump thread
path.  The default is 10.

@item max-fsm-thread-paths
Maximum number of new jump thread paths to create for a finite state
automaton.  The default is 50.

I think these parameters are quite technical.  The rule is that all the magic
constants should have a param instead of hard coding them in the code, so they
get exposed to the users of the compiler that way.

Roland, I would have liked to point you to a paper that describes the algorithm
for backwards jump-threading, although we have not wrote one yet.  Jeff, I
think it would be good if I take the time to write that paper, and I will ask
you, James, and Brian to co-sign the paper.

Here is a short description of how the backwards jump-threading works:

We start by looking for a switch or condition statement of the form
"switch(c)". Then, following the SSA definitions backwards from "c" to its
definition, until  a place in the program where the condition "c" is statically
known at compile time. To make the example simple, let's say we reach a
statement that sets "c = 5".  With that information in hand, we create a new
path that starts from the basic block that sets "c = 5" and ends in the target
block of the switch "case 5:".  This is done by duplicating all the basic
blocks on the path from "c = 5" to the target of the now known value of the
condition.
max-fsm-thread-length is the bound on the number of basic blocks on that path,
such that we do not increase too much the code size of the program.

[Bug middle-end/70140] Inefficient expansion of __builtin_mempcpy

2017-04-18 Thread marxin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70140

Martin Liška  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2017-04-18
 CC||marxin at gcc dot gnu.org
   Assignee|unassigned at gcc dot gnu.org  |marxin at gcc dot 
gnu.org
 Ever confirmed|0   |1

--- Comment #1 from Martin Liška  ---
I'll do that for GCC8.

[Bug target/79453] Translator unfriendly string in avr_pgm_check_var_decl

2017-04-18 Thread gjl at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79453

Georg-Johann Lay  changed:

   What|Removed |Added

 Target||avr
   Priority|P3  |P5
 Status|UNCONFIRMED |RESOLVED
   Keywords||diagnostic
  Component|translation |target
 CC||gjl at gcc dot gnu.org
 Resolution|--- |FIXED
   Target Milestone|--- |6.4
   Severity|normal  |minor

--- Comment #1 from Georg-Johann Lay  ---
Fixed in r246966 and r246967

[Bug other/72815] libmpx on i386

2017-04-18 Thread marxin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=72815

Martin Liška  changed:

   What|Removed |Added

 Status|UNCONFIRMED |WAITING
   Last reconfirmed||2017-04-18
 CC||marxin at gcc dot gnu.org
 Ever confirmed|0   |1

--- Comment #1 from Martin Liška  ---
Hi. The file you are mentioning (libmpx/mpxrt/mpxrt.h) is not installed by GCC
and for internal purpose only. Can you please specify how you use the header
file?

[Bug fortran/79430] [7 Regression] action of statement incorrectly optimised away

2017-04-18 Thread tkoenig at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79430

--- Comment #38 from Thomas Koenig  ---
(In reply to Bijan Chokoufe from comment #37)
> (In reply to Thomas Koenig from comment #35)
> 
> > [tkoenig@gcc1-power7 shower]$ pwd
> > /home/tkoenig/whizard-2.4.1/src/shower
> > [tkoenig@gcc1-power7 shower]$ grep -i volatile *.f90
> > [tkoenig@gcc1-power7 shower]$ 
> > 
> > Did you run a diff on the generated assembly with and without
> > the VOLATILE statement?  You can use the -save-temps option for that.
> 
> I generated the .s files with -save-temps with and without volatile
> attributes. The diff is attached. I can say the instructions are different
> but that's about it.

I looked at the diffs, but for me also, nothing stands out.

> Concerning your PowerPC compilation: Have you set FCLAGS yourself

No, I didn't.; I just ran "./configure" and "make -j16".
This is why I suspect a target issue.  Of course, it could also
be that there are different inlining heuristics on PowerPC.

You could add "-m32" to the compiler flags; this would
build a 32-bit binary.  Obviously, you would have to rebuild
the whole source tree.  What does that do?

Additionally, if it is not possible to generate a smaller failing test case,
the next step would be to see which revision failed first.

What is the latest version of the compiler that still works?
Specifically, did you ever try this with an earlier version of
gcc 7 trunk?

[Bug driver/79637] missing documentation for PARAM_MAX_FSM_THREAD_LENGTH

2017-04-18 Thread spop at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79637

--- Comment #3 from Sebastian Pop  ---
As to why we call it a "finite state automaton" jump threading, that is because
this transform shows to be useful when the switch statement in the previous
example is contained in a loop, which is the way most people use to implement a
parser, or a finite state machine.  Some of these automata are implementing
state transitions by setting the next state in one of the cases.  To continue
the example from the previous comment, here is how a two state machine looks
like:

c = 1;
while (1)
{
  switch (c)
{
case 1:
  c = 5;
  break;
case 5:
  c = 1;
  break;
}
}

and after jump threading, it would look like this:

c = 1;
label1:
  c = 5;
  goto label2;

label2:
  c = 1;
  goto label1;

which is much faster than having to take the loop back-edge + jump from switch
to case.

[Bug other/71250] -Wmissing-field-initializers documentation is incomplete

2017-04-18 Thread marxin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71250

Martin Liška  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2017-04-18
 CC||amonakov at gcc dot gnu.org,
   ||manu at gcc dot gnu.org,
   ||marxin at gcc dot gnu.org
 Ever confirmed|0   |1

--- Comment #1 from Martin Liška  ---
Adding to CC authors of the warning.

[Bug tree-optimization/69991] missed tail merge optimization

2017-04-18 Thread marxin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69991

Martin Liška  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2017-04-18
 CC||marxin at gcc dot gnu.org
   Assignee|unassigned at gcc dot gnu.org  |marxin at gcc dot 
gnu.org
 Ever confirmed|0   |1

--- Comment #1 from Martin Liška  ---
Confirmed. I'll take a look at the in GCC 8.

[Bug target/79242] ICE in simplify_subreg, at simplify-rtx.c:6029

2017-04-18 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79242

Jakub Jelinek  changed:

   What|Removed |Added

 CC||jakub at gcc dot gnu.org

--- Comment #2 from Jakub Jelinek  ---
The problem is that for __builtin_*_overflow{,_p} and/or -fsanitize=undefined
and/or for the automatic discovery of constructs checking for overflow uses
complex integer types and apparently that is just completely broken on msp430
and perhaps on other targets that have other similar partial int modes, I think
that might be avr, bfin and m32c.

Try a simple testcase like:
typedef _Complex __int20 C;

C
foo (C x, C y)
{
  return x + y;
}

which ICEs the same.

[Bug debug/80453] New: [7 Regression] another compare-debug failure

2017-04-18 Thread trippels at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80453

Bug ID: 80453
   Summary: [7 Regression] another compare-debug failure
   Product: gcc
   Version: 7.0.1
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: debug
  Assignee: unassigned at gcc dot gnu.org
  Reporter: trippels at gcc dot gnu.org
CC: jakub at gcc dot gnu.org
  Target Milestone: ---

Created attachment 41220
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=41220&action=edit
unreduced testcase

markus@x4 /tmp % g++ --save-temps --param ggc-min-expand=20 --param
ggc-min-heapsize=0 -c -fcompare-debug -Woverloaded-virtual -O3 -fno-exceptions
-fno-rtti CheckerManager.ii
g++: error: CheckerManager.ii: -fcompare-debug failure (length)

markus@x4 /tmp % diff -u CheckerManager.gkd CheckerManager.gk.gkd   
--- CheckerManager.gkd  2017-04-18 15:54:16.758998434 +0200 
+++ CheckerManager.gk.gkd   2017-04-18 15:54:30.302038615 +0200 
@@ -56701,7 +56701,7 @@ 
 (reg:DI 41 r12))
"/home/trippels/llvm/tools/clang/lib/StaticAnalyzer/Core/CheckerManager.cpp":171#
{*pushdi2_rex64}
  (expr_list:REG_DEAD (reg:DI 41 r12)   
 (nil)))
-(insn # 0 0 2 (set (reg/v/f:DI 42 r13 [orig:180 Src ] [180]) 
+(insn # 0 0 2 (set (reg/v/f:DI 42 r13 [orig:184 Src ] [184])   
 (reg:DI 2 cx [ Src ]))
"/home/trippels/llvm/tools/clang/lib/StaticAnalyzer/Core/CheckerManager.cpp":171#
{*movdi_internal}
  (expr_list:REG_DEAD (reg:DI 2 cx [ Src ]) 
 (nil)))
@@ -56713,11 +56713,11 @@  
   
(reg:DI 3 bx))
"/home/trippels/llvm/tools/clang/lib/StaticAnalyzer/Core/CheckerManager.cpp":171#
{*pushdi2_rex64} 
  (expr_list:REG_DEAD (reg:DI 3 bx) 
 (nil)))   
   
   -(insn # 0 0 2 (set (reg:SI 6 bp [orig:178 isPreVisit ]
[178])   
+(insn # 0 0 2 (set (reg:SI 6 bp [orig:182 isPreVisit ] [182])  
 (reg:SI 4 si [ isPreVisit ]))
"/home/trippels/llvm/tools/clang/lib/StaticAnalyzer/Core/CheckerManager.cpp":171#
{*movsi_internal}
  (expr_list:REG_DEAD (reg:SI 4 si [ isPreVisit ])  
 (nil)))
-(insn:TI # 0 0 2 (set (reg/v/f:DI 4 si [orig:181 S ] [181])   
+(insn:TI # 0 0 2 (set (reg/v/f:DI 4 si [orig:185 S ] [185])
 (reg:DI 37 r8 [ S ]))
"/home/trippels/llvm/tools/clang/lib/StaticAnalyzer/Core/CheckerManager.cpp":171#
{*movdi_internal}
  (nil))
 (insn/f:TI # 0 0 2 (parallel [ 
@@ -56733,7 +56733,7 @@
   
(const_int -424 [0xfe58]))) 
 (nil   
 (note # 0 0 NOTE_INSN_PROLOGUE_END)   
   
   -(insn:TI # 0 0 2 (set (reg/v:QI 0 ax [orig:183 WasInlined ]
[183])  
+(insn:TI # 0 0 2 (set (reg/v:QI 0 ax [orig:187 WasInlined ] [187]) 
 (mem/c:QI (plus:DI (reg/f:DI 7 sp) 
 (const_int 480 [0x1e0])) [ WasInlined+0 S1 A64]))
"/home/trippels/llvm/tools/clang/lib/StaticAnalyzer/Core/CheckerManager.cpp":171#
{*movqi_internal} 
  (nil))
...

[Bug libstdc++/80451] [6/7 Regression] return implicit type conversion to std::experimental::optional does not compile

2017-04-18 Thread krisk0.2017.02.27 at protonmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80451

--- Comment #8 from Денис Крыськов  ---
If I understand correctly,
http://www.open-std.org/jtc1/sc22/wg21/docs/cwg_defects.html#1579 is not
implemented in gcc 5.4 and 6.3. Which means some code runs slower than is
should. To be sure that a fast constructor is called, I need to delete slow
constructor. 

Which results in bloated code (each and every class should contain delete
statement).

If that's not serious, that's unpleasant.

[Bug other/71250] -Wmissing-field-initializers documentation is incomplete

2017-04-18 Thread amonakov at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71250

--- Comment #2 from Alexander Monakov  ---
Thanks. Basically the documentation can be enhanced to mention that GCC
shouldn't (and wouldn't) warn for universal zero initializer, which is '{0}' in
C and just '{}' in C++. After a day or so I can submit a patch with an extra
sentence after the short example, like the following:

However, for empty initializers in C++ and '{0}' initializers in C,
no warning is issued, because those are the idiomatic ways to express
zero initialization of the complete object.

[Bug fortran/79430] [7 Regression] action of statement incorrectly optimised away

2017-04-18 Thread bijan at chokoufe dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79430

--- Comment #39 from Bijan Chokoufe  ---
(In reply to Thomas Koenig from comment #38)
> (In reply to Bijan Chokoufe from comment #37)
> > Concerning your PowerPC compilation: Have you set FCLAGS yourself
> 
> No, I didn't.; I just ran "./configure" and "make -j16".
> This is why I suspect a target issue.  Of course, it could also
> be that there are different inlining heuristics on PowerPC.
> 

You have to

  ./configure --with-precision=extended

to reproduce the FAIL. Also add the config.log so we can exclude that any
environment variables are influencing the configure. In principle, it would be
not too surprising if you can't reproduce it on PowerPC as it also does not
happen when -O0 is used and I would assume that optimizations for different
architectures are different.

Configure fails when I set FCFLAGS='-m32' with
**
configure: error: Fortran compiler does not support get_command_argument;
configure aborted.
configure: error:
**

[Bug middle-end/80375] [5/6 Regression] ICE in expand_expr_real_2, at expr.c:9382 with -ftrapv

2017-04-18 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80375

Jakub Jelinek  changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 Resolution|--- |FIXED
Summary|[5/6/7 Regression] ICE in   |[5/6 Regression] ICE in
   |expand_expr_real_2, at  |expand_expr_real_2, at
   |expr.c:9382 with -ftrapv|expr.c:9382 with -ftrapv

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

[Bug middle-end/79788] ICE in expand_expr_real_2, at expr.c:9557

2017-04-18 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79788

Jakub Jelinek  changed:

   What|Removed |Added

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

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

[Bug fortran/79430] [7 Regression] action of statement incorrectly optimised away

2017-04-18 Thread dominiq at lps dot ens.fr
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79430

--- Comment #40 from Dominique d'Humieres  ---
> You have to
>
>  ./configure --with-precision=extended

I don't think this works on powerpc: no 80-bit fp.

[Bug fortran/79430] [7 Regression] action of statement incorrectly optimised away

2017-04-18 Thread tkoenig at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79430

--- Comment #41 from Thomas Koenig  ---
Created attachment 41221
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=41221&action=edit
Config log for PowerPC

Here's the config.log for PowerPC.

[Bug middle-end/67463] PGO (Profile Guided Optimizations) are not applied with gcc-5.2.1 (they are fine on gcc-4.9.x)

2017-04-18 Thread marxin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67463

Martin Liška  changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 CC||marxin at gcc dot gnu.org
 Resolution|--- |WORKSFORME

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

Sorry for waiting for some time. I tested your benchmark, where I had to
disable tcmalloc as I can't link it with GCC 4.9, caused by C++ abi change. I
also enhanced dump output to print total time spent (when function
FCS_PRINT_FINISHED is called):

4.9.4:
Finished in 3.607
Finished in 3.613
Finished in 3.621
Finished in 3.662

5.4.0:
Finished in 3.643
Finished in 3.636
Finished in 3.630
Finished in 3.708

6.3.0:
Finished in 3.618
Finished in 3.618
Finished in 3.627
Finished in 3.652

Tested on my desktop machine with Intel(R) Core(TM) i7-4770 CPU @ 3.40GHz.
That mentioned, I cannot see the regression, all numbers look within noise
level.
The regression you reported is very small (~3%) and it would be very hard to
compare generated assembly to find different decisions made by GCC. Please try
to
test GCC 6 and possible GCC 7 (which will be released in couple of weeks) and
if seen
a significant regress, please reopen the issue.

[Bug fortran/79430] [7 Regression] action of statement incorrectly optimised away

2017-04-18 Thread tkoenig at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79430

--- Comment #42 from Thomas Koenig  ---
Using ./configure --with-precision=extended

results in

checking whether gfortran supports c_float128 (a gfortran extension)... yes
checking the requested floating point precision... extended
configure: error:
***
configure: error: the requested default real kind 'extended' is not available
in this environment
configure: error:
***

[Bug c++/53743] ICE when compiling firefox with PGO and LTO

2017-04-18 Thread marxin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=53743

Martin Liška  changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 CC||marxin at gcc dot gnu.org
 Resolution|--- |FIXED

--- Comment #11 from Martin Liška  ---
It's quite some time and recent regression with the same symptoms has been
reported. Thus closing as fixed.

[Bug c++/53727] ICE when compiling firefox with PGO and LTO (not OOM)

2017-04-18 Thread marxin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=53727

Martin Liška  changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 CC||marxin at gcc dot gnu.org
 Resolution|--- |FIXED

--- Comment #12 from Martin Liška  ---
Closing as it's more than 5 years and no recent error has been seen.

[Bug gcov-profile/55121] ICE in if-conversion with PGO (ARM)

2017-04-18 Thread marxin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=55121

Martin Liška  changed:

   What|Removed |Added

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

--- Comment #17 from Martin Liška  ---
No response, it's quite old issue. Thus closing as fixed.

[Bug gcov-profile/80435] Expose __gcov_flush to allow developers to dump coverage numbers on demand

2017-04-18 Thread hubicka at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80435

Jan Hubicka  changed:

   What|Removed |Added

 CC||hubicka at gcc dot gnu.org

--- Comment #3 from Jan Hubicka  ---
The patch is preapproved (for release branch, too, assuming that RMs agree).
Thanks!

[Bug ipa/65972] ICE after applying a patch to enable verify_ssa with auto-pgo

2017-04-18 Thread marxin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65972

Martin Liška  changed:

   What|Removed |Added

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

--- Comment #7 from Martin Liška  ---
Looks the patch hasn't been applied to trunk. Should I test it and send to ML?

[Bug sanitizer/80444] -fcompare-debug failures with -fsanitize-coverage=trace-pc

2017-04-18 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80444

--- Comment #4 from Jakub Jelinek  ---
Author: jakub
Date: Tue Apr 18 15:02:06 2017
New Revision: 246971

URL: https://gcc.gnu.org/viewcvs?rev=246971&root=gcc&view=rev
Log:
PR sanitizer/80444
* sancov.c (sancov_pass): Use gsi_start_nondebug_after_labels_bb
instead of gsi_after_labels.

* gcc.dg/sancov/pr80444.c: New test.

Added:
trunk/gcc/testsuite/gcc.dg/sancov/pr80444.c
Modified:
trunk/gcc/ChangeLog
trunk/gcc/sancov.c
trunk/gcc/testsuite/ChangeLog

[Bug other/53742] bad assembler output when compiling with LTO and PGO

2017-04-18 Thread marxin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=53742

Martin Liška  changed:

   What|Removed |Added

 Status|UNCONFIRMED |WAITING
   Last reconfirmed||2017-04-18
 CC||marxin at gcc dot gnu.org
 Ever confirmed|0   |1

--- Comment #10 from Martin Liška  ---
Is the issue still valid?

[Bug fortran/79430] [7 Regression] action of statement incorrectly optimised away

2017-04-18 Thread bijan at chokoufe dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79430

--- Comment #43 from Bijan Chokoufe  ---
I actually made the same mistake when generating the diffs. I attach the
correct diff when --with-precision=extended is given to configure. Similar
contents though, as far as I can judge. Strangely, the code without volatile is
overall larger:

-rw-r--r-- 1 root root 1456592 Apr 18 14:43 shower_core.s
-rw-r--r-- 1 root root 1450362 Apr 18 14:20 shower_core_volatile.s

[Bug fortran/79430] [7 Regression] action of statement incorrectly optimised away

2017-04-18 Thread bijan at chokoufe dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79430

--- Comment #44 from Bijan Chokoufe  ---
Created attachment 41222
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=41222&action=edit
Diff of generalized assembly using extended precision with and without volatile

[Bug debug/57737] -fopenmp + -femit-struct-debug-reduced/baseonly = internal compiler error: Segmentation fault

2017-04-18 Thread marxin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=57737

Martin Liška  changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 CC||marxin at gcc dot gnu.org
 Resolution|--- |FIXED

--- Comment #4 from Martin Liška  ---
I can confirmed that it used to ICE for old releases. However, 4.9.0+ works
fine, as well as all active branches. Thus closing as resolved.

[Bug target/74563] [6/7 regression] Classic MIPS16 (non-MIPS16e) function return broken

2017-04-18 Thread law at redhat dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=74563

--- Comment #7 from Jeffrey A. Law  ---
I was essentially thinking the same WRT a proposed patch.


My concern is whether something might be passing in an unexpected rtx for
operands[0] and whether or not we can get into the other pattern for MIPS16.

So I've got a series of builds running with instrumentation to see if any of
the cases I'm worried about triggers during a build of the usual runtime
libraries.

[Bug driver/56469] The .gcno file being generated is not cleaned up after gcc exits with an error.

2017-04-18 Thread marxin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=56469

Martin Liška  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2017-04-18
 CC||marxin at gcc dot gnu.org
   Assignee|unassigned at gcc dot gnu.org  |marxin at gcc dot 
gnu.org
 Ever confirmed|0   |1

--- Comment #1 from Martin Liška  ---
Confirmed, I've got patch for that.

[Bug fortran/80361] [5/6/7 Regression] [OOP] bogus recursive call to nonrecursive procedure with -fcheck=recursion

2017-04-18 Thread juergen.reuter at desy dot de
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80361

--- Comment #23 from Jürgen Reuter  ---
Our code and testsuite now works without problems when using -fcheck=all. 
Seems also no regressions on our side. Thanks for the quick fix.

[Bug other/71250] -Wmissing-field-initializers documentation is incomplete

2017-04-18 Thread vincent-gcc at vinc17 dot net
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71250

--- Comment #3 from Vincent Lefèvre  ---
However, it seems that GCC doesn't support the { 0 } idiom in all cases. For
instance:

#include 

struct { struct { int a; long b; } x; int y; } s = { { 1 }, 1 };

struct { struct { int a; long b; } x; int y; } t = { { 0 }, 1 };

struct { struct { pthread_rwlock_t a; long b; } x; int y; } u = { { 0 }, 1 };

The first structure initialization triggers the warning as expected:

tst.c:3:17: warning: missing initializer for field ‘b’ of ‘struct ’
-Wmissing-field-initializers]
 struct { struct { int a; long b; } x; int y; } s = { { 1 }, 1 };
 ^
tst.c:3:31: note: ‘b’ declared here
 struct { struct { int a; long b; } x; int y; } s = { { 1 }, 1 };
   ^

The second one doesn't trigger any warning due to the use of the idiom.

But the third one triggers the following warning, though the same idiom is
used:

tst.c:7:65: warning: missing braces around initializer [-Wmissing-braces]
 struct { struct { pthread_rwlock_t a; long b; } x; int y; } u = { { 0 }, 1 };
 ^
tst.c:7:65: note: (near initialization for ‘u’)

  1   2   >