[Bug tree-optimization/89479] __restrict

2019-02-23 Thread eyalroz at technion dot ac.il
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89479

Eyal Rozenberg  changed:

   What|Removed |Added

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

--- Comment #2 from Eyal Rozenberg  ---
(In reply to Marc Glisse from comment #1)
> Seems similar enough.

With respect  - this is not about x being a const __restrict pointer; what I
said (including the clang behavior) applies exactly the same when we remove the
const. See: https://godbolt.org/z/hH643a (where the const is gone).

[Bug libstdc++/89416] [9 regression] std::vector::push_back no longer builds.

2019-02-23 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89416

Jonathan Wakely  changed:

   What|Removed |Added

 Status|RESOLVED|REOPENED
 Resolution|FIXED   |---

--- Comment #4 from Jonathan Wakely  ---
Reopened

[Bug c++/89480] New: internal compiler error: in unify, at cp/pt.c:22160 with the template argument force conversion.

2019-02-23 Thread kutdanila at yandex dot ru
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89480

Bug ID: 89480
   Summary: internal compiler error: in unify, at cp/pt.c:22160
with the template argument force conversion.
   Product: gcc
   Version: 8.3.1
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c++
  Assignee: unassigned at gcc dot gnu.org
  Reporter: kutdanila at yandex dot ru
  Target Milestone: ---

Created attachment 45807
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=45807&action=edit
Source file

Command line
`g++ test.cpp -o test`

Source file is attached


The code itself:

template 
struct TSelect {};

enum What {
The
};

template 
struct AnotherOneSelector {
static constexpr Foo Id = Foo::The;
};

template 
struct THelper;

template 
struct THelper::Id}>> {};

int main() {
THelper> t;
}

[Bug libquadmath/89459] Incorrect rounding for fma in some cases

2019-02-23 Thread andres_takach at mentor dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89459

--- Comment #2 from Andres Takach  ---
Tried 8.3.0 (took hours to compile!) and it has the same behavior.

[Bug libstdc++/89416] [9 regression] std::vector::push_back no longer builds.

2019-02-23 Thread orion at cora dot nwra.com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89416

Orion Poplawski  changed:

   What|Removed |Added

 CC||orion at cora dot nwra.com

--- Comment #3 from Orion Poplawski  ---
This change appears to break building of the score-p profiler at least with
clang++ 7.0.1:

/bin/sh ./libtool  --tag=CXX   --mode=compile /usr/bin/clang++ -DHAVE_CONFIG_H
-I. -I../../build-libwrap -I./../src  -I../../build-libwrap/../src
-DLIBWRAP_BUILD -I../src/utils/include
-I../../build-libwrap/../src/utils/include
-I../../build-libwrap/../vendor/common/src/utils/include   -g -O2 -c -o
libscorep_tools_la-scorep_tools_dir.lo `test -f
'../src/tools/lib/scorep_tools_dir.cpp' || echo
'../../build-libwrap/'`../src/tools/lib/scorep_tools_dir.cpp
libtool: compile:  /usr/bin/clang++ -DHAVE_CONFIG_H -I. -I../../build-libwrap
-I./../src -I../../build-libwrap/../src -DLIBWRAP_BUILD -I../src/utils/include
-I../../build-libwrap/../src/utils/include
-I../../build-libwrap/../vendor/common/src/utils/include -g -O2 -c
../../build-libwrap/../src/tools/lib/scorep_tools_dir.cpp  -fPIC -DPIC -o
.libs/libscorep_tools_la-scorep_tools_dir.o
BUILDSTDERR: In file included from
../../build-libwrap/../src/tools/lib/scorep_tools_dir.cpp:19:
BUILDSTDERR: In file included from
../../build-libwrap/../src/tools/lib/scorep_tools_dir.hpp:22:
BUILDSTDERR: In file included from
/usr/bin/../lib/gcc/x86_64-redhat-linux/9/../../../../include/c++/9/string:55:
BUILDSTDERR: In file included from
/usr/bin/../lib/gcc/x86_64-redhat-linux/9/../../../../include/c++/9/bits/basic_string.h:40:
BUILDSTDERR:
/usr/bin/../lib/gcc/x86_64-redhat-linux/9/../../../../include/c++/9/bits/alloc_traits.h:604:44:
error: 'copy' is a protected member of 'std::__is_alloc_insertable_impl'
BUILDSTDERR: : __is_alloc_insertable_impl::template copy<_Alloc>
BUILDSTDERR:^
BUILDSTDERR:
/usr/bin/../lib/gcc/x86_64-redhat-linux/9/../../../../include/c++/9/bits/alloc_traits.h:595:7:
note: declared protected here
BUILDSTDERR:   using copy = decltype(_M_select<_Alloc, const _Tp&>(0));
BUILDSTDERR:   ^
BUILDSTDERR:
/usr/bin/../lib/gcc/x86_64-redhat-linux/9/../../../../include/c++/9/bits/alloc_traits.h:616:44:
error: 'move' is a protected member of 'std::__is_alloc_insertable_impl'
BUILDSTDERR: : __is_alloc_insertable_impl::template move<_Alloc>
BUILDSTDERR:^
BUILDSTDERR:
/usr/bin/../lib/gcc/x86_64-redhat-linux/9/../../../../include/c++/9/bits/alloc_traits.h:598:7:
note: declared protected here
BUILDSTDERR:   using move = decltype(_M_select<_Alloc, _Tp>(0));
BUILDSTDERR:   ^

Apparently just by including 

[Bug target/89271] [9 Regression] gcc.target/powerpc/vsx-simode2.c stopped working in GCC 9

2019-02-23 Thread amodra at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89271

--- Comment #12 from Alan Modra  ---
Author: amodra
Date: Sun Feb 24 02:01:05 2019
New Revision: 269174

URL: https://gcc.gnu.org/viewcvs?rev=269174&root=gcc&view=rev
Log:
[RS6000] Fix _ and tf_ splitters

This patch fixes a bug that can result in "insn does not satisfy its
constraints" if these splitters fire due to not getting ctr for the
jump insn.  Since the jump insn can have any of r,m,d,wi,c,l as the
decremented count output, it's not sufficient to check for
gpc_reg_operand (which matches VSX regs for example).  Seen after
correcting register_move_cost when the cost of gpr <-> vsx is much
lower.  Since this is a prerequisite to fixing PR89271, I'm mentioning
that PR in the ChangeLog.

The tf_ split had a further bug in that it wouldn't match
if the count output was m,d,wi, or l.

PR target/89271
* config/rs6000/rs6000.md (_ split): Check for an int
output reg on add insn.
(tf_ split): Likewise.  Match predicates with insn.


Modified:
branches/gcc-8-branch/gcc/ChangeLog
branches/gcc-8-branch/gcc/config/rs6000/rs6000.md

[Bug target/89474] ice in df_reg_chain_verify_unmarked, at df-scan.c:3995

2019-02-23 Thread pinskia at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89474

Andrew Pinski  changed:

   What|Removed |Added

   Keywords||ice-on-valid-code
 Target||x86_64-*-linux-gnu
  Component|c   |target

--- Comment #1 from Andrew Pinski  ---
>-march=native,

Can you provide gcc -v output when compiling this file?

[Bug tree-optimization/78969] bogus snprintf truncation warning due to missing range info

2019-02-23 Thread msebor at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78969

--- Comment #15 from Martin Sebor  ---
(In reply to Martin Liška from comment #14)
> Martin: Can you please take a look at the last comment?

There is very little to go on in comment #13.  Please provide a complete test
case that reproduces the warning you think is a false positive.

The warning for the test case in comment #0 and comment #4 was fixed by r257857
in GCC 8.0.1:

r257857 | law | 2018-02-20 13:59:22 -0500 (Tue, 20 Feb 2018) | 8 lines

PR middle-end/82123
PR tree-optimization/81592
PR middle-end/79257
* gimple-ssa-sprintf.c (format_integer): Query EVRP range analyzer
for range data rather than using global data.

* gcc.dg/pr81592.c: New test.
* gcc.dg/pr82123.c: New test.

The test cases in comment #11 and comment #12 still trigger a warning with GCC
9 so I'm tempted to treat those as separate (and move them to a bug of their
own) and resolve this bug as fixed.

[Bug fortran/89174] [8/9 Regression] Allocation segfault with CLASS(*) MOLD

2019-02-23 Thread tkoenig at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89174

--- Comment #4 from Thomas Koenig  ---
Just tried out r265170 on powerpc64le (because that machine
boots faster :-), and the test case also segfaults.

Hmm...

[Bug c++/80635] std::optional and bogus -Wmaybe-uninitialized warning

2019-02-23 Thread msebor at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80635

Martin Sebor  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2019-02-23
 Ever confirmed|0   |1

--- Comment #18 from Martin Sebor  ---
Confirmed.

[Bug c++/84605] [7/8/9 Regression] internal compiler error: in xref_basetypes, at cp/decl.c:13818

2019-02-23 Thread paolo.carlini at oracle dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84605

Paolo Carlini  changed:

   What|Removed |Added

 Status|NEW |ASSIGNED
   Assignee|unassigned at gcc dot gnu.org  |paolo.carlini at oracle 
dot com

--- Comment #2 from Paolo Carlini  ---
Looking into it.

[Bug tree-optimization/89479] __restrict

2019-02-23 Thread glisse at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89479

Marc Glisse  changed:

   What|Removed |Added

   Keywords||alias, missed-optimization
 Status|UNCONFIRMED |RESOLVED
  Component|rtl-optimization|tree-optimization
 Resolution|--- |DUPLICATE

--- Comment #1 from Marc Glisse  ---
Seems similar enough.

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

[Bug tree-optimization/81009] missing aliasing optimization for const restrict pointers

2019-02-23 Thread glisse at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81009

Marc Glisse  changed:

   What|Removed |Added

 CC||eyalroz at technion dot ac.il

--- Comment #3 from Marc Glisse  ---
*** Bug 89479 has been marked as a duplicate of this bug. ***

[Bug rtl-optimization/89479] New: __restrict

2019-02-23 Thread eyalroz at technion dot ac.il
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89479

Bug ID: 89479
   Summary: __restrict
   Product: gcc
   Version: 9.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: rtl-optimization
  Assignee: unassigned at gcc dot gnu.org
  Reporter: eyalroz at technion dot ac.il
  Target Milestone: ---

(This is all illustrated at: https://godbolt.org/z/nz2YXE )

Let us make our language C++17. Consider the following function:

  int foo(const int* x, void g())
  {
  int result = *x;
  g();
  result += *x;
  return result;
  }

since we have no aliasing guarantees, we must assume the invocation of g() may
change the value at address x, so we must perform two reads from x to compute
the result - one before the call and one after.

If, however, we add __restrict__ specifier to x:

  int bar(const int* __restrict__ x, void g())
  {
  int result = *x;
  g();
  result += *x;
  return result;
  }

we may assume x "points to an unaliased integer" (as per
https://gcc.gnu.org/onlinedocs/gcc/Restricted-Pointers.html ). That means we
can read from address x just once, and double the value to get our result. I
realize there's a subtle point here, which is whether being "unaliased" also
applies to g()'s behavior. It is my understanding that it does.

Well, clang 7.0 understands things they way I do, and indeed optimizes one of
the reads away in `bar()`. But - g++ 8.3 (and g++ "trunk", whatever that means
on GodBolt) doesn't do so, and reads _twice_ from x both in `foo()` and in
`bar()`.

[Bug fortran/89451] [9 Regression] FAIL: gfortran.dg/pr79315.f90 -O (internal compiler error)

2019-02-23 Thread tkoenig at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89451

Thomas Koenig  changed:

   What|Removed |Added

 CC||tkoenig at gcc dot gnu.org

--- Comment #7 from Thomas Koenig  ---
I also cannot reproduce this.

[Bug fortran/86119] [8 Regression] Intrinsic len has wrong type if used within select type for a class(*) string

2019-02-23 Thread tkoenig at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86119

Thomas Koenig  changed:

   What|Removed |Added

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

--- Comment #9 from Thomas Koenig  ---
Fixed on all affected branches, closing.

[Bug fortran/86119] [8 Regression] Intrinsic len has wrong type if used within select type for a class(*) string

2019-02-23 Thread tkoenig at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86119

--- Comment #8 from Thomas Koenig  ---
Author: tkoenig
Date: Sat Feb 23 22:16:29 2019
New Revision: 269170

URL: https://gcc.gnu.org/viewcvs?rev=269170&root=gcc&view=rev
Log:
2019-02-23  Thomas Koenig  

PR fortran/86119
Backport from trunk
* class.c (gfc_get_len_component): Add argument k for kind.
If the kind of the resulting expression is not equal to k,
convert it.
* gfortran.h (gfc_len_component): Adjust prototype.
* simplify.c (gfc_simplify_len): Pass kind to
gfc_get_len_component.

2019-02-23  Thomas Koenig  

PR fortran/86119
Backport from trunk
* gfortran.dg/warn_conversion_11.f90: New test.


Added:
branches/gcc-8-branch/gcc/testsuite/gfortran.dg/warn_conversion_11.f90
Modified:
branches/gcc-8-branch/gcc/fortran/ChangeLog
branches/gcc-8-branch/gcc/fortran/class.c
branches/gcc-8-branch/gcc/fortran/gfortran.h
branches/gcc-8-branch/gcc/fortran/simplify.c
branches/gcc-8-branch/gcc/testsuite/ChangeLog

[Bug tree-optimization/89478] missed optimization for lambda expression when variable is uninitialized when declared

2019-02-23 Thread glisse at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89478

--- Comment #1 from Marc Glisse  ---
I think the uninitialized variable makes the initialization not constexpr (and
indeed gcc/clang complain if you try to declare test constexpr). Then we hit
the well-known missed optimization that gcc is unable to convert a dynamic
initialization into a static initialization even in the most trivial constant
cases.

[Bug fortran/87566] ICE with class(*) and select

2019-02-23 Thread neil.n.carlson at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87566

Neil Carlson  changed:

   What|Removed |Added

 CC||neil.n.carlson at gmail dot com

--- Comment #12 from Neil Carlson  ---
The commit r265171 that fixed this issue also introduced a regression in 8.2
and 9, and certainly the 7 branch too if it was back-ported to it. See PR89174
for the example, which had worked correctly for 7, 8, and 9, but which now
segfaults on at least 8 and 9. I suppose it's too late revert that patch ...

[Bug libstdc++/89477] Incorrect CTAD deduction guides for set and multiset

2019-02-23 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89477

Jonathan Wakely  changed:

   What|Removed |Added

   Keywords||rejects-valid
 Status|UNCONFIRMED |ASSIGNED
   Last reconfirmed||2019-02-23
Version|unknown |9.0
   Assignee|unassigned at gcc dot gnu.org  |redi at gcc dot gnu.org
 Ever confirmed|0   |1

[Bug tree-optimization/89478] New: missed optimization for lambda expression when variable is uninitialized when declared

2019-02-23 Thread SztfG at yandex dot ru
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89478

Bug ID: 89478
   Summary: missed optimization for lambda expression when
variable is uninitialized when declared
   Product: gcc
   Version: 9.0
Status: UNCONFIRMED
  Keywords: missed-optimization
  Severity: normal
  Priority: P3
 Component: tree-optimization
  Assignee: unassigned at gcc dot gnu.org
  Reporter: SztfG at yandex dot ru
  Target Milestone: ---

testcase:

constexpr void mul2(int &a, const int b)
{
  a = b * 2;
}

int test = []() {int a; mul2(a, 123); return a;}(); 

int test2 = []() {int a = 0; mul2(a, 123); return a;}();


output for GCC trunk with -O3 -std=c++17
_GLOBAL__sub_I_test:
movl$246, test(%rip)
ret
test2:
.long   246
test:
.zero   4


simple testcase:

int test3 = []() {int a; a = 5; return a;}();

_GLOBAL__sub_I_test:
movl$5, test(%rip)
ret
test:
.zero   4

[Bug target/83443] FAIL: gcc.dg/tree-ssa/builtin-sprintf-warn-18.c (test for warnings, line 119)

2019-02-23 Thread msebor at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83443

Martin Sebor  changed:

   What|Removed |Added

 Status|NEW |WAITING

--- Comment #10 from Martin Sebor  ---
Has r269166 made a difference in clearing up these failures?

[Bug fortran/89174] [8/9 Regression] Allocation segfault with CLASS(*) MOLD

2019-02-23 Thread neil.n.carlson at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89174

--- Comment #3 from Neil Carlson  ---
r265171 is the commit that broke the 9.0 trunk; r265171 segfaults but r265170
works correctly. I haven't been able to pinpoint where this stuff was
back-ported to the 8 branch, but it definitely was. This example used to work
for 7, 8, and 9.

[Bug testsuite/89473] FAIL: gcc.dg/tree-ssa/builtin-sprintf-10.c (test for excess errors)

2019-02-23 Thread msebor at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89473

Martin Sebor  changed:

   What|Removed |Added

   Keywords||diagnostic
 Status|UNCONFIRMED |RESOLVED
 CC||msebor at gcc dot gnu.org
  Component|tree-optimization   |testsuite
 Resolution|--- |FIXED

--- Comment #1 from Martin Sebor  ---
The failures were due to bug 77970.  These should be gone with r269137 and
r269167.  Please reopen if they persist.

[Bug libstdc++/89477] New: Incorrect CTAD deduction guides for set and multiset

2019-02-23 Thread arthur.j.odwyer at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89477

Bug ID: 89477
   Summary: Incorrect CTAD deduction guides for set and multiset
   Product: gcc
   Version: unknown
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: libstdc++
  Assignee: unassigned at gcc dot gnu.org
  Reporter: arthur.j.odwyer at gmail dot com
  Target Milestone: ---

I just implemented set/multiset deduction guides for libc++ because they were
missing entirely. My regression test fails on libstdc++ trunk.
The full test is here (non-GNU code warning!) https://reviews.llvm.org/D58582
and https://godbolt.org/z/4-OFMh

The reduced test case is:

```
// https://godbolt.org/z/0TNJ59
#include 
#include 

int main()
{
std::pmr::polymorphic_allocator a;
int arr[] = {1,2,3};
std::set s(arr, arr+3, a);  // ERROR

std::set t({1, 2, 3}, a);  // ERROR 
}
```

libstdc++ believes that CTAD is ambiguous here because although it is obvious
that "arr" and "arr+3" are InputIterators, it is not sure whether
"std::pmr::polymorphic_allocator()" is intended to be an Allocator or a
Compare.

http://eel.is/c++draft/container.requirements#associative.reqmts-15.3
is clear that a deduction guide template parameter named Compare should not
pick up anything which "qualifies as an allocator." So this CTAD should be
unambiguous.

[Bug tree-optimization/89475] Teach ccp about __builtin_bswap{16,32,64}

2019-02-23 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89475

--- Comment #4 from Jakub Jelinek  ---
(In reply to Andrew Pinski from comment #3)
> (In reply to Andrew Pinski from comment #2)
> > x &= 0xaa55;
> >   x = __builtin_bswap16 (x);
> >   if (x & 0xaa55)
> > 
> > 
> > I think that should be:
> > x &= 0xaa55;
> >   x = __builtin_bswap16 (x);
> >   if (x & 0x55aa)
> > 
> > instead.
> 
> Never mind; I can't do math this morning, ~0xaa55 is 0x55aa :).

Yeah, __builtin_bswap16 (~0xaa55) == 0xaa55.

[Bug tree-optimization/89475] Teach ccp about __builtin_bswap{16,32,64}

2019-02-23 Thread pinskia at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89475

--- Comment #3 from Andrew Pinski  ---
(In reply to Andrew Pinski from comment #2)
> x &= 0xaa55;
>   x = __builtin_bswap16 (x);
>   if (x & 0xaa55)
> 
> 
> I think that should be:
> x &= 0xaa55;
>   x = __builtin_bswap16 (x);
>   if (x & 0x55aa)
> 
> instead.

Never mind; I can't do math this morning, ~0xaa55 is 0x55aa :).

[Bug tree-optimization/89475] Teach ccp about __builtin_bswap{16,32,64}

2019-02-23 Thread pinskia at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89475

--- Comment #2 from Andrew Pinski  ---
x &= 0xaa55;
  x = __builtin_bswap16 (x);
  if (x & 0xaa55)


I think that should be:
x &= 0xaa55;
  x = __builtin_bswap16 (x);
  if (x & 0x55aa)

instead.

[Bug fortran/89476] FAIL: gfortran.dg/ISO_Fortran_binding_5.f90

2019-02-23 Thread hjl.tools at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89476

H.J. Lu  changed:

   What|Removed |Added

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

--- Comment #4 from H.J. Lu  ---
Fixed.

[Bug fortran/89476] FAIL: gfortran.dg/ISO_Fortran_binding_5.f90

2019-02-23 Thread hjl at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89476

--- Comment #3 from hjl at gcc dot gnu.org  ---
Author: hjl
Date: Sat Feb 23 19:58:52 2019
New Revision: 269165

URL: https://gcc.gnu.org/viewcvs?rev=269165&root=gcc&view=rev
Log:
Include "../../../libgfortran/ISO_Fortran_binding.h"

PR testsuite/89476
* gfortran.dg/ISO_Fortran_binding_5.c: Include
"../../../libgfortran/ISO_Fortran_binding.h".
* gfortran.dg/ISO_Fortran_binding_6.c: Likewise.

Modified:
trunk/gcc/testsuite/ChangeLog
trunk/gcc/testsuite/gfortran.dg/ISO_Fortran_binding_5.c
trunk/gcc/testsuite/gfortran.dg/ISO_Fortran_binding_6.c

[Bug driver/69471] "-march=native" unintentionally breaks further -march/-mtune flags

2019-02-23 Thread hjl at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69471

--- Comment #10 from hjl at gcc dot gnu.org  ---
Author: hjl
Date: Sat Feb 23 19:39:35 2019
New Revision: 269164

URL: https://gcc.gnu.org/viewcvs?rev=269164&root=gcc&view=rev
Log:
driver: Also prune joined switches with negation

When -march=native is passed to host_detect_local_cpu to the backend,
it overrides all command lines after it.  That means

$ gcc -march=native -march=skylake-avx512

is the treated as

$ gcc -march=skylake-avx512 -march=native

Prune joined switches with Negative and RejectNegative to allow
-march=skylake-avx512 to override previous -march=native on command-line.

gcc/

PR driver/69471
* opts-common.c (prune_options): Also prune joined switches
with Negative and RejectNegative.
* config/i386/i386.opt (march=): Add Negative(march=).
(mtune=): Add Negative(mtune=).
* doc/options.texi: Document Negative used together with Joined
and RejectNegative.

gcc/testsuite/

PR driver/69471
* gcc.dg/pr69471-1.c: New test.
* gcc.dg/pr69471-2.c: Likewise.
* gcc.target/i386/pr69471-3.c: Likewise.

Added:
trunk/gcc/testsuite/gcc.dg/pr69471-1.c
trunk/gcc/testsuite/gcc.dg/pr69471-2.c
trunk/gcc/testsuite/gcc.target/i386/pr69471-3.c
Modified:
trunk/gcc/ChangeLog
trunk/gcc/config/i386/i386.opt
trunk/gcc/doc/options.texi
trunk/gcc/opts-common.c
trunk/gcc/testsuite/ChangeLog

[Bug libstdc++/89461] FAIL: experimental/net/timer/waitable/cons.cc

2019-02-23 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89461

--- Comment #2 from Jonathan Wakely  ---
Oops, that should be:

--- a/libstdc++-v3/include/experimental/io_context
+++ b/libstdc++-v3/include/experimental/io_context
@@ -134,7 +134,8 @@ inline namespace v1
   io_context* _M_ctx;
 };

-using count_type =  size_t;
+using count_type
+  = conditional_t;

 // construct / copy / destroy:

[Bug libstdc++/89461] FAIL: experimental/net/timer/waitable/cons.cc

2019-02-23 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89461

--- Comment #1 from Jonathan Wakely  ---
This might help, but probably isn't the right fix:

--- a/libstdc++-v3/include/experimental/io_context
+++ b/libstdc++-v3/include/experimental/io_context
@@ -134,7 +134,8 @@ inline namespace v1
   io_context* _M_ctx;
 };

-using count_type =  size_t;
+using count_type
+  = conditional_t::is_always_lock_free(), size_t, int>;

 // construct / copy / destroy:

[Bug libstdc++/89466] [7/8/9 Regression] Accessing the Internet while boostrapping

2019-02-23 Thread tkoenig at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89466

--- Comment #16 from Thomas Koenig  ---
(In reply to Jonathan Wakely from comment #11)
> Created attachment 45806 [details]
> Check for working xmlcatalog
> 
> Does this help?

I'm bootstrapping right now, and it seems the problem is gone.

Looks good from my side.

[Bug libstdc++/89466] [7/8/9 Regression] Accessing the Internet while boostrapping

2019-02-23 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89466

--- Comment #15 from Jonathan Wakely  ---
(In reply to Andrew Pinski from comment #14)
> https://trac.osgeo.org/postgis/ticket/963
> 
> Looks more like you don't have those dtd installed ...

The point of the configure checks is to find out if they're installed, and if
they're usable. It should fail immediately if not, because of the --nonet
option.

> This referenced bug report is from 8 years ago complaining about the same
> thing.

Not exactly. In that bug report they say that using --nonet makes it fail
immediately, not try to download the DTDs. That's how it's supposed to work.

It's not a problem for the DTDs to be missing, the configure script detects
that. The problem is a buggy version of xsltproc that ignores the --nonet
option.

[Bug libstdc++/89466] [7/8/9 Regression] Accessing the Internet while boostrapping

2019-02-23 Thread pinskia at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89466

--- Comment #14 from Andrew Pinski  ---
https://trac.osgeo.org/postgis/ticket/963

Looks more like you don't have those dtd installed ...
This referenced bug report is from 8 years ago complaining about the same
thing.

[Bug fortran/89476] FAIL: gfortran.dg/ISO_Fortran_binding_5.f90

2019-02-23 Thread hjl.tools at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89476

--- Comment #2 from H.J. Lu  ---
They should use

#include "../../../libgfortran/ISO_Fortran_binding.h"

[Bug fortran/89476] FAIL: gfortran.dg/ISO_Fortran_binding_5.f90

2019-02-23 Thread hjl.tools at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89476

H.J. Lu  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2019-02-23
 Ever confirmed|0   |1

--- Comment #1 from H.J. Lu  ---
gcc/testsuite/gfortran.dg/ISO_Fortran_binding_5.c:7:10: fatal error:
ISO_Fortran_binding.h: No such file or directory

[Bug libstdc++/89466] [7/8/9 Regression] Accessing the Internet while boostrapping

2019-02-23 Thread tkoenig at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89466

--- Comment #13 from Thomas Koenig  ---
(In reply to Jonathan Wakely from comment #11)
> Created attachment 45806 [details]
> Check for working xmlcatalog
> 
> Does this help?

I'm giving it a spin, it will take an hour or so.

[Bug fortran/89476] New: FAIL: gfortran.dg/ISO_Fortran_binding_5.f90

2019-02-23 Thread hjl.tools at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89476

Bug ID: 89476
   Summary: FAIL: gfortran.dg/ISO_Fortran_binding_5.f90
   Product: gcc
   Version: 9.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: fortran
  Assignee: unassigned at gcc dot gnu.org
  Reporter: hjl.tools at gmail dot com
CC: pault at gcc dot gnu.org
  Target Milestone: ---

On Linux/x86-64, r269156 gave

FAIL: gfortran.dg/ISO_Fortran_binding_5.f90   -O0  (test for excess errors)
FAIL: gfortran.dg/ISO_Fortran_binding_5.f90   -O1  (test for excess errors)
FAIL: gfortran.dg/ISO_Fortran_binding_5.f90   -O2  (test for excess errors)
FAIL: gfortran.dg/ISO_Fortran_binding_5.f90   -O3 -fomit-frame-pointer
-funroll-loops -fpeel-loops -ftracer -finline-functions  (test for excess
errors)
FAIL: gfortran.dg/ISO_Fortran_binding_5.f90   -O3 -g  (test for excess errors)
FAIL: gfortran.dg/ISO_Fortran_binding_5.f90   -Os  (test for excess errors)
FAIL: gfortran.dg/ISO_Fortran_binding_6.f90   -O0  (test for excess errors)
FAIL: gfortran.dg/ISO_Fortran_binding_6.f90   -O1  (test for excess errors)
FAIL: gfortran.dg/ISO_Fortran_binding_6.f90   -O2  (test for excess errors)
FAIL: gfortran.dg/ISO_Fortran_binding_6.f90   -O3 -fomit-frame-pointer
-funroll-loops -fpeel-loops -ftracer -finline-functions  (test for excess
errors)
FAIL: gfortran.dg/ISO_Fortran_binding_6.f90   -O3 -g  (test for excess errors)
FAIL: gfortran.dg/ISO_Fortran_binding_6.f90   -Os  (test for excess errors)

[Bug libstdc++/89466] [7/8/9 Regression] Accessing the Internet while boostrapping

2019-02-23 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89466

--- Comment #12 from Jonathan Wakely  ---
(In reply to Thomas Koenig from comment #10)
> Is this the same output as on your sytem?

No, my version is newer, but I've tested your version previously. You have
libxslt 1.1.28, and it's buggy for some reason.

[Bug libstdc++/89466] [7/8/9 Regression] Accessing the Internet while boostrapping

2019-02-23 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89466

--- Comment #11 from Jonathan Wakely  ---
Created attachment 45806
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=45806&action=edit
Check for working xmlcatalog

Does this help?

[Bug fortran/88117] [9 Regression] ICE in gimplify_var_or_parm_decl, at gimplify.c:2697

2019-02-23 Thread pault at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88117

Paul Thomas  changed:

   What|Removed |Added

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

--- Comment #14 from Paul Thomas  ---
Fixed on 7- thru' 9-branches.

Thanks for the report and Thanks again to Thomas for the detective work.

Paul

[Bug libstdc++/89466] [7/8/9 Regression] Accessing the Internet while boostrapping

2019-02-23 Thread tkoenig at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89466

--- Comment #10 from Thomas Koenig  ---
(In reply to Jonathan Wakely from comment #9)

> It's a Suse-specific bug, the same version of xsltproc works fine for me on
> Fedora.

The version on my system is

xsltproc -V
Using libxml 20904, libxslt 10128 and libexslt 817
xsltproc was compiled against libxml 20904, libxslt 10128 and libexslt 817
libxslt 10128 was compiled against libxml 20904
libexslt 817 was compiled against libxml 20904

Is this the same output as on your sytem?

[Bug libstdc++/89466] [7/8/9 Regression] Accessing the Internet while boostrapping

2019-02-23 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89466

--- Comment #9 from Jonathan Wakely  ---
(In reply to Thomas Koenig from comment #8)
> (In reply to Jonathan Wakely from comment #4)
> > Apparently Suse's xsltproc 1.1.32 works properly, so please either uninstall
> > xsltproc or upgrade to a fixed version.
> 
> It is an absolute no-no to access the net from a configure script.

It doesn't access the net, it runs a local-only command. Your system is buggy.

> 
> If see a few options:
> 
> 1. If it is not needed (as you seem to imply, because otherwiseI could
>not remove it) remove the use of xsltproc in configure

No. It's needed to tell if we can generate the docs.

> 2. If if is needed after all, then put a working version into
>the prerequesites, include a version check and fail at
>configure time if the version shows this broken behavior.

It's a Suse-specific bug, the same version of xsltproc works fine for me on
Fedora.

> As an aside, putting in a hyperlink as a database entry seems...
> asking for trouble, to put it mildly.

XML is not my fault.

[Bug fortran/88117] [9 Regression] ICE in gimplify_var_or_parm_decl, at gimplify.c:2697

2019-02-23 Thread pault at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88117

--- Comment #13 from Paul Thomas  ---
Author: pault
Date: Sat Feb 23 18:44:54 2019
New Revision: 269163

URL: https://gcc.gnu.org/viewcvs?rev=269163&root=gcc&view=rev
Log:
2019-02-23  Paul Thomas  

Backport from trunk
PR fortran/88117
* resolve.c (deferred_op_assign): Return if the lhs expression
has the pointer attribute.

2019-02-23  Paul Thomas  

Backport from trunk
PR fortran/88117
* gfortran.dg/deferred_character_32.f90 : New test

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

[Bug libstdc++/89466] [7/8/9 Regression] Accessing the Internet while boostrapping

2019-02-23 Thread tkoenig at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89466

--- Comment #8 from Thomas Koenig  ---
(In reply to Jonathan Wakely from comment #4)
> Apparently Suse's xsltproc 1.1.32 works properly, so please either uninstall
> xsltproc or upgrade to a fixed version.

It is an absolute no-no to access the net from a configure script.

If see a few options:

1. If it is not needed (as you seem to imply, because otherwiseI could
   not remove it) remove the use of xsltproc in configure

2. If if is needed after all, then put a working version into
   the prerequesites, include a version check and fail at
   configure time if the version shows this broken behavior.

As an aside, putting in a hyperlink as a database entry seems...
asking for trouble, to put it mildly.

[Bug libstdc++/89466] [7/8/9 Regression] Accessing the Internet while boostrapping

2019-02-23 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89466

--- Comment #7 from Jonathan Wakely  ---
See 'man xmlcatalog' and http://www.xmlsoft.org/catalog.html and
http://www.jclark.com/sp/catalog.htm

The xsltproc command is correct, and does not connect to the internet, it just
queries the local catalog. Your xsltproc has a bug, not GCC.

[Bug libstdc++/89466] [7/8/9 Regression] Accessing the Internet while boostrapping

2019-02-23 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89466

--- Comment #6 from Jonathan Wakely  ---
No. It's a key used to lookup an entry in the xmlcatalog database.

[Bug libstdc++/89466] [7/8/9 Regression] Accessing the Internet while boostrapping

2019-02-23 Thread tkoenig at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89466

--- Comment #5 from Thomas Koenig  ---
(In reply to Jonathan Wakely from comment #2)
> Your xsltproc is broken, the --nonet option means it should not try to
> download DTDs.

So, the hyperlink can be safely removed or redirected to /dev/null?

[Bug libstdc++/89464] shared_ptr_base.h: error: '__tag' was not declared in this scope (gcc-8.3.0 regression?)

2019-02-23 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89464

--- Comment #8 from Jonathan Wakely  ---
(In reply to Andrew Pinski from comment #4)
> The problem is in https://github.com/Silicondust/libhdhomerun:
> hdhomerun_os_posix.h
> Which does:
> #if !defined(alignas)
> #define alignas(n) __attribute__((aligned(n)))
> #endif

This would be less broken as:

#if !defined(__cplusplus) && !defined(alignas)
#define alignas(n) __attribute__((aligned(n)))
#endif

[Bug libstdc++/89464] shared_ptr_base.h: error: '__tag' was not declared in this scope (gcc-8.3.0 regression?)

2019-02-23 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89464

--- Comment #7 from Jonathan Wakely  ---
alignas is a keyword in C++, it's not supposed to be a macro at all.

GCC 8.3.0 now uses alignas in the standard library headers, which is OK because
it's a C++ feature supported by the compiler. Stop defining a macro with the
name of a keyword, that's undefined.

[Bug libstdc++/89466] [7/8/9 Regression] Accessing the Internet while boostrapping

2019-02-23 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89466

--- Comment #4 from Jonathan Wakely  ---
Apparently Suse's xsltproc 1.1.32 works properly, so please either uninstall
xsltproc or upgrade to a fixed version.

[Bug libstdc++/89466] [7/8/9 Regression] Accessing the Internet while boostrapping

2019-02-23 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89466

Jonathan Wakely  changed:

   What|Removed |Added

 CC||rguenth at gcc dot gnu.org

--- Comment #3 from Jonathan Wakely  ---
This is a known bug on Suse, I think Richi looked into it a while ago.

[Bug libstdc++/89466] [7/8/9 Regression] Accessing the Internet while boostrapping

2019-02-23 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89466

--- Comment #2 from Jonathan Wakely  ---
Your xsltproc is broken, the --nonet option means it should not try to download
DTDs.

[Bug fortran/84387] Defined output does not work for a derived type that has no components

2019-02-23 Thread jvdelisle at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84387

--- Comment #9 from Jerry DeLisle  ---
Author: jvdelisle
Date: Sat Feb 23 18:07:10 2019
New Revision: 269161

URL: https://gcc.gnu.org/viewcvs?rev=269161&root=gcc&view=rev
Log:
2019-02-23  Jerry DeLisle 

PR fortran/84387
* trans-io.c (transfer_expr): Do not return if there are no
components to the derived type or class.

* gfortran.dg/dtio_34.f90: New test.

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

[Bug tree-optimization/89475] Teach ccp about __builtin_bswap{16,32,64}

2019-02-23 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89475

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

Untested improvement.  GCC10 material I guess.

[Bug tree-optimization/89475] New: Teach ccp about __builtin_bswap{16,32,64}

2019-02-23 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89475

Bug ID: 89475
   Summary: Teach ccp about __builtin_bswap{16,32,64}
   Product: gcc
   Version: 9.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: tree-optimization
  Assignee: unassigned at gcc dot gnu.org
  Reporter: jakub at gcc dot gnu.org
  Target Milestone: ---

When looking at PR89435, I've noticed ccp should be able, but doesn't, optimize
__builtin_bswap{16,32,64}.

Those builtins should preserve both the mask and INTEGER_CST from the argument,
just bswapped.

Short testcase:

void link_error (void);

unsigned short
f0 (unsigned short x)
{
  x &= 0xaa55;
  x = __builtin_bswap16 (x);
  if (x & 0xaa55)
link_error ();
  return x;
}

unsigned short
f1 (unsigned short x)
{
  x &= 0x55aa;
  x = __builtin_bswap16 (x);
  if (x & 0x55aa)
link_error ();
  return x;
}

unsigned int
f2 (unsigned int x)
{
  x &= 0x55aa5aa5U;
  x = __builtin_bswap32 (x);
  if (x & 0x5aa555aaU)
link_error ();
  return x;
}

unsigned long long int
f3 (unsigned long long int x)
{
  x &= 0x55aa5aa544cc2211ULL;
  x = __builtin_bswap64 (x);
  if (x & 0xeedd33bb5aa555aaULL)
link_error ();
  return x;
}

unsigned short
f4 (unsigned short x)
{
  x = __builtin_bswap32 (x);
  if (x != 0)
link_error ();
  return x;
}

unsigned int
f5 (unsigned int x)
{
  x = __builtin_bswap64 (x);
  if (x != 0)
link_error ();
  return x;
}

unsigned short
f6 (unsigned short x)
{
  x |= 0xaa55;
  x = __builtin_bswap16 (x);
  if ((x | 0xaa55) != 0x)
link_error ();
  return x;
}

unsigned short
f7 (unsigned short x)
{
  x |= 0x55aa;
  x = __builtin_bswap16 (x);
  if ((x | 0x55aa) != 0x)
link_error ();
  return x;
}

unsigned int
f8 (unsigned int x)
{
  x |= 0x55aa5aa5U;
  x = __builtin_bswap32 (x);
  if ((x | 0x5aa555aaU) != 0xU)
link_error ();
  return x;
}

unsigned long long int
f9 (unsigned long long int x)
{
  x |= 0x55aa5aa544cc2211ULL;
  x = __builtin_bswap64 (x);
  if ((x | 0xeedd33bb5aa555aaULL) != 0xULL)
link_error ();
  return x;
}

Perhaps somewhat related to PR55177.

[Bug tree-optimization/89475] Teach ccp about __builtin_bswap{16,32,64}

2019-02-23 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89475

Jakub Jelinek  changed:

   What|Removed |Added

   Keywords||missed-optimization
 Status|UNCONFIRMED |ASSIGNED
   Last reconfirmed||2019-02-23
   Assignee|unassigned at gcc dot gnu.org  |jakub at gcc dot gnu.org
 Ever confirmed|0   |1

[Bug target/83443] FAIL: gcc.dg/tree-ssa/builtin-sprintf-warn-18.c (test for warnings, line 119)

2019-02-23 Thread danglin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83443

John David Anglin  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed|2018-01-15 00:00:00 |2019-02-23
 Ever confirmed|0   |1

--- Comment #9 from John David Anglin  ---
The test doesn't fail on hppa64-*=hpux*.

[Bug fortran/89266] ICE with TRANSFER of len=0 character array constructor

2019-02-23 Thread anlauf at gmx dot de
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89266

--- Comment #10 from Harald Anlauf  ---
(In reply to Harald Anlauf from comment #9)
> A patch that does this has been posted here:
> 
> https://gcc.gnu.org/ml/fortran/2019-02/msg00153.html

This patch also fixes PR88326.

[Bug c/89474] New: ice in df_reg_chain_verify_unmarked, at df-scan.c:3995

2019-02-23 Thread dcb314 at hotmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89474

Bug ID: 89474
   Summary: ice in df_reg_chain_verify_unmarked, at df-scan.c:3995
   Product: gcc
   Version: 9.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c
  Assignee: unassigned at gcc dot gnu.org
  Reporter: dcb314 at hotmail dot com
  Target Milestone: ---

For this C code:

a;
b(double);
c() {
  while (d())
b(a);
}

compiled with recent gcc trunk and compiler flags -O3 -march=native,
does this:

during RTL pass: ira
bug507.c:6:1: internal compiler error: in df_reg_chain_verify_unmarked, at
df-scan.c:3995
6 | }
  | ^
0x61ca63 df_reg_chain_verify_unmarked
../../trunk/gcc/df-scan.c:3995


The bug seems to start between revisions 269100 and 269150. 
/proc/cpuinfo says

vendor_id   : AuthenticAMD
cpu family  : 21
model   : 2
model name  : AMD FX(tm)-8350 Eight-Core Processor

[Bug fortran/88117] [9 Regression] ICE in gimplify_var_or_parm_decl, at gimplify.c:2697

2019-02-23 Thread tk at tkoenig dot net
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88117

--- Comment #12 from tk at tkoenig dot net ---
> --- Comment #11 from Dominique d'Humieres  ---
> The ICE is now gone, but I get segmentation fault at run time. If I comment 
> the
> line
> 
>   z = (z)
> 
> I get
> 
> ab
> 
> Program received signal SIGSEGV: Segmentation fault - invalid memory 
> reference.
> 
> Is this expected?

Yes. The pointer is not pointing at a valid target.

[Bug tree-optimization/89473] New: FAIL: gcc.dg/tree-ssa/builtin-sprintf-10.c (test for excess errors)

2019-02-23 Thread danglin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89473

Bug ID: 89473
   Summary: FAIL: gcc.dg/tree-ssa/builtin-sprintf-10.c (test for
excess errors)
   Product: gcc
   Version: 9.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: tree-optimization
  Assignee: unassigned at gcc dot gnu.org
  Reporter: danglin at gcc dot gnu.org
  Target Milestone: ---
  Host: hppa-unknown-linux-gnu
Target: hppa-unknown-linux-gnu
 Build: hppa-unknown-linux-gnu

spawn -ignore SIGHUP /home/dave/gnu/gcc/objdir/gcc/xgcc
-B/home/dave/gnu/gcc/obj
dir/gcc/
/home/dave/gnu/gcc/gcc/gcc/testsuite/gcc.dg/tree-ssa/builtin-sprintf-10
.c -fno-diagnostics-show-caret -fno-diagnostics-show-line-numbers
-fdiagnostics-
color=never -O2 -Wall -fdump-tree-optimized -S -o builtin-sprintf-10.s
/home/dave/gnu/gcc/gcc/gcc/testsuite/gcc.dg/tree-ssa/builtin-sprintf-10.c: In
fu
nction 'elim_wide_char_call':
/home/dave/gnu/gcc/gcc/gcc/testsuite/gcc.dg/tree-ssa/builtin-sprintf-10.c:50:25:
 warning: format '%lc' expects argument of type 'wint_t', but argument 4 has
typ
e 'long int' [-Wformat=]
/home/dave/gnu/gcc/gcc/gcc/testsuite/gcc.dg/tree-ssa/builtin-sprintf-10.c:26:9:
note: in definition of macro 'ELIM'
/home/dave/gnu/gcc/gcc/gcc/testsuite/gcc.dg/tree-ssa/builtin-sprintf-10.c:50:28:
 note: format string is defined here
/home/dave/gnu/gcc/gcc/gcc/testsuite/gcc.dg/tree-ssa/builtin-sprintf-10.c:51:25:
 warning: format '%lc' expects argument of type 'wint_t', but argument 4 has
typ
e 'long int' [-Wformat=]
[...]
FAIL: gcc.dg/tree-ssa/builtin-sprintf-10.c (test for excess errors)
Excess errors:
/home/dave/gnu/gcc/gcc/gcc/testsuite/gcc.dg/tree-ssa/builtin-sprintf-10.c:50:25:
warning: format '%lc' expects argument of type 'wint_t', but argument 4 has
type 'long int' [-Wformat=]
[...]

[Bug debug/89472] New: FAIL: gcc.dg/debug/dwarf2/inline5.c scan-assembler-times DW_TAG_lexical_block\\)[^#/!@;\\|]*[#/!@;\\|]+ +[^#/!@\\|]*\\(DIE \\(0x[0-9a-f]*\\) DW_TAG_variable 1

2019-02-23 Thread danglin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89472

Bug ID: 89472
   Summary: FAIL: gcc.dg/debug/dwarf2/inline5.c
scan-assembler-times
DW_TAG_lexical_block\\)[^#/!@;\\|]*[#/!@;\\|]+
+[^#/!@\\|]*\\(DIE \\(0x[0-9a-f]*\\) DW_TAG_variable 1
   Product: gcc
   Version: 9.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: debug
  Assignee: unassigned at gcc dot gnu.org
  Reporter: danglin at gcc dot gnu.org
  Target Milestone: ---
  Host: hppa*-*-* (dwarf2)
Target: hppa*-*-* (dwarf2)
 Build: hppa*-*-* (dwarf2)

Created attachment 45804
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=45804&action=edit
.s file

spawn -ignore SIGHUP /home/dave/gnu/gcc/objdir/gcc/xgcc
-B/home/dave/gnu/gcc/obj
dir/gcc/ /home/dave/gnu/gcc/gcc/gcc/testsuite/gcc.dg/debug/dwarf2/inline5.c
-fno
-diagnostics-show-caret -fno-diagnostics-show-line-numbers
-fdiagnostics-color=n
ever -O -gdwarf -dA -ffat-lto-objects -fno-ident -S -o inline5.s
PASS: gcc.dg/debug/dwarf2/inline5.c (test for excess errors)
PASS: gcc.dg/debug/dwarf2/inline5.c scan-assembler-times
DW_TAG_inlined_subrouti
ne 2
PASS: gcc.dg/debug/dwarf2/inline5.c scan-assembler-times
DW_TAG_lexical_block\\)[^#/!@;\\|]*[#/!@;\\|]+ +DW_AT_abstract_origin 2
gcc.dg/debug/dwarf2/inline5.c: DW_TAG_lexical_block\\)[^#/!@;\\|]*[#/!@;\\|]+
+[^#/!@\\|]*\\(DIE \\(0x[0-9a-f]*\\) DW_TAG_variable found 3 times
FAIL: gcc.dg/debug/dwarf2/inline5.c scan-assembler-times
DW_TAG_lexical_block\\)[^#/!@;\\|]*[#/!@;\\|]+ +[^#/!@\\|]*\\(DIE
\\(0x[0-9a-f]*\\) DW_TAG_variable 1
PASS: gcc.dg/debug/dwarf2/inline5.c scan-assembler-not \\(DIE
\\(0x([0-9a-f]*)\\) DW_TAG_lexical_block\\)[^#/!@;\\|]*[#/!@;\\|]+
+[^(].*DW_TAG_lexical_block\\)[^#/!@;\\|x]*x\\1[^#/!@;\\|]*[#/!@;\\|]
+DW_AT_abstract_origin
PASS: gcc.dg/debug/dwarf2/inline5.c scan-assembler-not
DW_TAG_lexical_block\\)[^#/!@;\\|x]*x([0-9a-f]*)[^#/!@;\\|]*[#/!@;\\|]+
+DW_AT_abstract_origin.*\\(DIE \\(0x\\1\\)
DW_TAG_lexical_block\\)[^#/!@;\\|]*[#/!@;\\|]+ +DW_AT
testcase /home/dave/gnu/gcc/gcc/gcc/testsuite/gcc.dg/debug/dwarf2/dwarf2.exp
completed in 2 seconds

[Bug other/704] --help and --version

2019-02-23 Thread egallager at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=704

Eric Gallager  changed:

   What|Removed |Added

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

--- Comment #21 from Eric Gallager  ---
(In reply to Iain Sandoe from comment #20)
> (In reply to Eric Gallager from comment #19)
> > (In reply to jos...@codesourcery.com from comment #18)
> > > Whether this is fixed may be determined by running all of the programs 
> > > installed in $exec_prefix/bin by current mainline with the --help and 
> > > --version options (and confirming the GCC version number is properly 
> > > shown 
> > > in the --version output).
> > 
> > looks like gcc-nm and gcc-ranlib still fail with --help:
> 
> That's not a fault with the GCC wrappers, it's because the "upstream"
> cctools nm and ranlib don't respond to "--help" (or --version).  I have
> amended versions of them that handle --help and --version (available on
> github***) that work:
> 
> $ ./gcc/gcc-ar --help
> usage:  ar -d [-TLsv] archive file ...
>   ar -m [-TLsv] archive file ...
> 
> 
> $ ./gcc/gcc-ar --version
> xtools-1.1.0 ar
> 
> - the point is that this is not a problem with the GCC wrappers, the
> intention of them is to pass the --help and --version onto the underlying
> commands.
> 
> From the point of view of Darwin, I'd say this could be closed, of course it
> might not be completely clean for other platforms.
> 
> *** Note: the versions published on github are quite old - on the TODO to
> provide some updates.

OK, closing then.

[Bug inline-asm/87010] FAIL: gcc.dg/torture/20180712-1.c -O1 (test for excess errors)

2019-02-23 Thread danglin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87010

John David Anglin  changed:

   What|Removed |Added

  Component|testsuite   |inline-asm

--- Comment #2 from John David Anglin  ---
Given patch, I suspect it should be possible to handle constraints.

[Bug inline-asm/89471] New: FAIL: gcc.dg/pr84941.c (test for excess errors)

2019-02-23 Thread danglin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89471

Bug ID: 89471
   Summary: FAIL: gcc.dg/pr84941.c (test for excess errors)
   Product: gcc
   Version: 9.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: inline-asm
  Assignee: unassigned at gcc dot gnu.org
  Reporter: danglin at gcc dot gnu.org
  Target Milestone: ---
  Host: hppa*-*-* (32-bit)
Target: hppa*-*-* (32-bit)
 Build: hppa*-*-* (32-bit)

spawn -ignore SIGHUP /home/dave/gnu/gcc/objdir/gcc/xgcc
-B/home/dave/gnu/gcc/obj
dir/gcc/ /home/dave/gnu/gcc/gcc/gcc/testsuite/gcc.dg/pr84941.c
-fno-diagnostics-
show-caret -fno-diagnostics-show-line-numbers -fdiagnostics-color=never -O2 -S
-
o pr84941.s
/home/dave/gnu/gcc/gcc/gcc/testsuite/gcc.dg/pr84941.c: In function 'foo':
/home/dave/gnu/gcc/gcc/gcc/testsuite/gcc.dg/pr84941.c:9:3: error: 'asm' operand
has impossible constraints
compiler exited with status 1
FAIL: gcc.dg/pr84941.c (test for excess errors)
Excess errors:
/home/dave/gnu/gcc/gcc/gcc/testsuite/gcc.dg/pr84941.c:9:3: error: 'asm' operand
has impossible constraints

Doesn't fail on hppa64.  Fails on 8.2.1 as well.

[Bug fortran/88117] [9 Regression] ICE in gimplify_var_or_parm_decl, at gimplify.c:2697

2019-02-23 Thread dominiq at lps dot ens.fr
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88117

--- Comment #11 from Dominique d'Humieres  ---
The ICE is now gone, but I get segmentation fault at run time. If I comment the
line

   z = (z)

I get

 ab

Program received signal SIGSEGV: Segmentation fault - invalid memory reference.

Is this expected?

[Bug libstdc++/89464] shared_ptr_base.h: error: '__tag' was not declared in this scope (gcc-8.3.0 regression?)

2019-02-23 Thread gcc at nmacleod dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89464

--- Comment #6 from Milhouse  ---
Andrew, can you tell me what the correct algnas() definition should be, as
everywhere it is used seems to be passing a single argument. This is the usage
in shared_ptr_base.h:

alignas(type_info) static constexpr char __tag[sizeof(type_info)] = { };


Also, if possible can you explain what change in gcc-8.3.0 is triggering this
new behaviour (considering gcc-8.2.0 doesn't complain).

Many thanks in advance!

[Bug testsuite/87010] FAIL: gcc.dg/torture/20180712-1.c -O1 (test for excess errors)

2019-02-23 Thread danglin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87010

--- Comment #1 from John David Anglin  ---
Created attachment 45803
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=45803&action=edit
Patch

Fixes test failure on hppa.

[Bug gcov-profile/89470] New: [GCOV] wrong frequencies when if statement is executed after a complicated "?:"statement

2019-02-23 Thread yangyibiao at nju dot edu.cn
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89470

Bug ID: 89470
   Summary: [GCOV] wrong frequencies when if statement is executed
after a complicated "?:"statement
   Product: gcc
   Version: 8.2.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: gcov-profile
  Assignee: unassigned at gcc dot gnu.org
  Reporter: yangyibiao at nju dot edu.cn
CC: marxin at gcc dot gnu.org
  Target Milestone: ---

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

$ cat small.c
int foo()
{
  int hints = 2, xi = 1, dy = 18481, adx = 0, ady = 18481;
  if (dy != 0 && (adx <= ady >> 4))
  {
hints = dy > 0 ? 2 : 1;
if (xi) {
  hints ^= 3;
}
  }
  else
  {
hints = 0;
  }
  return hints;
}

int main()
{
  foo();
}

$ gcc -O0 --coverage small.c -w; ./a.out; gcov small.c; cat small.c.gcov
File 'small.c'
Lines executed:90.00% of 10
Creating 'small.c.gcov'

-:0:Source:small.c
-:0:Graph:small.gcno
-:0:Data:small.gcda
-:0:Runs:1
-:0:Programs:1
1:1:int foo()
-:2:{
1:3:  int hints = 2, xi = 1, dy = 18481, adx = 0, ady = 18481;
1:4:  if (dy != 0 && (adx <= ady >> 4)) {
   1*:5:hints = dy > 0 ? 2 : 1;
2:6:if (xi) {
1:7:  hints ^= 3;
-:8:}
-:9:  }
-:   10:  else
-:   11:  {
#:   12:hints = 0;
-:   13:  }
1:   14:  return hints;
-:   15:}
-:   16:
1:   17:int main()
-:   18:{
1:   19:  foo();
-:   20:}

Line # 6 is wrongly marked as executed twice which should be only executed
once.

When Line #12 is removed, the result is correst as:
$ gcc -O0 --coverage small.c -w; ./a.out; gcov small.c; cat small.c.gcov
File 'small.c'
Lines executed:100.00% of 9
Creating 'small.c.gcov'

-:0:Source:small.c
-:0:Graph:small.gcno
-:0:Data:small.gcda
-:0:Runs:1
-:0:Programs:1
1:1:int foo()
-:2:{
1:3:  int hints = 2, xi = 1, dy = 18481, adx = 0, ady = 18481;
1:4:  if (dy != 0 && (adx <= ady >> 4)) {
   1*:5:hints = dy > 0 ? 2 : 1;
1:6:if (xi) {
1:7:  hints ^= 3;
-:8:}
-:9:  }
-:   10:  else
-:   11:  {
-:   12:// hints = 0;
-:   13:  }
1:   14:  return hints;
-:   15:}
-:   16:
1:   17:int main()
-:   18:{
1:   19:  foo();
-:   20:}

[Bug fortran/89451] [9 Regression] FAIL: gfortran.dg/pr79315.f90 -O (internal compiler error)

2019-02-23 Thread dominiq at lps dot ens.fr
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89451

Dominique d'Humieres  changed:

   What|Removed |Added

 Status|UNCONFIRMED |WAITING
   Last reconfirmed||2019-02-23
 Ever confirmed|0   |1

--- Comment #6 from Dominique d'Humieres  ---
WORKSFORME on x86_64-apple-darwin18 r269156. It doesn't look as a gfortran bug.

[Bug gcov-profile/89469] New: [GCOV] wrong frequencies for the first statement in the for(;;) block

2019-02-23 Thread yangyibiao at nju dot edu.cn
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89469

Bug ID: 89469
   Summary: [GCOV] wrong frequencies for the first statement in
the for(;;) block
   Product: gcc
   Version: 8.2.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: gcov-profile
  Assignee: unassigned at gcc dot gnu.org
  Reporter: yangyibiao at nju dot edu.cn
CC: marxin at gcc dot gnu.org
  Target Milestone: ---

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

$ cat small.c
int main()
{
  int start = 0, mid = 3, limit = 3, lastMid = 6, r = 0;
  for (;;) {
  mid = (start + limit) / 2;
  if (lastMid == mid) {
break;
  }

  r = mid == 1 ? 1 : 0;

  if (r > 0) {
start = mid;
  } else {
return 1;
  }
  }
  return 0;
}

$ gcc -O0 --coverage small.c -w; ./a.out; gcov small.c; cat small.c.gcov
File 'small.c'
Lines executed:80.00% of 10
Creating 'small.c.gcov'

-:0:Source:small.c
-:0:Graph:small.gcno
-:0:Data:small.gcda
-:0:Runs:1
-:0:Programs:1
1:1:int main()
-:2:{
1:3:  int start = 0, mid = 3, limit = 3, lastMid = 6, r = 0;
-:4:  for (;;) {
1:5:  mid = (start + limit) / 2;
2:6:  if (lastMid == mid) {
#:7:break;
-:8:  }
-:9:
2:   10:  r = mid == 1 ? 1 : 0;
-:   11:
2:   12:  if (r > 0) {
1:   13:start = mid;
-:   14:  } else {
1:   15:return 1;
-:   16:  }
-:   17:  }
#:   18:  return 0;
-:   19:}

Line #5 is wrongly marked as executed once which should be executed twice. 

When Line #7 is removed, the result is correct as:
$ gcc -O0 --coverage small.c -w; ./a.out; gcov small.c; cat small.c.gcov
File 'small.c'
Lines executed:100.00% of 7
Creating 'small.c.gcov'

-:0:Source:small.c
-:0:Graph:small.gcno
-:0:Data:small.gcda
-:0:Runs:1
-:0:Programs:1
1:1:int main()
-:2:{
1:3:  int start = 0, mid = 3, limit = 3, lastMid = 6, r = 0;
-:4:  for (;;) {
2:5:  mid = (start + limit) / 2;
-:6:  if (lastMid == mid) {
-:7:// break;
-:8:  }
-:9:
2:   10:  r = mid == 1 ? 1 : 0;
-:   11:
2:   12:  if (r > 0) {
1:   13:start = mid;
-:   14:  } else {
1:   15:return 1;
-:   16:  }
-:   17:  }
-:   18:  return 0;
-:   19:}

[Bug fortran/88117] [9 Regression] ICE in gimplify_var_or_parm_decl, at gimplify.c:2697

2019-02-23 Thread pault at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88117

--- Comment #10 from Paul Thomas  ---
Author: pault
Date: Sat Feb 23 14:59:50 2019
New Revision: 269160

URL: https://gcc.gnu.org/viewcvs?rev=269160&root=gcc&view=rev
Log:
2019-02-23  Paul Thomas  

Backport from trunk
PR fortran/88117
* resolve.c (deferred_op_assign): Return if the lhs expression
has the pointer attribute.

2019-02-23  Paul Thomas  

Backport from trunk
PR fortran/88117
* gfortran.dg/deferred_character_32.f90 : New test

Added:
branches/gcc-8-branch/gcc/testsuite/gfortran.dg/deferred_character_32.f90
Modified:
branches/gcc-8-branch/gcc/fortran/ChangeLog
branches/gcc-8-branch/gcc/fortran/resolve.c
branches/gcc-8-branch/gcc/testsuite/ChangeLog

[Bug c++/89419] [8/9 Regression] ICE in is_normal_capture_proxy starting with r253601

2019-02-23 Thread mpolacek at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89419

Marek Polacek  changed:

   What|Removed |Added

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

--- Comment #4 from Marek Polacek  ---
Done.  PR88394 is still open, so the fix will be backported to 8.

[Bug c++/89419] [8/9 Regression] ICE in is_normal_capture_proxy starting with r253601

2019-02-23 Thread mpolacek at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89419

--- Comment #3 from Marek Polacek  ---
Author: mpolacek
Date: Sat Feb 23 14:54:23 2019
New Revision: 269159

URL: https://gcc.gnu.org/viewcvs?rev=269159&root=gcc&view=rev
Log:
PR c++/89419
* g++.dg/cpp1y/lambda-generic-89419.C: New test.

Added:
trunk/gcc/testsuite/g++.dg/cpp1y/lambda-generic-89419.C
Modified:
trunk/gcc/testsuite/ChangeLog

[Bug c++/89419] [8/9 Regression] ICE in is_normal_capture_proxy starting with r253601

2019-02-23 Thread mpolacek at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89419

Marek Polacek  changed:

   What|Removed |Added

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

--- Comment #2 from Marek Polacek  ---
Fixed by r269094 -- PR88394.  Will add the test to trunk.

[Bug gcov-profile/89468] New: [GCOV] wrong frequencies when the block is empty in a if statement

2019-02-23 Thread yangyibiao at nju dot edu.cn
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89468

Bug ID: 89468
   Summary: [GCOV] wrong frequencies when the block is empty in a
if statement
   Product: gcc
   Version: 8.2.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: gcov-profile
  Assignee: unassigned at gcc dot gnu.org
  Reporter: yangyibiao at nju dot edu.cn
CC: marxin at gcc dot gnu.org
  Target Milestone: ---

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

$ cat small.c
int main()
{
  int ret = 0;
  int a[2] = {1955, -1957};
  for (int i = 0; i < 2; ++i)
  {
if (i % 2 == 1 && a[i] != -2 * i - 1955) {
  ret = 1;
}
else if (i % 2 == 0 && a[i] != 1955 + 2 * i) {
  // ret = 2;
}
  }
  return ret;
}

$ gcc -O0 --coverage small.c -w; ./a.out; gcov small.c; cat small.c.gcov
File 'small.c'
Lines executed:87.50% of 8
Creating 'small.c.gcov'

-:0:Source:small.c
-:0:Graph:small.gcno
-:0:Data:small.gcda
-:0:Runs:1
-:0:Programs:1
1:1:int main()
-:2:{
1:3:  int ret = 0;
1:4:  int a[2] = {1955, -1957};
3:5:  for (int i = 0; i < 2; ++i)
-:6:  {
2:7:if (i % 2 == 1 && a[i] != -2 * i - 1955) {
#:8:  ret = 1;
-:9:}
   1*:   10:else if (i % 2 == 0 && a[i] != 1955 + 2 * i) {
-:   11:  // ret = 2;
-:   12:}
-:   13:  }
1:   14:  return ret;
-:   15:}

Line #10 should be also executed twice as Line #7.

When Line #11 is not removed, the result is correct as:
$ gcc -O0 --coverage small.c -w; ./a.out; gcov small.c; cat small.c.gcov
File 'small.c'
Lines executed:77.78% of 9
Creating 'small.c.gcov'

-:0:Source:small.c
-:0:Graph:small.gcno
-:0:Data:small.gcda
-:0:Runs:1
-:0:Programs:1
1:1:int main()
-:2:{
1:3:  int ret = 0;
1:4:  int a[2] = {1955, -1957};
3:5:  for (int i = 0; i < 2; ++i)
-:6:  {
2:7:if (i % 2 == 1 && a[i] != -2 * i - 1955) {
#:8:  ret = 1;
-:9:}
2:   10:else if (i % 2 == 0 && a[i] != 1955 + 2 * i) {
#:   11:  ret = 2;
-:   12:}
-:   13:  }
1:   14:  return ret;
-:   15:}

[Bug c++/88294] [9 Regression] ICE on (invalid) C++11 code: in tsubst_copy, at cp/pt.c:15391

2019-02-23 Thread mpolacek at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88294

Marek Polacek  changed:

   What|Removed |Added

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

--- Comment #8 from Marek Polacek  ---
Fixed.

[Bug c++/88294] [9 Regression] ICE on (invalid) C++11 code: in tsubst_copy, at cp/pt.c:15391

2019-02-23 Thread mpolacek at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88294

--- Comment #7 from Marek Polacek  ---
Author: mpolacek
Date: Sat Feb 23 14:05:31 2019
New Revision: 269158

URL: https://gcc.gnu.org/viewcvs?rev=269158&root=gcc&view=rev
Log:
PR c++/88294 - ICE with non-constant noexcept-specifier.
* pt.c (maybe_instantiate_noexcept): Set up the list of local
specializations.  Set current_class_{ptr,ref}.

* g++.dg/cpp0x/noexcept34.C: New test.
* g++.dg/cpp0x/noexcept35.C: New test.

Added:
trunk/gcc/testsuite/g++.dg/cpp0x/noexcept34.C
trunk/gcc/testsuite/g++.dg/cpp0x/noexcept35.C
Modified:
trunk/gcc/cp/ChangeLog
trunk/gcc/cp/pt.c
trunk/gcc/testsuite/ChangeLog

[Bug fortran/88117] [9 Regression] ICE in gimplify_var_or_parm_decl, at gimplify.c:2697

2019-02-23 Thread pault at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88117

--- Comment #9 from Paul Thomas  ---
(In reply to Paul Thomas from comment #8)
> Author: pault
> Date: Sat Feb 23 13:18:47 2019
> New Revision: 269157
> 
> URL: https://gcc.gnu.org/viewcvs?rev=269157&root=gcc&view=rev
> Log:
> 2019-02-23  Paul Thomas  
> 
>   PR fortran/88117
>   * resolve.c (deferred_op_assign): Return if the lhs expression
>   has the pointer attribute.
>   * trans-expr.c (gfc_trans_assignment_1): Do not fix the string
>   length if the lhs expression has the pointer attribute.
> 
> 2019-02-23  Paul Thomas  
> 
>   PR fortran/88117
>   * gfortran.dg/deferred_character_32.f90 : New test
> 
> Added:
> trunk/gcc/testsuite/gfortran.dg/deferred_character_32.f90
> Modified:
> trunk/gcc/fortran/ChangeLog
> trunk/gcc/fortran/resolve.c
> trunk/gcc/fortran/trans-expr.c
> trunk/gcc/testsuite/ChangeLog

I committed as 'obvious' to trunk. The testcase does not produce correct code
on 8- or 7-branches. The part of the patch in resolve.c fixes this and so I
intend to backport since it is obvious that extra temporary creation should not
be necessary here; pointers being the same as non-allocatable/non-pointer lhs's
in this context.

Please note, that the testcase works fine on trunk if 'z' is made allocatable.

Paul

[Bug fortran/88117] [9 Regression] ICE in gimplify_var_or_parm_decl, at gimplify.c:2697

2019-02-23 Thread pault at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88117

--- Comment #8 from Paul Thomas  ---
Author: pault
Date: Sat Feb 23 13:18:47 2019
New Revision: 269157

URL: https://gcc.gnu.org/viewcvs?rev=269157&root=gcc&view=rev
Log:
2019-02-23  Paul Thomas  

PR fortran/88117
* resolve.c (deferred_op_assign): Return if the lhs expression
has the pointer attribute.
* trans-expr.c (gfc_trans_assignment_1): Do not fix the string
length if the lhs expression has the pointer attribute.

2019-02-23  Paul Thomas  

PR fortran/88117
* gfortran.dg/deferred_character_32.f90 : New test

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

[Bug fortran/61765] [7/8/9 Regression] [F03] Rejects valid BIND(C) ENTRY

2019-02-23 Thread dominiq at lps dot ens.fr
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61765

--- Comment #9 from Dominique d'Humieres  ---
For the record, after revision r267902 the test in pr34500 comment 0 gives an
ICE instead of a wrong error (see pr34500 comment 6).

[Bug gcov-profile/89467] New: [GCOV] wrong freqencies when there is comparison operator in the right side of the assignment statement

2019-02-23 Thread yangyibiao at nju dot edu.cn
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89467

Bug ID: 89467
   Summary: [GCOV] wrong freqencies when there is comparison
operator in the right side of the assignment statement
   Product: gcc
   Version: 8.2.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: gcov-profile
  Assignee: unassigned at gcc dot gnu.org
  Reporter: yangyibiao at nju dot edu.cn
CC: marxin at gcc dot gnu.org
  Target Milestone: ---

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

$ cat small.c
void foo(int p)
{
  int e;
  int b = 0, f = 0, d = 0;
  if ((p < f) && p) {
L:
for (e = 0; 0;) ;
  } else if (d) {
b = (0 >= b);
  }

  for (; e <= 3; e++) {
if (b) { continue; }
b = 3;
goto L;
  }
}

void main()
{
  int a = -1;
  foo(a);
}

$ gcc -O0 --coverage small.c -w; ./a.out; gcov small.c; cat small.c.gcov
File 'small.c'
Lines executed:87.50% of 16
Creating 'small.c.gcov'

-:0:Source:small.c
-:0:Graph:small.gcno
-:0:Data:small.gcda
-:0:Runs:1
-:0:Programs:1
1:1:void foo(int p)
-:2:{
-:3:  int e;
1:4:  int b = 0, f = 0, d = 0;
3:5:  if ((p < f) && p) {
1:6:L:
2:7:for (e = 0; 0;) ;
#:8:  } else if (d) {
#:9:b = (0 >= b);
-:   10:  }
-:   11:
6:   12:  for (; e <= 3; e++) {
5:   13:if (b) { continue; }
1:   14:b = 3;
1:   15:goto L;
-:   16:  }
1:   17:}
-:   18:
1:   19:void main()
-:   20:{
1:   21:  int a = -1;
1:   22:  foo(a);
1:   23:}

Line #5 is wrongly marked as executed 3 times which should be only executed
once. 

When Line #9 is removed, the coverage report will be correct as:

$ gcc -O0 --coverage small.c -w; ./a.out; gcov small.c; cat small.c.gcov
File 'small.c'
Lines executed:100.00% of 14
Creating 'small.c.gcov'

-:0:Source:small.c
-:0:Graph:small.gcno
-:0:Data:small.gcda
-:0:Runs:1
-:0:Programs:1
1:1:void foo(int p)
-:2:{
-:3:  int e;
1:4:  int b = 0, f = 0, d = 0;
1:5:  if ((p < f) && p) {
1:6:L:
2:7:for (e = 0; 0;) ;
-:8:  } else if (d) {
-:9:// b = (0 >= b);
-:   10:  }
-:   11:
6:   12:  for (; e <= 3; e++) {
5:   13:if (b) { continue; }
1:   14:b = 3;
1:   15:goto L;
-:   16:  }
1:   17:}
-:   18:
1:   19:void main()
-:   20:{
1:   21:  int a = -1;
1:   22:  foo(a);
1:   23:}

[Bug tree-optimization/88835] overly aggressive -Werror=format-overflow for printf since r265648

2019-02-23 Thread mark at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88835

--- Comment #17 from Mark Wielaard  ---
(In reply to Martin Sebor from comment #16)
> The warning has been relaxed for GCC 9 in r269125.

Thanks, I can confirm elfutils builds fine without warnings with GCC 9 now.

[Bug libstdc++/89466] [7/8/9 Regression] Accessing the Internet while boostrapping

2019-02-23 Thread tkoenig at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89466

Thomas Koenig  changed:

   What|Removed |Added

 CC||bkoz at gcc dot gnu.org
   Target Milestone|--- |7.5
Summary|Accessing the Internet  |[7/8/9 Regression]
   |while boostrapping  |Accessing the Internet
   ||while boostrapping

--- Comment #1 from Thomas Koenig  ---
This appears to have been introduced in r170763.

[Bug libstdc++/89466] New: Accessing the Internet while boostrapping

2019-02-23 Thread tkoenig at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89466

Bug ID: 89466
   Summary: Accessing the Internet while boostrapping
   Product: gcc
   Version: unknown
Status: UNCONFIRMED
  Severity: blocker
  Priority: P3
 Component: libstdc++
  Assignee: unassigned at gcc dot gnu.org
  Reporter: tkoenig at gcc dot gnu.org
  Target Milestone: ---

I finally got around to checking what was holding up the bootstrap
process for so long while the message

"checking for docbook stylesheets for documentation creation"

was displayed.  Apparently, the configure script downloads something
from the Internet using

xsltproc --noout --nonet --xinclude
http://docbook.sourceforge.net/release/xsl-ns/current/xhtml-1_1/docbook.xsl

Now, this has several problems.

First, connecting to somehwere external should be under the user's control, no
software package should be doing so during compilation by default.  There is
such a thing as data privacy.

If a source file is needed during compilation, include it in the first place.

Second, this takes far too much time.

Third, this is run repeatedly in several states during bootstrapping.

As to why I mark this a "blocker": This is a serious obstacle to my further
contribution to gcc.

[Bug fortran/89385] Incorrect members of C descriptor for an allocatable object

2019-02-23 Thread pault at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89385

Paul Thomas  changed:

   What|Removed |Added

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

--- Comment #5 from Paul Thomas  ---
Many thanks for the report.

Paul

[Bug gcov-profile/89465] New: [GCOV] Wrong coverage with setjmp and longjmp function

2019-02-23 Thread yangyibiao at nju dot edu.cn
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89465

Bug ID: 89465
   Summary: [GCOV] Wrong coverage with setjmp and longjmp function
   Product: gcc
   Version: 8.2.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: gcov-profile
  Assignee: unassigned at gcc dot gnu.org
  Reporter: yangyibiao at nju dot edu.cn
CC: marxin at gcc dot gnu.org
  Target Milestone: ---

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

$ cat small.c
long jmp_buf[5];

void baz(void) { __builtin_longjmp(&jmp_buf, 1); }

int main()
{
  int a = 0;
  if (__builtin_setjmp(&jmp_buf) == 0) {
while (1) {
  a = 1;
  baz();
}
  }
  return a;
}

$ gcc -O0 --coverage small.c -w; ./a.out; gcov small.c; cat small.c.gcov
File 'small.c'
Lines executed:85.71% of 7
Creating 'small.c.gcov'

-:0:Source:small.c
-:0:Graph:small.gcno
-:0:Data:small.gcda
-:0:Runs:1
-:0:Programs:1
-:1:long jmp_buf[5];
-:2:
1:3:void baz(void) { __builtin_longjmp(&jmp_buf, 1); }
-:4:
1:5:int main()
-:6:{
1:7:  int a = 0;
2:8:  if (__builtin_setjmp(&jmp_buf) == 0) {
-:9:while (1) {
#:   10:  a = 1;
1:   11:  baz();
-:   12:}
-:   13:  }
1:   14:  return a;
-:   15:}


Line #10 is wrongly marked as not executed. I am not sure whether this bug has
been fixed in the gcc 8.3.X or gcc 9.0 versions.

[Bug fortran/89366] Fails to compile BIND(C) interface with assumed-length character argument

2019-02-23 Thread pault at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89366

Paul Thomas  changed:

   What|Removed |Added

 Status|WAITING |RESOLVED
 CC||pault at gcc dot gnu.org
 Resolution|--- |FIXED

--- Comment #8 from Paul Thomas  ---
Many thanks for the report.

Paul

[Bug fortran/89385] Incorrect members of C descriptor for an allocatable object

2019-02-23 Thread pault at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89385

--- Comment #4 from Paul Thomas  ---
Author: pault
Date: Sat Feb 23 12:18:44 2019
New Revision: 269156

URL: https://gcc.gnu.org/viewcvs?rev=269156&root=gcc&view=rev
Log:
2019-02-23  Paul Thomas  

PR fortran/89385
PR fortran/89366
* decl.c (gfc_verify_c_interop_param): Restriction on string
length being one is lifted for F2018.
* trans-expr.c (gfc_conv_gfc_desc_to_cfi_desc): For scalar
characters with intent in, make a temporary and copy the result
of the expression evaluation into it.
(gfc_conv_procedure_call): Set a flag for character formal args
having a character length that is not unity. If the procedure
is bind C, call gfc_conv_gfc_desc_to_cfi_desc in this case.
Also, extend bind C calls to unconditionally convert both
pointers and allocatable expressions.

2019-02-23  Paul Thomas  

PR fortran/89385
* gfortran.dg/ISO_Fortran_binding_1.f90 : Correct test for
previously incorrect lbound for allocatable expressions. Also
correct stop values to avoid repetition.
* gfortran.dg/ISO_Fortran_binding_5.f90 : New test
* gfortran.dg/ISO_Fortran_binding_5.c : Support previous test.

PR fortran/89366
* gfortran.dg/ISO_Fortran_binding_6.f90 : New test
* gfortran.dg/ISO_Fortran_binding_6.c : Support previous test.
* gfortran.dg/pr32599.f03 : Set standard to F2008.

2019-02-23  Paul Thomas  

PR fortran/89385
PR fortran/89366
* runtime/ISO_Fortran_binding.c (cfi_desc_to_gfc_desc) : In the
interchange between character and derived, the character type
was being set incorrectly.
(gfc_desc_to_cfi_desc) : Eliminate the interchange of types in
this function. Do not add the kind and length information to
the type field of structures. Lbounds were incorrectly being
set to zero for allocatable and pointer descriptors. Should
have been non-pointer, non-allocatables that received this
treatment.


Added:
trunk/gcc/testsuite/gfortran.dg/ISO_Fortran_binding_5.c
trunk/gcc/testsuite/gfortran.dg/ISO_Fortran_binding_5.f90
trunk/gcc/testsuite/gfortran.dg/ISO_Fortran_binding_6.c
trunk/gcc/testsuite/gfortran.dg/ISO_Fortran_binding_6.f90
Modified:
trunk/gcc/fortran/ChangeLog
trunk/gcc/fortran/decl.c
trunk/gcc/fortran/trans-expr.c
trunk/gcc/testsuite/ChangeLog
trunk/gcc/testsuite/gfortran.dg/ISO_Fortran_binding_1.f90
trunk/gcc/testsuite/gfortran.dg/pr32599.f03
trunk/libgfortran/ChangeLog
trunk/libgfortran/runtime/ISO_Fortran_binding.c

[Bug fortran/89366] Fails to compile BIND(C) interface with assumed-length character argument

2019-02-23 Thread pault at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89366

--- Comment #7 from Paul Thomas  ---
Author: pault
Date: Sat Feb 23 12:18:44 2019
New Revision: 269156

URL: https://gcc.gnu.org/viewcvs?rev=269156&root=gcc&view=rev
Log:
2019-02-23  Paul Thomas  

PR fortran/89385
PR fortran/89366
* decl.c (gfc_verify_c_interop_param): Restriction on string
length being one is lifted for F2018.
* trans-expr.c (gfc_conv_gfc_desc_to_cfi_desc): For scalar
characters with intent in, make a temporary and copy the result
of the expression evaluation into it.
(gfc_conv_procedure_call): Set a flag for character formal args
having a character length that is not unity. If the procedure
is bind C, call gfc_conv_gfc_desc_to_cfi_desc in this case.
Also, extend bind C calls to unconditionally convert both
pointers and allocatable expressions.

2019-02-23  Paul Thomas  

PR fortran/89385
* gfortran.dg/ISO_Fortran_binding_1.f90 : Correct test for
previously incorrect lbound for allocatable expressions. Also
correct stop values to avoid repetition.
* gfortran.dg/ISO_Fortran_binding_5.f90 : New test
* gfortran.dg/ISO_Fortran_binding_5.c : Support previous test.

PR fortran/89366
* gfortran.dg/ISO_Fortran_binding_6.f90 : New test
* gfortran.dg/ISO_Fortran_binding_6.c : Support previous test.
* gfortran.dg/pr32599.f03 : Set standard to F2008.

2019-02-23  Paul Thomas  

PR fortran/89385
PR fortran/89366
* runtime/ISO_Fortran_binding.c (cfi_desc_to_gfc_desc) : In the
interchange between character and derived, the character type
was being set incorrectly.
(gfc_desc_to_cfi_desc) : Eliminate the interchange of types in
this function. Do not add the kind and length information to
the type field of structures. Lbounds were incorrectly being
set to zero for allocatable and pointer descriptors. Should
have been non-pointer, non-allocatables that received this
treatment.


Added:
trunk/gcc/testsuite/gfortran.dg/ISO_Fortran_binding_5.c
trunk/gcc/testsuite/gfortran.dg/ISO_Fortran_binding_5.f90
trunk/gcc/testsuite/gfortran.dg/ISO_Fortran_binding_6.c
trunk/gcc/testsuite/gfortran.dg/ISO_Fortran_binding_6.f90
Modified:
trunk/gcc/fortran/ChangeLog
trunk/gcc/fortran/decl.c
trunk/gcc/fortran/trans-expr.c
trunk/gcc/testsuite/ChangeLog
trunk/gcc/testsuite/gfortran.dg/ISO_Fortran_binding_1.f90
trunk/gcc/testsuite/gfortran.dg/pr32599.f03
trunk/libgfortran/ChangeLog
trunk/libgfortran/runtime/ISO_Fortran_binding.c

[Bug fortran/71066] [7 Regression] ICE in set_loop_bounds, at fortran/trans-array.c:4680

2019-02-23 Thread tkoenig at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71066

Thomas Koenig  changed:

   What|Removed |Added

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

--- Comment #18 from Thomas Koenig  ---
Fixed on all open branches, closing.

[Bug fortran/71066] [7 Regression] ICE in set_loop_bounds, at fortran/trans-array.c:4680

2019-02-23 Thread tkoenig at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71066

--- Comment #17 from Thomas Koenig  ---
Author: tkoenig
Date: Sat Feb 23 11:49:47 2019
New Revision: 269155

URL: https://gcc.gnu.org/viewcvs?rev=269155&root=gcc&view=rev
Log:
2019-02-23  Thomas Koenig  

PR fortran/71066
Backport from trunk
* trans-decl.c (generate_coarray_sym_init):  For an array
constructor in a DATA statement of a coarray variable, set the
rank to 1 to avoid confusion later on.  If the constructor
contains only one value, use that for initiailizig.

2019-02-23  Thomas Koenig  

PR fortran/71066
Backport from trunk
* gfortran.dg/coarray_data_1.f90: New test.


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

[Bug ada/89349] segfault when building GCC 7 & 8 branch with GCC master

2019-02-23 Thread ebotcazou at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89349

Eric Botcazou  changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
Version|9.0 |7.4.1
 Resolution|--- |FIXED
   Target Milestone|--- |7.5
Summary|segfault when building GCC  |segfault when building GCC
   |8 branch with GCC master|7 & 8 branch with GCC
   ||master

--- Comment #16 from Eric Botcazou  ---
.

[Bug ada/89349] segfault when building GCC 8 branch with GCC master

2019-02-23 Thread ebotcazou at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89349

--- Comment #15 from Eric Botcazou  ---
Author: ebotcazou
Date: Sat Feb 23 10:04:41 2019
New Revision: 269154

URL: https://gcc.gnu.org/viewcvs?rev=269154&root=gcc&view=rev
Log:
PR ada/89349
Backport from mainline
2018-05-25  Arnaud Charlet  

* osint.ads (Unknown_Attributes): No longer pretend this is a constant.
(No_File_Info_Cache): Initialize separately.
* osint.adb (No_File_Info_Cache): Update initializer.

Modified:
branches/gcc-7-branch/gcc/ada/ChangeLog
branches/gcc-7-branch/gcc/ada/osint.adb
branches/gcc-7-branch/gcc/ada/osint.ads

[Bug ada/89349] segfault when building GCC 8 branch with GCC master

2019-02-23 Thread ebotcazou at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89349

--- Comment #14 from Eric Botcazou  ---
Author: ebotcazou
Date: Sat Feb 23 10:04:23 2019
New Revision: 269153

URL: https://gcc.gnu.org/viewcvs?rev=269153&root=gcc&view=rev
Log:
PR ada/89349
Backport from mainline
2018-05-25  Arnaud Charlet  

* osint.ads (Unknown_Attributes): No longer pretend this is a constant.
(No_File_Info_Cache): Initialize separately.
* osint.adb (No_File_Info_Cache): Update initializer.

Modified:
branches/gcc-8-branch/gcc/ada/ChangeLog
branches/gcc-8-branch/gcc/ada/osint.adb
branches/gcc-8-branch/gcc/ada/osint.ads

[Bug c/89448] Failure to generate diagnostic for "complex int" (OK for "_Complex int")

2019-02-23 Thread mrison at hotmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89448

--- Comment #2 from Mark RISON  ---
(In reply to Richard Biener from comment #1)
> Because 'complex' is from a system header probably ...
It still ought to give a diagnostic, no?

[Bug libstdc++/89464] shared_ptr_base.h: error: '__tag' was not declared in this scope (gcc-8.3.0 regression?)

2019-02-23 Thread gcc at nmacleod dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89464

--- Comment #5 from Milhouse  ---
Thanks very much for digging into this so quickly and identifying the cause,
I'll feed it back to the add-on author.

  1   2   >