[Bug gcov-profile/97834] New: gcov-instrumented binaries are very slow due to unbuffered IO

2020-11-14 Thread roland.illig at gmx dot de via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97834

Bug ID: 97834
   Summary: gcov-instrumented binaries are very slow due to
unbuffered IO
   Product: gcc
   Version: 10.1.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: gcov-profile
  Assignee: unassigned at gcc dot gnu.org
  Reporter: roland.illig at gmx dot de
CC: marxin at gcc dot gnu.org
  Target Milestone: ---

Since 2003-05-14, gcov_open calls setbuf (gcov_var.file, (char *)0), thereby
slowing down the instrumentation a lot.

https://github.com/gcc-mirror/gcc/commit/7d63a2fae019a83772ebae65689f4113a0eb4bec

For example, running the 343 unit tests in NetBSD/src/usr.bin/make takes about
14 minutes when running in unbuffered mode, and 30 seconds in buffered mode.

The commit itself does not mention why the unbuffered IO is needed.

I manually patched the instrumented binary by commenting out the call to
setbuf, and the results are still the same.

Please consider removing that call to setbuf.

[Bug c/97833] New: -Wconversion behaves erratic

2020-11-14 Thread sven.koehler at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97833

Bug ID: 97833
   Summary: -Wconversion behaves erratic
   Product: gcc
   Version: 10.2.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c
  Assignee: unassigned at gcc dot gnu.org
  Reporter: sven.koehler at gmail dot com
  Target Milestone: ---

Created attachment 49559
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=49559=edit
non-working example

Find attached an example for which -Wconversion behaves uncomprehensible.

Why does it yields warning for test2 but not for test1 and test3?
This happens with gcc for 32bit arm and gcc for x86_64.

In all 3 functions, we have 2 shift operations. The operand is uint16_t, which
is promoted to int. The result of the shift operations is cast to uint16_t. So
the operands of the bit-wise or are again uint16_t. So both operands of the
bitwise or are promoted to int.

So basically, in all 3 cases the code is returning an int. However, -W
conversion warns only in 1 case.

Also, why does it matter whether x is shifted by 0 or 1 ? Why does a shift by 0
result in an error, and a shift by 1 does not?

Why does it matter whether x and y are originally uint8_t being cast to
uint16_t (test2) or a uint16_t (test3) originally? In both cases, the result of
the shifts is cast to uint16_t.


Is gcc trying to keep track of the range of the individual expressions? Is gcc
somehow failing when the a shift by 0 occurs? I believe that a shift by zero is
defined behavior.

[Bug c++/88115] Incorrect result from alignof in templates, if also using __alignof__.

2020-11-14 Thread foom at fuhm dot net via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88115

--- Comment #6 from James Y Knight  ---
> c++: Change the mangling of __alignof__ [PR88115]

The new mangling chosen for __alignof__(type) seems problematic, and I think
this commit ought to be reverted until a new mangling scheme has been chosen.

At the very least, both __alignof__(expression) and __alignof__(type) can't
both be encoded as "v111__alignof__", with no indication of whether the
argument is a type or an expression, because that's ambiguous.

Possibly it'd be okay to use v112__alignof__z and v112__alignof__t, similar to
how "az" and "at" are used for standard alignof expression/type. That solves
the ambiguity. But -- this violates the generic grammar, which doesn't allow
for a vendor operator to take type arguments at all.
   ::= v  
   ::=  

Now...possibly it's okay to violate that and pass a type, regardless. But, then
the demangler needs to know what every vendor extension operator's semantics
are in order to demangle -- which seems against the intent of the standardized
"vendor operator" syntax. So, that's not great.

This seems like a problem which may be worth solving properly and generally in
the itanium ABI -- maybe now's the time to actually do this? (Fixing this would
allow __typeof__, __builtin_convertvector, and __builtin_offsetof to be
mangleable too...) See also PR13740 and PR11078, for earlier (MUCH earlier!)
discussion of possible mangling syntax extensions for this sort of thing.
Unfortunately, it never went anywhere...

ISTM that the most promising proposal in those earlier threads was to add a "Y"
to both type and expression expansions.

To support vendor-specific builtins which returns a type, and can take types or
expressions as arguments (e.g. typeof), add:
   ::= Y  + E

To support vendor-specific builtins which return a value, and can take types or
expressions as arguments (e.g. __builtin_offsetof, or __alignof__):
   ::= Y  + E

[Bug c++/97712] Attribute nodiscard in virtual methods is ignored

2020-11-14 Thread pacoarjonilla at yahoo dot es via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97712

--- Comment #4 from Paco Arjonilla  ---
(In reply to Jakub Jelinek from comment #3)
> [[nodiscard]] is a function attribute rather than function type attribute,
> so it really doesn't apply to virtual calls (unless it can be devirtualized
> early).

Is it a bug in GCC or in the C++ standard?

[Bug c++/96299] Defaulted operator <=> implicitly deleted when a member has operator < and operator == and return type is specified

2020-11-14 Thread gcc-bugzilla at mysko dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96299

henrik  changed:

   What|Removed |Added

 CC||gcc-bugzilla at mysko dot org

--- Comment #2 from henrik  ---
I suggest that support for P1186R3 should not be advertised as available in GCC
at https://gcc.gnu.org/projects/cxx-status.html until this bug is resolved. 

The status page is a bit misleading since no example of the P1186R3 paper works
(as far as I know).

[Bug tree-optimization/97595] [11 Regression] bogus -Wstringop-overflow due to DECL_SIZE_UNIT underreporting field size

2020-11-14 Thread msebor at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97595

--- Comment #4 from Martin Sebor  ---
Here's a small test case that causes a bogus false positive with patched GCC
(https://gcc.gnu.org/pipermail/gcc-patches/2020-November/558775.html).

$ cat t.C && gcc -O2 -S -Wall t.C
struct A  { char a[32]; };
struct B: virtual A { };
struct C: B { };

struct D 
{
  B 
  D (B&);
};

D::D (B ): b (b) { }

void f (void*);

void g ()
{
  C c;
  D d (c);
  f ();
}
In constructor ‘D::D(B&)’,
inlined from ‘void g()’ at t.C:18:9:
t.C:11:14: warning: subscript 0 is outside array bounds of ‘B’ [-Warray-bounds]
   11 | D::D (B ): b (b) { }
  |  ^
t.C: In function ‘void g()’:
t.C:3:8: note: source object ‘C::’ of size 8
3 | struct C: B { };
  |^

[Bug libfortran/48958] Add runtime diagnostics for SIZE intrinsic function

2020-11-14 Thread anlauf at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=48958

anlauf at gcc dot gnu.org changed:

   What|Removed |Added

 CC||anlauf at gcc dot gnu.org

--- Comment #5 from anlauf at gcc dot gnu.org ---
Incomplete patch:
https://gcc.gnu.org/pipermail/fortran/2020-November/055300.html

[Bug c/97831] Lack of disable_tail_calls attribute

2020-11-14 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97831

--- Comment #3 from Andrew Pinski  ---
(In reply to Andrew Pinski from comment #2)
And see https://gcc.gnu.org/legacy-ml/gcc-patches/2017-07/msg00130.html

[Bug c/97831] Lack of disable_tail_calls attribute

2020-11-14 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97831

--- Comment #2 from Andrew Pinski  ---
I think this was rejected 3 years ago:
https://gcc.gnu.org/legacy-ml/gcc-patches/2017-05/msg02221.html

[Bug c/97831] Lack of disable_tail_calls attribute

2020-11-14 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97831

--- Comment #1 from Andrew Pinski  ---
I can think of a simple way disabling tail calls:

static void disabletailcallfunc(void*) __attribute__((noipa));
static void disabletailcallfunc(void *x){}
#define disabletailcall() do {int a; disabletailcallfunc();}while(0);

int functionwhichIwantToDisableTailCallFrom(...)
{
disabletailcall();

}

The overhead for this extra variable and call is small in terms of things.

[Bug target/97832] New: AoSoA complex caxpy-like loops: AVX2+FMA -Ofast 7 times slower than -O3

2020-11-14 Thread already5chosen at yahoo dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97832

Bug ID: 97832
   Summary: AoSoA complex caxpy-like loops: AVX2+FMA -Ofast 7
times slower than -O3
   Product: gcc
   Version: 10.2.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: target
  Assignee: unassigned at gcc dot gnu.org
  Reporter: already5chosen at yahoo dot com
  Target Milestone: ---

I am reporting under 'target' because AVX2+FMA is the only 256-bit SIMD
platform I have to play with. If it's really tree-optomization, please change.

void foo(double* restrict y, const double* restrict x0, const double* restrict
x1, int clen)
{
  int xi = clen & 2;
  double f00_re = x0[0+xi+0];
  double f10_re = x1[0+xi+0];
  double f01_re = x0[0+xi+1];
  double f11_re = x1[0+xi+1];
  double f00_im = x0[4+xi+0];
  double f10_im = x1[4+xi+0];
  double f01_im = x0[4+xi+1];
  double f11_im = x1[4+xi+1];
  int clen2 = (clen+xi) * 2;
  double* y0 = [0];
  double* y1 = [clen2];
  #pragma GCC unroll 0
  for (int c = 0; c < clen2; c += 8) {
// y0[c] = y0[c] - x0[c]*conj(f00) - x1[c]*conj(f10);
// y1[c] = y1[c] - x0[c]*conj(f01) - x1[c]*conj(f11);
#pragma GCC unroll 4
for (int k = 0; k < 4; ++k) {
  double x0_re = x0[c+0+k];
  double x0_im = x0[c+4+k];
  double y0_re = y0[c+0+k];
  double y0_im = y0[c+4+k];
  double y1_re = y1[c+0+k];
  double y1_im = y1[c+4+k];
  y0_re = y0_re - x0_re * f00_re - x0_im * f00_im;
  y0_im = y0_im + x0_re * f00_im - x0_im * f00_re;
  y1_re = y1_re - x0_re * f01_re - x0_im * f01_im;
  y1_im = y1_im + x0_re * f01_im - x0_im * f01_re;
  double x1_re = x1[c+0+k];
  double x1_im = x1[c+4+k];
  y0_re = y0_re - x1_re * f10_re - x1_im * f10_im;
  y0_im = y0_im + x1_re * f10_im - x1_im * f10_re;
  y1_re = y1_re - x1_re * f11_re - x1_im * f11_im;
  y1_im = y1_im + x1_re * f11_im - x1_im * f11_re;
  y0[c+0+k] = y0_re;
  y0[c+4+k] = y0_im;
  y1[c+0+k] = y1_re;
  y1[c+4+k] = y1_im;
}
  }
}

When compiled with 'gcc.10.2. -march=skylake -O3' it produces pretty decent
code. The only problem is over-aggressive load+op combining similar to what we
already discussed in 97127. It seems, this problem can't be solved without
major overhaul of gcc optimizer architecture, but luckily an impact is quite
minor.
But when we compile with 'gcc.10.2. -march=skylake -Ofast' the fun begins:

.L5:
vmovupd (%r9), %ymm7
vmovupd 64(%r9), %ymm6
vunpcklpd   32(%r9), %ymm7, %ymm2
vunpckhpd   32(%r9), %ymm7, %ymm0
vmovupd 64(%r9), %ymm7
vmovupd 192(%r9), %ymm4
vunpckhpd   96(%r9), %ymm7, %ymm5
vmovupd 128(%r9), %ymm7
vunpcklpd   96(%r9), %ymm6, %ymm6
vunpcklpd   160(%r9), %ymm7, %ymm3
vunpckhpd   160(%r9), %ymm7, %ymm1
vmovupd 192(%r9), %ymm7
vunpcklpd   224(%r9), %ymm4, %ymm4
vunpckhpd   224(%r9), %ymm7, %ymm8
vpermpd $216, %ymm6, %ymm6
vpermpd $216, %ymm5, %ymm5
vpermpd $216, %ymm4, %ymm4
vpermpd $216, %ymm8, %ymm8
vpermpd $216, %ymm2, %ymm2
vpermpd $216, %ymm0, %ymm0
vpermpd $216, %ymm3, %ymm3
vpermpd $216, %ymm1, %ymm1
vunpcklpd   %ymm6, %ymm2, %ymm7
vunpckhpd   %ymm6, %ymm2, %ymm2
vunpcklpd   %ymm4, %ymm3, %ymm6
vunpckhpd   %ymm4, %ymm3, %ymm3
vunpcklpd   %ymm5, %ymm0, %ymm4
vunpckhpd   %ymm5, %ymm0, %ymm0
vunpcklpd   %ymm8, %ymm1, %ymm5
vpermpd $216, %ymm5, %ymm5
vpermpd $216, %ymm4, %ymm4
vpermpd $216, %ymm3, %ymm3
vunpcklpd   %ymm5, %ymm4, %ymm11
vpermpd $216, %ymm2, %ymm2
vunpckhpd   %ymm5, %ymm4, %ymm4
vunpckhpd   %ymm8, %ymm1, %ymm1
vpermpd $216, %ymm0, %ymm0
vpermpd $216, %ymm4, %ymm8
vpermpd $216, %ymm1, %ymm1
vunpcklpd   %ymm3, %ymm2, %ymm4
vunpckhpd   %ymm3, %ymm2, %ymm2
vpermpd $216, %ymm2, %ymm5
vunpcklpd   %ymm1, %ymm0, %ymm2
vpermpd $216, %ymm4, %ymm10
vpermpd $216, %ymm2, %ymm4
vmovupd 64(%rax), %ymm2
vmovupd (%rax), %ymm3
vmovupd %ymm4, 448(%rsp)
vunpckhpd   96(%rax), %ymm2, %ymm4
vmovupd 128(%rax), %ymm2
vpermpd $216, %ymm6, %ymm6
vunpckhpd   %ymm1, %ymm0, %ymm1
vpermpd $216, %ymm7, %ymm7
vunpcklpd   32(%rax), %ymm3, %ymm9
vunpckhpd   32(%rax), %ymm3, %ymm14
vunpckhpd   160(%rax), %ymm2, %ymm0
vmovupd 64(%rax), %ymm3
vunpcklpd   %ymm6, %ymm7, %ymm12
vunpckhpd   %ymm6, %ymm7, %ymm7
vpermpd $216, %ymm1, %ymm6
vunpcklpd   160(%rax), %ymm2, %ymm1
vmovupd 192(%rax), %ymm2
vunpcklpd   96(%rax), %ymm3, %ymm3
vmovupd 

[Bug c/97831] New: Lack of disable_tail_calls attribute

2020-11-14 Thread irogers at google dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97831

Bug ID: 97831
   Summary: Lack of disable_tail_calls attribute
   Product: gcc
   Version: unknown
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c
  Assignee: unassigned at gcc dot gnu.org
  Reporter: irogers at google dot com
  Target Milestone: ---

Tail call optimization may remove stack frames, certain tests assert stack
frames are present. Previously these tests would use
__attribute__((optimize("no-optimize-sibling-calls"))), however, the use of the
optimize attribute shouldn't occur in production code as per the FAQ:
https://gcc.gnu.org/wiki/FAQ#optimize_attribute_broken
The attribute disable_tail_calls is used in other compilers for this situation:
https://clang.llvm.org/docs/AttributeReference.html#disable-tail-calls

A situation where this has come up is in Linux:
https://lore.kernel.org/lkml/20201028081123.gt2...@hirez.programming.kicks-ass.net/
https://lore.kernel.org/lkml/20201114000803.909530-1-irog...@google.com/

[Bug target/92729] [avr] Convert the backend to MODE_CC so it can be kept in future releases

2020-11-14 Thread gjl at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92729

--- Comment #12 from Georg-Johann Lay  ---
Simulator: avrtest core simulator hosted on SourceForge as part of WinAVR.

Libc: avr-libc trunk hosted on nongnu.org. There are several patches not yet
integrated: recent xtiny devices, fixes in libm to adjust to the recent
double64 additions, and extensions for the build environment to handle the new
avr-gcc configure options for double multilib layout. Patches are pending for
some time; you'll have to resolve conflicts.

Binutils is vanilla from sourceware.org.

[Bug tree-optimization/97830] [11 Regression] ICE in expressions_equal_p at gcc/tree-ssa-sccvn.c:5631 since r11-4982-g4d6b8d4213376e8a

2020-11-14 Thread marxin at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97830

Martin Liška  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Priority|P3  |P1
   Last reconfirmed||2020-11-14
 Blocks||26163
  Known to work||10.2.0
  Known to fail||11.0
   Target Milestone|--- |11.0
 Ever confirmed|0   |1

--- Comment #1 from Martin Liška  ---
Seen in a SPEC benchmark 436.cactusADM.


Referenced Bugs:

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=26163
[Bug 26163] [meta-bug] missed optimization in SPEC (2k17, 2k and 2k6 and 95)

[Bug tree-optimization/97830] New: [11 Regression] ICE in expressions_equal_p at gcc/tree-ssa-sccvn.c:5631 since r11-4982-g4d6b8d4213376e8a

2020-11-14 Thread marxin at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97830

Bug ID: 97830
   Summary: [11 Regression] ICE in expressions_equal_p at
gcc/tree-ssa-sccvn.c:5631 since
r11-4982-g4d6b8d4213376e8a
   Product: gcc
   Version: 11.0
Status: UNCONFIRMED
  Keywords: ice-on-valid-code
  Severity: normal
  Priority: P3
 Component: tree-optimization
  Assignee: unassigned at gcc dot gnu.org
  Reporter: marxin at gcc dot gnu.org
CC: rguenth at gcc dot gnu.org
  Target Milestone: ---

The following fails:

$ cat schedule.i
typedef enum { LangC } cLanguage;
typedef enum { FunctionOneArg, FunctionStandard } cFunctionType;
void *CCTK_CallFunction_function;
cLanguage CCTK_CallFunction_fdata_0;
cFunctionType CCTK_CallFunction_fdata_1;
void CCTK_CallFunction_data() {
  void (*standardfunc)();
  int (*oneargfunc)();
  switch (CCTK_CallFunction_fdata_1) {
  case FunctionOneArg:
oneargfunc = CCTK_CallFunction_function;
oneargfunc(CCTK_CallFunction_data);
break;
  case FunctionStandard:
switch (CCTK_CallFunction_fdata_0) {
case LangC:
  standardfunc = CCTK_CallFunction_function;
  standardfunc(CCTK_CallFunction_data);
}
  }
}

$ gcc schedule.i -c -O2
during GIMPLE pass: pre
schedule.i: In function 'CCTK_CallFunction_data':
schedule.i:6:6: internal compiler error: Segmentation fault
6 | void CCTK_CallFunction_data() {
  |  ^~
0x13be442 crash_signal
/home/marxin/Programming/gcc/gcc/toplev.c:330
0x77889d1f ???
   
/usr/src/debug/glibc-2.32-2.1.x86_64/signal/../sysdeps/unix/sysv/linux/x86_64/sigaction.c:0
0x16badca expressions_equal_p(tree_node*, tree_node*)
/home/marxin/Programming/gcc/gcc/tree-ssa-sccvn.c:5631
0x16a9f5f vn_reference_eq(vn_reference_s const*, vn_reference_s const*)
/home/marxin/Programming/gcc/gcc/tree-ssa-sccvn.c:705
0x16c5e86 vn_reference_hasher::equal(vn_reference_s const*, vn_reference_s
const*)
/home/marxin/Programming/gcc/gcc/tree-ssa-sccvn.c:246
0x16c6c45 hash_table::find_slot_with_hash(vn_reference_s* const&, unsigned int,
insert_option)
/home/marxin/Programming/gcc/gcc/hash-table.h:981
0x16ad9fa vn_reference_lookup_1
/home/marxin/Programming/gcc/gcc/tree-ssa-sccvn.c:1645
0x16b4137 vn_reference_lookup_call(gcall*, vn_reference_s**, vn_reference_s*)
/home/marxin/Programming/gcc/gcc/tree-ssa-sccvn.c:3579
0x16b8a1f visit_reference_op_call
/home/marxin/Programming/gcc/gcc/tree-ssa-sccvn.c:4897
0x16ba84c visit_stmt
/home/marxin/Programming/gcc/gcc/tree-ssa-sccvn.c:5503
0x16c08d2 process_bb
/home/marxin/Programming/gcc/gcc/tree-ssa-sccvn.c:7110
0x16c29bc do_rpo_vn
/home/marxin/Programming/gcc/gcc/tree-ssa-sccvn.c:7597
0x16bf041 run_rpo_vn(vn_lookup_kind)
/home/marxin/Programming/gcc/gcc/tree-ssa-sccvn.c:6684
0x1677f18 execute
/home/marxin/Programming/gcc/gcc/tree-ssa-pre.c:4392
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See  for instructions.

[Bug tree-optimization/97821] [8/9/10/11 Regression] wrong code with -ftree-vectorize at -O1 on x86_64-pc-linux-gnu by r6-3608

2020-11-14 Thread hjl.tools at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97821

H.J. Lu  changed:

   What|Removed |Added

 Ever confirmed|0   |1
 Status|UNCONFIRMED |NEW
   Target Milestone|--- |8.5
   Last reconfirmed||2020-11-14
Summary|wrong code with |[8/9/10/11 Regression]
   |-ftree-vectorize at -O1 on  |wrong code with
   |x86_64-pc-linux-gnu |-ftree-vectorize at -O1 on
   ||x86_64-pc-linux-gnu by
   ||r6-3608
 CC||hjl.tools at gmail dot com,
   ||law at redhat dot com

--- Comment #1 from H.J. Lu  ---
It was caused by r6-3608.

[Bug libbacktrace/97082] new test 'mtest' fails for Mach-O/Darwin.

2020-11-14 Thread dominiq at lps dot ens.fr via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97082

--- Comment #4 from Dominique d'Humieres  ---
At r11-5030 I get:

=
   package-unused version-unused: ./test-suite.log
=

# TOTAL: 21
# PASS:  16
# SKIP:  0
# XFAIL: 0
# FAIL:  5
# XPASS: 0
# ERROR: 0

.. contents:: :depth: 2

FAIL: btest
===

test2: [0]: missing file name or function name
test4: [0]: missing file name or function name
test5: NULL syminfo name
PASS: backtrace_full noinline
FAIL: backtrace_full inline
PASS: backtrace_simple noinline
FAIL: backtrace_simple inline
FAIL: backtrace_syminfo variable
FAIL btest (exit status: 1)

FAIL: btest_alloc
=

test2: [0]: missing file name or function name
test4: [0]: missing file name or function name
test5: NULL syminfo name
PASS: backtrace_full noinline
FAIL: backtrace_full inline
PASS: backtrace_simple noinline
FAIL: backtrace_simple inline
FAIL: backtrace_syminfo variable
FAIL btest_alloc (exit status: 1)

FAIL: dwarf5


test1: [0]: missing file name or function name
test2: [0]: missing file name or function name
test3: [0]: missing file name or function name
test4: [0]: missing file name or function name
test5: NULL syminfo name
FAIL: backtrace_full noinline
FAIL: backtrace_full inline
FAIL: backtrace_simple noinline
FAIL: backtrace_simple inline
FAIL: backtrace_syminfo variable
FAIL dwarf5 (exit status: 1)

FAIL: dwarf5_alloc
==

test1: [0]: missing file name or function name
test2: [0]: missing file name or function name
test3: [0]: missing file name or function name
test4: [0]: missing file name or function name
test5: NULL syminfo name
FAIL: backtrace_full noinline
FAIL: backtrace_full inline
FAIL: backtrace_simple noinline
FAIL: backtrace_simple inline
FAIL: backtrace_syminfo variable
FAIL dwarf5_alloc (exit status: 1)

FAIL: mtest
===

test5: unexpected syminfo name got dwarf_section_names expected global
PASS: backtrace_full noinline
PASS: backtrace_simple noinline
FAIL: backtrace_syminfo variable
FAIL mtest (exit status: 1)

[Bug c/97829] New: pragma ignore "-Wint-in-bool-context" is ignored for _Bool _Complex interaction

2020-11-14 Thread antiquarktv at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97829

Bug ID: 97829
   Summary: pragma ignore "-Wint-in-bool-context" is ignored for
_Bool _Complex interaction
   Product: gcc
   Version: 10.2.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c
  Assignee: unassigned at gcc dot gnu.org
  Reporter: antiquarktv at gmail dot com
  Target Milestone: ---

#include 
#include 

// gcc -std=c11 -Wall -Wextra -pedantic main.c

#pragma GCC diagnostic ignored "-Wint-in-bool-context" 
#pragma GCC diagnostic ignored "-Wunused-variable" 

int main()
{
double _Complex x = 1;
_Bool b = 1;
b *= x;  // prints int-in-bool-context warning.
_Bool c = 2; // unused var warning not printed.
}

/* 

The code above prints the following when compiled:

gcc -std=c11 -Wall -Wextra -pedantic main.c
main.c: In function ‘main’:
cc1: warning: ‘*’ in boolean context, suggest ‘&&’ instead
[-Wint-in-bool-context]
cc1: warning: ‘*’ in boolean context, suggest ‘&&’ instead
[-Wint-in-bool-context]

The Wint-in-bool-context warning is printed by cc1 as a result of the _Bool *=
_Complex operation

If this code is compiled with -Wno-int-in-bool-context on the command line,
there is no warning:

gcc -std=c11 -Wall -Wextra -pedantic main.c -Wno-int-in-bool-context
(produces no output). 

*/

[Bug libstdc++/97828] New: std::ranges::search_n does not work with counted_iterator<_List_iterator<...>>

2020-11-14 Thread ensadc at mailnesia dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97828

Bug ID: 97828
   Summary: std::ranges::search_n does not work with
counted_iterator<_List_iterator<...>>
   Product: gcc
   Version: 11.0
Status: UNCONFIRMED
  Keywords: rejects-valid
  Severity: normal
  Priority: P3
 Component: libstdc++
  Assignee: unassigned at gcc dot gnu.org
  Reporter: ensadc at mailnesia dot com
  Target Milestone: ---

```
#include 
#include 
#include 
#include 

int main() {
using namespace std::ranges;
std::list a = {0,42,42,0,42,42,42,0};
auto b = a | views::take(5);
auto count = 3;

auto res = search_n(b, count, 42);

for (int v : res) std::cout << v << ' ';
std::cout << '\n';
}
```

This gives a rather long error message.

It appears that the `sized_sentinel_for` branch of std::ranges::search_n uses
random access iterator operations, without checking if the iterator is actually
random access.

(This branch also returns incorrect results for certain input, which can be
observed by changing `std::list` to `std::vector`.)

[Bug fortran/97589] Segementation fault when allocating coarrays.

2020-11-14 Thread toon at moene dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97589

Toon Moene  changed:

   What|Removed |Added

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

--- Comment #9 from Toon Moene  ---
Unfortunately, I now get the following error on the original code in the
attachment:

(export
LD_LIBRARY_PATH=/home/toon/compilers/install/coarray_native/lib/gcc/x86_64-pc-linux-gnu/11.0.0;
export GFORTRAN_NUM_IMAGES=1; echo '  / ' | ./a.out)
Decomposition information on image   1 : there are   1 *   1 slabs; the slab on
this image has  90 *  90 grid cells.
Fortran runtime error: Integer overflow when calculating the amount of memory
to allocate

Error termination. Backtrace:
#0  0x7f310ff36bd0 in ???
#1  0x7f310ff37685 in ???
#2  0x7f310ff37b49 in ???
#3  0x40247b in __types_MOD_global_alloc
at /home/toon/src/test-coarrays.f90:21
#4  0x403a74 in random_weather
at /home/toon/src/test-coarrays.f90:95
#5  0x7f311021bc0a in image_main_wrapper
at
/home/toon/compilers/coarray_native/libgfortran/nca/coarraynative.c:184
#6  0x403acb in main
at /home/toon/src/test-coarrays.f90:28

[Bug target/70928] Load simple float constants via VSX operations on PowerPC

2020-11-14 Thread jens.seifert at de dot ibm.com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70928

Jens Seifert  changed:

   What|Removed |Added

 CC||jens.seifert at de dot ibm.com

--- Comment #4 from Jens Seifert  ---
values -16.0..+15.0.
vspltisw  0,
xvcvsxwdp 32,32

values -16.0f..+15.0f
vspltisw  0,
xvcvsxwsp 32,32

-0.0 / 0x8000
xxlxor 32,32,32
xvnabsdp 32,32 or xvnegdp 32,32

-0.0f / 0x8000
xxlxor 32,32,32
xvnabssp 32,32 or xvnegsp 32,32

0x7FFF
vspltisw 0,-1
xvabsdp 32,32

0x7FFF
vspltisw 0,-1
xvabssp 32,32

[Bug target/97827] New: [11 Regression] bootstrap error building the amdgcn-amdhsa offload compiler

2020-11-14 Thread doko at debian dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97827

Bug ID: 97827
   Summary: [11 Regression] bootstrap error building the
amdgcn-amdhsa offload compiler
   Product: gcc
   Version: 10.2.1
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: target
  Assignee: unassigned at gcc dot gnu.org
  Reporter: doko at debian dot org
  Target Milestone: ---

builds fine with trunk 20201112, fails with trunk 20201113. newlib 3.3.0 is
used.

[...]
/tmp/ccpzv56q.s:1129:2: error: changed section flags for .rodata.cst8,
expected: 0x12
.section.rodata.cst8
^
/tmp/ccpzv56q.s:1129:2: error: changed section entsize for .rodata.cst8,
expected: 8
.section.rodata.cst8
^
make[10]: *** [Makefile:980: lib_a-wcstod.o] Error 1
make[10]: *** Waiting for unfinished jobs
/tmp/ccDmKs3n.s:4450:2: error: changed section flags for .rodata.cst8,
expected: 0x12
.section.rodata.cst8
^
/tmp/ccDmKs3n.s:4450:2: error: changed section entsize for .rodata.cst8,
expected: 8
.section.rodata.cst8
^
/tmp/ccDmKs3n.s:4643:2: error: changed section flags for .rodata.cst8,
expected: 0x12
.section.rodata.cst8
^
/tmp/ccDmKs3n.s:4643:2: error: changed section entsize for .rodata.cst8,
expected: 8
.section.rodata.cst8
^
make[10]: *** [Makefile:944: lib_a-strtod.o] Error 1
make[10]: Leaving directory
'/packages/gcc/11/gcc-11-11-20201113/build-gcn/amdgcn-amdhsa/gfx900/newlib/libc/stdlib'

[Bug testsuite/97826] New: internal compiler error: in cp_build_addr_expr_1, at cp/typeck.c:6453

2020-11-14 Thread vladimir.kokovic at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97826

Bug ID: 97826
   Summary: internal compiler error: in cp_build_addr_expr_1, at
cp/typeck.c:6453
   Product: gcc
   Version: unknown
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: testsuite
  Assignee: unassigned at gcc dot gnu.org
  Reporter: vladimir.kokovic at gmail dot com
  Target Milestone: ---

GIT_DIR=/mnt/WD-Elements-25A1/src/gcc-mirror-git/gcc/.git git describe HEAD
misc/first-auto-changelog-4144-gc283a711c85

Build a cross compiler for MinGW(gcc 10.2.0)

Executing on host:
/mnt/WD-Elements-25A1/src/gcc-mirror-git/mingw-objdir/gcc/testsuite/g++/../../xg++
-B/mnt/WD-Elements-25A1/src/gcc-mirror-git/mingw-objdir/gcc/testsuite/g++/../../
   -fdiagnostics-plain-output  -nostdinc++
-I/mnt/sdd1/home/src/gcc-mirror-git/mingw-objdir/x86_64-w64-mingw32/libstdc++-v3/include/x86_64-w64-mingw32
-I/mnt/sdd1/home/src/gcc-mirror-git/mingw-objdir/x86_64-w64-mingw32/libstdc++-v3/include
-I/mnt/sdd1/home/src/gcc-mirror-git/gcc/libstdc++-v3/libsupc++
-I/mnt/sdd1/home/src/gcc-mirror-git/gcc/libstdc++-v3/include/backward
-I/mnt/sdd1/home/src/gcc-mirror-git/gcc/libstdc++-v3/testsuite/util
-fmessage-length=0  -std=c++98  -pedantic-errors -Wno-long-long  -c -o 13908.o
/mnt/sdd1/home/src/gcc-mirror-git/gcc/gcc/testsuite/g++.old-deja/g++.benjamin/13908.C
   (timeout = 300)
spawn -ignore SIGHUP
/mnt/WD-Elements-25A1/src/gcc-mirror-git/mingw-objdir/gcc/testsuite/g++/../../xg++
-B/mnt/WD-Elements-25A1/src/gcc-mirror-git/mingw-objdir/gcc/testsuite/g++/../../
-fdiagnostics-plain-output -nostdinc++
-I/mnt/sdd1/home/src/gcc-mirror-git/mingw-objdir/x86_64-w64-mingw32/libstdc++-v3/include/x86_64-w64-mingw32
-I/mnt/sdd1/home/src/gcc-mirror-git/mingw-objdir/x86_64-w64-mingw32/libstdc++-v3/include
-I/mnt/sdd1/home/src/gcc-mirror-git/gcc/libstdc++-v3/libsupc++
-I/mnt/sdd1/home/src/gcc-mirror-git/gcc/libstdc++-v3/include/backward
-I/mnt/sdd1/home/src/gcc-mirror-git/gcc/libstdc++-v3/testsuite/util
-fmessage-length=0 -std=c++98 -pedantic-errors -Wno-long-long -c -o 13908.o
/mnt/sdd1/home/src/gcc-mirror-git/gcc/gcc/testsuite/g++.old-deja/g++.benjamin/13908.C
/mnt/sdd1/home/src/gcc-mirror-git/gcc/gcc/testsuite/g++.old-deja/g++.benjamin/13908.C:
In function 'void bar(chile*, pmf)':
/mnt/sdd1/home/src/gcc-mirror-git/gcc/gcc/testsuite/g++.old-deja/g++.benjamin/13908.C:20:33:
internal compiler error: in cp_build_addr_expr_1, at cp/typeck.c:6453
0x5f35f4 cp_build_addr_expr_1
/mnt/sdd1/home/src/gcc-mirror-git/gcc/gcc/cp/typeck.c:6453
0x7b5e17 cp_build_addr_expr_1
/mnt/sdd1/home/src/gcc-mirror-git/gcc/gcc/cp/typeck.c:6301
0x7b5e17 cp_build_addr_expr_strict
/mnt/sdd1/home/src/gcc-mirror-git/gcc/gcc/cp/typeck.c:6557
0x7b5e17 build_x_unary_op(unsigned int, tree_code, cp_expr, int)
/mnt/sdd1/home/src/gcc-mirror-git/gcc/gcc/cp/typeck.c:6183
0x735253 cp_parser_unary_expression
/mnt/sdd1/home/src/gcc-mirror-git/gcc/gcc/cp/parser.c:8595
0x70ea83 cp_parser_cast_expression
/mnt/sdd1/home/src/gcc-mirror-git/gcc/gcc/cp/parser.c:9508
0x70f40a cp_parser_binary_expression
/mnt/sdd1/home/src/gcc-mirror-git/gcc/gcc/cp/parser.c:9655
0x710dcc cp_parser_assignment_expression
/mnt/sdd1/home/src/gcc-mirror-git/gcc/gcc/cp/parser.c:9960
0x70fbad cp_parser_constant_expression
/mnt/sdd1/home/src/gcc-mirror-git/gcc/gcc/cp/parser.c:10254
0x7101b1 cp_parser_initializer_clause
/mnt/sdd1/home/src/gcc-mirror-git/gcc/gcc/cp/parser.c:23562
0x710f88 cp_parser_assignment_expression
/mnt/sdd1/home/src/gcc-mirror-git/gcc/gcc/cp/parser.c:9979
0x711102 cp_parser_expression
/mnt/sdd1/home/src/gcc-mirror-git/gcc/gcc/cp/parser.c:10128
0x713dc8 cp_parser_expression_statement
/mnt/sdd1/home/src/gcc-mirror-git/gcc/gcc/cp/parser.c:11797
0x71ee61 cp_parser_statement
/mnt/sdd1/home/src/gcc-mirror-git/gcc/gcc/cp/parser.c:11593
0x7206cd cp_parser_statement_seq_opt
/mnt/sdd1/home/src/gcc-mirror-git/gcc/gcc/cp/parser.c:11944
0x720780 cp_parser_compound_statement
/mnt/sdd1/home/src/gcc-mirror-git/gcc/gcc/cp/parser.c:11894
0x73801c cp_parser_function_body
/mnt/sdd1/home/src/gcc-mirror-git/gcc/gcc/cp/parser.c:23406
0x73801c cp_parser_ctor_initializer_opt_and_function_body
/mnt/sdd1/home/src/gcc-mirror-git/gcc/gcc/cp/parser.c:23457
0x73bb20 cp_parser_function_definition_after_declarator
/mnt/sdd1/home/src/gcc-mirror-git/gcc/gcc/cp/parser.c:29351
0x73cacc cp_parser_function_definition_from_specifiers_and_declarator
/mnt/sdd1/home/src/gcc-mirror-git/gcc/gcc/cp/parser.c:29267
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See  for instructions.
compiler exited with status 1
FAIL: g++.old-deja/g++.benjamin/13908.C  -std=c++98 (internal compiler error)
FAIL: 

[Bug testsuite/97825] New: internal compiler error: in build_ptrmemfunc, at cp/typeck.c:9199

2020-11-14 Thread vladimir.kokovic at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97825

Bug ID: 97825
   Summary: internal compiler error: in build_ptrmemfunc, at
cp/typeck.c:9199
   Product: gcc
   Version: unknown
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: testsuite
  Assignee: unassigned at gcc dot gnu.org
  Reporter: vladimir.kokovic at gmail dot com
  Target Milestone: ---

GIT_DIR=/mnt/WD-Elements-25A1/src/gcc-mirror-git/gcc/.git git describe HEAD
misc/first-auto-changelog-4144-gc283a711c85

Build a cross compiler for MinGW(gcc 10.2.0)

Executing on host:
/mnt/WD-Elements-25A1/src/gcc-mirror-git/mingw-objdir/gcc/testsuite/g++/../../xg++
-B/mnt/WD-Elements-25A1/src/gcc-mirror-git/mingw-objdir/gcc/testsuite/g++/../../
/mnt/sdd1/home/src/gcc-mirror-git/gcc/gcc/testsuite/g++.dg/other/ptrmem8.C   
-fdiagnostics-plain-output  -nostdinc++
-I/mnt/sdd1/home/src/gcc-mirror-git/mingw-objdir/x86_64-w64-mingw32/libstdc++-v3/include/x86_64-w64-mingw32
-I/mnt/sdd1/home/src/gcc-mirror-git/mingw-objdir/x86_64-w64-mingw32/libstdc++-v3/include
-I/mnt/sdd1/home/src/gcc-mirror-git/gcc/libstdc++-v3/libsupc++
-I/mnt/sdd1/home/src/gcc-mirror-git/gcc/libstdc++-v3/include/backward
-I/mnt/sdd1/home/src/gcc-mirror-git/gcc/libstdc++-v3/testsuite/util
-fmessage-length=0  -std=c++98  -pedantic-errors -Wno-long-long  -S -o
ptrmem8.s(timeout = 300)
spawn -ignore SIGHUP
/mnt/WD-Elements-25A1/src/gcc-mirror-git/mingw-objdir/gcc/testsuite/g++/../../xg++
-B/mnt/WD-Elements-25A1/src/gcc-mirror-git/mingw-objdir/gcc/testsuite/g++/../../
/mnt/sdd1/home/src/gcc-mirror-git/gcc/gcc/testsuite/g++.dg/other/ptrmem8.C
-fdiagnostics-plain-output -nostdinc++
-I/mnt/sdd1/home/src/gcc-mirror-git/mingw-objdir/x86_64-w64-mingw32/libstdc++-v3/include/x86_64-w64-mingw32
-I/mnt/sdd1/home/src/gcc-mirror-git/mingw-objdir/x86_64-w64-mingw32/libstdc++-v3/include
-I/mnt/sdd1/home/src/gcc-mirror-git/gcc/libstdc++-v3/libsupc++
-I/mnt/sdd1/home/src/gcc-mirror-git/gcc/libstdc++-v3/include/backward
-I/mnt/sdd1/home/src/gcc-mirror-git/gcc/libstdc++-v3/testsuite/util
-fmessage-length=0 -std=c++98 -pedantic-errors -Wno-long-long -S -o ptrmem8.s
/mnt/sdd1/home/src/gcc-mirror-git/gcc/gcc/testsuite/g++.dg/other/ptrmem8.C: In
function 'void foo(void (A::*)())':
/mnt/sdd1/home/src/gcc-mirror-git/gcc/gcc/testsuite/g++.dg/other/ptrmem8.C:9:9:
internal compiler error: in build_ptrmemfunc, at cp/typeck.c:9199
0x5f35cc build_ptrmemfunc(tree_node*, tree_node*, int, bool, int)
/mnt/sdd1/home/src/gcc-mirror-git/gcc/gcc/cp/typeck.c:9199
0x7b5e17 cp_build_addr_expr_1
/mnt/sdd1/home/src/gcc-mirror-git/gcc/gcc/cp/typeck.c:6301
0x7b5e17 cp_build_addr_expr_strict
/mnt/sdd1/home/src/gcc-mirror-git/gcc/gcc/cp/typeck.c:6557
0x7b5e17 build_x_unary_op(unsigned int, tree_code, cp_expr, int)
/mnt/sdd1/home/src/gcc-mirror-git/gcc/gcc/cp/typeck.c:6183
0x735253 cp_parser_unary_expression
/mnt/sdd1/home/src/gcc-mirror-git/gcc/gcc/cp/parser.c:8595
0x70f40a cp_parser_binary_expression
/mnt/sdd1/home/src/gcc-mirror-git/gcc/gcc/cp/parser.c:9655
0x710dcc cp_parser_assignment_expression
/mnt/sdd1/home/src/gcc-mirror-git/gcc/gcc/cp/parser.c:9960
0x711102 cp_parser_expression
/mnt/sdd1/home/src/gcc-mirror-git/gcc/gcc/cp/parser.c:10128
0x713dc8 cp_parser_expression_statement
/mnt/sdd1/home/src/gcc-mirror-git/gcc/gcc/cp/parser.c:11797
0x71ee61 cp_parser_statement
/mnt/sdd1/home/src/gcc-mirror-git/gcc/gcc/cp/parser.c:11593
0x7206cd cp_parser_statement_seq_opt
/mnt/sdd1/home/src/gcc-mirror-git/gcc/gcc/cp/parser.c:11944
0x720780 cp_parser_compound_statement
/mnt/sdd1/home/src/gcc-mirror-git/gcc/gcc/cp/parser.c:11894
0x73801c cp_parser_function_body
/mnt/sdd1/home/src/gcc-mirror-git/gcc/gcc/cp/parser.c:23406
0x73801c cp_parser_ctor_initializer_opt_and_function_body
/mnt/sdd1/home/src/gcc-mirror-git/gcc/gcc/cp/parser.c:23457
0x73bb20 cp_parser_function_definition_after_declarator
/mnt/sdd1/home/src/gcc-mirror-git/gcc/gcc/cp/parser.c:29351
0x73cacc cp_parser_function_definition_from_specifiers_and_declarator
/mnt/sdd1/home/src/gcc-mirror-git/gcc/gcc/cp/parser.c:29267
0x73cacc cp_parser_init_declarator
/mnt/sdd1/home/src/gcc-mirror-git/gcc/gcc/cp/parser.c:20979
0x7421e4 cp_parser_single_declaration
/mnt/sdd1/home/src/gcc-mirror-git/gcc/gcc/cp/parser.c:29838
0x742357 cp_parser_template_declaration_after_parameters
/mnt/sdd1/home/src/gcc-mirror-git/gcc/gcc/cp/parser.c:29411
0x74297a cp_parser_explicit_template_declaration
/mnt/sdd1/home/src/gcc-mirror-git/gcc/gcc/cp/parser.c:29676
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See  for instructions.
compiler exited with status 1
FAIL: g++.dg/other/ptrmem8.C  -std=c++98 (internal compiler error)
FAIL: 

[Bug testsuite/97824] New: internal compiler error: in gimplify_expr, at gimplify.c:14531

2020-11-14 Thread vladimir.kokovic at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97824

Bug ID: 97824
   Summary: internal compiler error: in gimplify_expr, at
gimplify.c:14531
   Product: gcc
   Version: unknown
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: testsuite
  Assignee: unassigned at gcc dot gnu.org
  Reporter: vladimir.kokovic at gmail dot com
  Target Milestone: ---

GIT_DIR=/mnt/WD-Elements-25A1/src/gcc-mirror-git/gcc/.git git describe HEAD
misc/first-auto-changelog-4144-gc283a711c85

Build a cross compiler for MinGW(gcc 10.2.0)

Executing on host:
/mnt/WD-Elements-25A1/src/gcc-mirror-git/mingw-objdir/gcc/testsuite/g++/../../xg++
-B/mnt/WD-Elements-25A1/src/gcc-mirror-git/mingw-objdir/gcc/testsuite/g++/../../
/mnt/sdd1/home/src/gcc-mirror-git/gcc/gcc/testsuite/g++.dg/expr/ptrmem5.C   
-fdiagnostics-plain-output  -nostdinc++
-I/mnt/sdd1/home/src/gcc-mirror-git/mingw-objdir/x86_64-w64-mingw32/libstdc++-v3/include/x86_64-w64-mingw32
-I/mnt/sdd1/home/src/gcc-mirror-git/mingw-objdir/x86_64-w64-mingw32/libstdc++-v3/include
-I/mnt/sdd1/home/src/gcc-mirror-git/gcc/libstdc++-v3/libsupc++
-I/mnt/sdd1/home/src/gcc-mirror-git/gcc/libstdc++-v3/include/backward
-I/mnt/sdd1/home/src/gcc-mirror-git/gcc/libstdc++-v3/testsuite/util
-fmessage-length=0  -std=c++98  -pedantic-errors -Wno-long-long  -S -o
ptrmem5.s(timeout = 300)
spawn -ignore SIGHUP
/mnt/WD-Elements-25A1/src/gcc-mirror-git/mingw-objdir/gcc/testsuite/g++/../../xg++
-B/mnt/WD-Elements-25A1/src/gcc-mirror-git/mingw-objdir/gcc/testsuite/g++/../../
/mnt/sdd1/home/src/gcc-mirror-git/gcc/gcc/testsuite/g++.dg/expr/ptrmem5.C
-fdiagnostics-plain-output -nostdinc++
-I/mnt/sdd1/home/src/gcc-mirror-git/mingw-objdir/x86_64-w64-mingw32/libstdc++-v3/include/x86_64-w64-mingw32
-I/mnt/sdd1/home/src/gcc-mirror-git/mingw-objdir/x86_64-w64-mingw32/libstdc++-v3/include
-I/mnt/sdd1/home/src/gcc-mirror-git/gcc/libstdc++-v3/libsupc++
-I/mnt/sdd1/home/src/gcc-mirror-git/gcc/libstdc++-v3/include/backward
-I/mnt/sdd1/home/src/gcc-mirror-git/gcc/libstdc++-v3/testsuite/util
-fmessage-length=0 -std=c++98 -pedantic-errors -Wno-long-long -S -o ptrmem5.s
/mnt/sdd1/home/src/gcc-mirror-git/gcc/gcc/testsuite/g++.dg/expr/ptrmem5.C: In
function 'void foo()':
/mnt/sdd1/home/src/gcc-mirror-git/gcc/gcc/testsuite/g++.dg/expr/ptrmem5.C:7:17:
internal compiler error: in gimplify_expr, at gimplify.c:14531
0x5fe0cc gimplify_expr(tree_node**, gimple**, gimple**, bool (*)(tree_node*),
int)
/mnt/sdd1/home/src/gcc-mirror-git/gcc/gcc/gimplify.c:14531
0xa2565d gimplify_stmt(tree_node**, gimple**)
/mnt/sdd1/home/src/gcc-mirror-git/gcc/gcc/gimplify.c:6832
0xa2565d gimplify_cleanup_point_expr
/mnt/sdd1/home/src/gcc-mirror-git/gcc/gcc/gimplify.c:6574
0xa20c2d gimplify_expr(tree_node**, gimple**, gimple**, bool (*)(tree_node*),
int)
/mnt/sdd1/home/src/gcc-mirror-git/gcc/gcc/gimplify.c:14139
0xa248d2 gimplify_stmt(tree_node**, gimple**)
/mnt/sdd1/home/src/gcc-mirror-git/gcc/gcc/gimplify.c:6832
0xa248d2 gimplify_body(tree_node*, bool)
/mnt/sdd1/home/src/gcc-mirror-git/gcc/gcc/gimplify.c:14983
0xa24cb2 gimplify_function_tree(tree_node*)
/mnt/sdd1/home/src/gcc-mirror-git/gcc/gcc/gimplify.c:15137
0x8b89f7 cgraph_node::analyze()
/mnt/sdd1/home/src/gcc-mirror-git/gcc/gcc/cgraphunit.c:670
0x8bafe7 analyze_functions
/mnt/sdd1/home/src/gcc-mirror-git/gcc/gcc/cgraphunit.c:1235
0x8bbbdd symbol_table::finalize_compilation_unit()
/mnt/sdd1/home/src/gcc-mirror-git/gcc/gcc/cgraphunit.c:2513
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See  for instructions.
compiler exited with status 1
FAIL: g++.dg/expr/ptrmem5.C  -std=c++98 (internal compiler error)
FAIL: g++.dg/expr/ptrmem5.C  -std=c++98  (test for errors, line 7)

[Bug testsuite/97823] New: internal compiler error: in poplevel_class, at cp/name-lookup.c:4112

2020-11-14 Thread vladimir.kokovic at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97823

Bug ID: 97823
   Summary: internal compiler error: in poplevel_class, at
cp/name-lookup.c:4112
   Product: gcc
   Version: unknown
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: testsuite
  Assignee: unassigned at gcc dot gnu.org
  Reporter: vladimir.kokovic at gmail dot com
  Target Milestone: ---

GIT_DIR=/mnt/WD-Elements-25A1/src/gcc-mirror-git/gcc/.git git describe HEAD
misc/first-auto-changelog-4144-gc283a711c85

Build a cross compiler for MinGW(gcc 10.2.0)

Executing on host:
/mnt/WD-Elements-25A1/src/gcc-mirror-git/mingw-objdir/gcc/testsuite/g++/../../xg++
-B/mnt/WD-Elements-25A1/src/gcc-mirror-git/mingw-objdir/gcc/testsuite/g++/../../
/mnt/sdd1/home/src/gcc-mirror-git/gcc/gcc/testsuite/g++.dg/cpp1y/auto-fn61.C   
-fdiagnostics-plain-output  -nostdinc++
-I/mnt/sdd1/home/src/gcc-mirror-git/mingw-objdir/x86_64-w64-mingw32/libstdc++-v3/include/x86_64-w64-mingw32
-I/mnt/sdd1/home/src/gcc-mirror-git/mingw-objdir/x86_64-w64-mingw32/libstdc++-v3/include
-I/mnt/sdd1/home/src/gcc-mirror-git/gcc/libstdc++-v3/libsupc++
-I/mnt/sdd1/home/src/gcc-mirror-git/gcc/libstdc++-v3/include/backward
-I/mnt/sdd1/home/src/gcc-mirror-git/gcc/libstdc++-v3/testsuite/util
-fmessage-length=0  -std=c++2a  -pedantic-errors -Wno-long-long  -S -o
auto-fn61.s(timeout = 300)
spawn -ignore SIGHUP
/mnt/WD-Elements-25A1/src/gcc-mirror-git/mingw-objdir/gcc/testsuite/g++/../../xg++
-B/mnt/WD-Elements-25A1/src/gcc-mirror-git/mingw-objdir/gcc/testsuite/g++/../../
/mnt/sdd1/home/src/gcc-mirror-git/gcc/gcc/testsuite/g++.dg/cpp1y/auto-fn61.C
-fdiagnostics-plain-output -nostdinc++
-I/mnt/sdd1/home/src/gcc-mirror-git/mingw-objdir/x86_64-w64-mingw32/libstdc++-v3/include/x86_64-w64-mingw32
-I/mnt/sdd1/home/src/gcc-mirror-git/mingw-objdir/x86_64-w64-mingw32/libstdc++-v3/include
-I/mnt/sdd1/home/src/gcc-mirror-git/gcc/libstdc++-v3/libsupc++
-I/mnt/sdd1/home/src/gcc-mirror-git/gcc/libstdc++-v3/include/backward
-I/mnt/sdd1/home/src/gcc-mirror-git/gcc/libstdc++-v3/testsuite/util
-fmessage-length=0 -std=c++2a -pedantic-errors -Wno-long-long -S -o auto-fn61.s
/mnt/sdd1/home/src/gcc-mirror-git/gcc/gcc/testsuite/g++.dg/cpp1y/auto-fn61.C:13:15:
internal compiler error: in poplevel_class, at cp/name-lookup.c:4112
0x5f01f1 poplevel_class()
/mnt/sdd1/home/src/gcc-mirror-git/gcc/gcc/cp/name-lookup.c:4112
0x654de8 popclass()
/mnt/sdd1/home/src/gcc-mirror-git/gcc/gcc/cp/class.c:7994
0x6f7a2b pop_inner_scope(tree_node*, tree_node*)
/mnt/sdd1/home/src/gcc-mirror-git/gcc/gcc/cp/name-lookup.c:4087
0x719fac cp_parser_class_specifier_1
/mnt/sdd1/home/src/gcc-mirror-git/gcc/gcc/cp/parser.c:24242
0x71af9b cp_parser_class_specifier
/mnt/sdd1/home/src/gcc-mirror-git/gcc/gcc/cp/parser.c:24543
0x71af9b cp_parser_type_specifier
/mnt/sdd1/home/src/gcc-mirror-git/gcc/gcc/cp/parser.c:17887
0x71bde9 cp_parser_decl_specifier_seq
/mnt/sdd1/home/src/gcc-mirror-git/gcc/gcc/cp/parser.c:14514
0x71cb24 cp_parser_simple_declaration
/mnt/sdd1/home/src/gcc-mirror-git/gcc/gcc/cp/parser.c:13771
0x7464e5 cp_parser_declaration
/mnt/sdd1/home/src/gcc-mirror-git/gcc/gcc/cp/parser.c:13591
0x746b51 cp_parser_translation_unit
/mnt/sdd1/home/src/gcc-mirror-git/gcc/gcc/cp/parser.c:4796
0x746b51 c_parse_file()
/mnt/sdd1/home/src/gcc-mirror-git/gcc/gcc/cp/parser.c:44397
0x8178ad c_common_parse_file()
/mnt/sdd1/home/src/gcc-mirror-git/gcc/gcc/c-family/c-opts.c:1196
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See  for instructions.
compiler exited with status 1
XFAIL: g++.dg/cpp1y/auto-fn61.C  -std=c++2a (internal compiler error)
PASS: g++.dg/cpp1y/auto-fn61.C  -std=c++2a (test for excess errors)

[Bug testsuite/97822] New: internal compiler error: in choose_baseaddr

2020-11-14 Thread vladimir.kokovic at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97822

Bug ID: 97822
   Summary: internal compiler error: in choose_baseaddr
   Product: gcc
   Version: unknown
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: testsuite
  Assignee: unassigned at gcc dot gnu.org
  Reporter: vladimir.kokovic at gmail dot com
  Target Milestone: ---

GIT_DIR=/mnt/WD-Elements-25A1/src/gcc-mirror-git/gcc/.git git describe HEAD
misc/first-auto-changelog-4144-gc283a711c85

Build a cross compiler for MinGW(gcc 10.2.0)

Executing on host:
/mnt/WD-Elements-25A1/src/gcc-mirror-git/mingw-objdir/gcc/xgcc
-B/mnt/WD-Elements-25A1/src/gcc-mirror-git/mingw-objdir/gcc/
/mnt/sdd1/home/src/gcc-mirror-git/gcc/gcc/testsuite/gcc.target/x86_64/abi/callabi/vaarg-1.c
   -fdiagnostics-plain-output   -std=gnu99  -lm  -o ./vaarg-1.exe(timeout =
300)
spawn -ignore SIGHUP
/mnt/WD-Elements-25A1/src/gcc-mirror-git/mingw-objdir/gcc/xgcc
-B/mnt/WD-Elements-25A1/src/gcc-mirror-git/mingw-objdir/gcc/
/mnt/sdd1/home/src/gcc-mirror-git/gcc/gcc/testsuite/gcc.target/x86_64/abi/callabi/vaarg-1.c
-fdiagnostics-plain-output -std=gnu99 -lm -o ./vaarg-1.exe
during RTL pass: pro_and_epilogue
/mnt/sdd1/home/src/gcc-mirror-git/gcc/gcc/testsuite/gcc.target/x86_64/abi/callabi/vaarg-1.c:
In function 'main':
/mnt/sdd1/home/src/gcc-mirror-git/gcc/gcc/testsuite/gcc.target/x86_64/abi/callabi/vaarg-1.c:47:1:
internal compiler error: in choose_baseaddr, at config/i386/i386.c:6867
0x5f21cd choose_baseaddr
/mnt/sdd1/home/src/gcc-mirror-git/gcc/gcc/config/i386/i386.c:6867
0xe00d44 ix86_emit_save_reg_using_mov
/mnt/sdd1/home/src/gcc-mirror-git/gcc/gcc/config/i386/i386.c:6911
0xe0c1f5 ix86_emit_save_sse_regs_using_mov
/mnt/sdd1/home/src/gcc-mirror-git/gcc/gcc/config/i386/i386.c:7000
0xe0d798 ix86_expand_prologue()
/mnt/sdd1/home/src/gcc-mirror-git/gcc/gcc/config/i386/i386.c:8672
0x1183bcb gen_prologue()
/mnt/sdd1/home/src/gcc-mirror-git/gcc/gcc/config/i386/i386.md:13789
0xe01596 target_gen_prologue
/mnt/sdd1/home/src/gcc-mirror-git/gcc/gcc/config/i386/i386.md:20570
0x8930ee make_prologue_seq
/mnt/sdd1/home/src/gcc-mirror-git/gcc/gcc/function.c:5795
0x8932b1 thread_prologue_and_epilogue_insns()
/mnt/sdd1/home/src/gcc-mirror-git/gcc/gcc/function.c:6009
0x893862 rest_of_handle_thread_prologue_and_epilogue
/mnt/sdd1/home/src/gcc-mirror-git/gcc/gcc/function.c:6500
0x893862 execute
/mnt/sdd1/home/src/gcc-mirror-git/gcc/gcc/function.c:6576
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See  for instructions.
compiler exited with status 1
FAIL: gcc.target/x86_64/abi/callabi/vaarg-1.c (internal compiler error)
FAIL: gcc.target/x86_64/abi/callabi/vaarg-1.c (test for excess errors)
Excess errors:
during RTL pass: pro_and_epilogue
/mnt/sdd1/home/src/gcc-mirror-git/gcc/gcc/testsuite/gcc.target/x86_64/abi/callabi/vaarg-1.c:47:1:
internal compiler error: in choose_baseaddr, at config/i386/i386.c:6867
0x5f21cd choose_baseaddr
/mnt/sdd1/home/src/gcc-mirror-git/gcc/gcc/config/i386/i386.c:6867
0xe00d44 ix86_emit_save_reg_using_mov
/mnt/sdd1/home/src/gcc-mirror-git/gcc/gcc/config/i386/i386.c:6911
0xe0c1f5 ix86_emit_save_sse_regs_using_mov
/mnt/sdd1/home/src/gcc-mirror-git/gcc/gcc/config/i386/i386.c:7000
0xe0d798 ix86_expand_prologue()
/mnt/sdd1/home/src/gcc-mirror-git/gcc/gcc/config/i386/i386.c:8672
0x1183bcb gen_prologue()
/mnt/sdd1/home/src/gcc-mirror-git/gcc/gcc/config/i386/i386.md:13789
0xe01596 target_gen_prologue
/mnt/sdd1/home/src/gcc-mirror-git/gcc/gcc/config/i386/i386.md:20570
0x8930ee make_prologue_seq
/mnt/sdd1/home/src/gcc-mirror-git/gcc/gcc/function.c:5795
0x8932b1 thread_prologue_and_epilogue_insns()
/mnt/sdd1/home/src/gcc-mirror-git/gcc/gcc/function.c:6009
0x893862 rest_of_handle_thread_prologue_and_epilogue
/mnt/sdd1/home/src/gcc-mirror-git/gcc/gcc/function.c:6500
0x893862 execute
/mnt/sdd1/home/src/gcc-mirror-git/gcc/gcc/function.c:6576
UNRESOLVED: gcc.target/x86_64/abi/callabi/vaarg-1.c compilation failed to
produce executable

Excess errors:
during RTL pass: pro_and_epilogue
/mnt/sdd1/home/src/gcc-mirror-git/gcc/gcc/testsuite/gcc.target/x86_64/abi/callabi/vaarg-1.c:47:1:
internal compiler error: in choose_baseaddr, at config/i386/i386.c:6867
0x5f21cd choose_baseaddr
/mnt/sdd1/home/src/gcc-mirror-git/gcc/gcc/config/i386/i386.c:6867
0xe00d44 ix86_emit_save_reg_using_mov
/mnt/sdd1/home/src/gcc-mirror-git/gcc/gcc/config/i386/i386.c:6911
0xe0c1f5 ix86_emit_save_sse_regs_using_mov
/mnt/sdd1/home/src/gcc-mirror-git/gcc/gcc/config/i386/i386.c:7000
0xe0d798 ix86_expand_prologue()
/mnt/sdd1/home/src/gcc-mirror-git/gcc/gcc/config/i386/i386.c:8672
0x1183bcb gen_prologue()

[Bug debug/97599] [8/9/10/11 Regression] missing unspecified_parameters DIE in DWARF for functions with variable arguments

2020-11-14 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97599

--- Comment #6 from CVS Commits  ---
The master branch has been updated by Jakub Jelinek :

https://gcc.gnu.org/g:2873c8af66e1248734bb638a49e6bc53f5e45382

commit r11-5028-g2873c8af66e1248734bb638a49e6bc53f5e45382
Author: Jakub Jelinek 
Date:   Sat Nov 14 09:14:19 2020 +0100

dwarf2: Emit DW_TAG_unspecified_parameters even in late DWARF [PR97599]

Aldy's PR71855 fix avoided emitting multiple redundant
DW_TAG_unspecified_parameters sub-DIEs of a single DIE by restricting
it to early dwarf only.  That unfortunately means if we need to emit
another DIE for the function (whether it is for LTO, or e.g. because of
IPA cloning), we don't emit DW_TAG_unspecified_parameters, it remains
solely in the DW_AT_abstract_origin's referenced DIE.
But DWARF consumers don't really use DW_TAG_unspecified_parameters
from there, like we duplicate DW_TAG_formal_parameter sub-DIEs even in the
clones because either they have some more specific location, or e.g.
a function clone could have fewer or different argument types etc.,
they need to assume that originally stdarg function isn't later stdarg etc.
Unfortunately, while for DW_TAG_formal_parameter sub-DIEs, we can use the
hash tabs to look the PARM_DECLs if we already have the DIEs, for
DW_TAG_unspecified_parameters we don't have an easy way to look it up.

The following patch handles it by trying to figure out if we are creating a
fresh new DIE (in that case we add DW_TAG_unspecified_parameters if it is
stdarg), or if gen_subprogram_die is called again on an pre-existing DIE
to fill in some further details (then it will not touch it).

Except for lto, subr_die != old_die would be good enough, but unfortunately
for LTO the new DIE that will refer to early dwarf created DIE is created
on the fly during lookup_decl_die.  So the patch tracks if the DIE has
no children before any children are added to it.

2020-11-14  Jakub Jelinek  

PR debug/97599
* dwarf2out.c (gen_subprogram_die): Call
gen_unspecified_parameters_die even if not early dwarf, but only
if subr_die is a newly created DIE.