[Bug middle-end/40028] RFE - Add GPU acceleration library to gcc

2021-08-27 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=40028

--- Comment #5 from Andrew Pinski  ---
GCC supports offloading to some GPUs now. I don't know if this enough to close
this bug though.  It has support this feature for a few years now too.

[Bug middle-end/48439] gcc fails to resume the normal treatment when -isystem has finished

2021-08-27 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=48439

Andrew Pinski  changed:

   What|Removed |Added

  Component|driver  |middle-end
 Status|UNCONFIRMED |RESOLVED
   Target Milestone|--- |10.0
 Resolution|--- |WONTFIX

--- Comment #2 from Andrew Pinski  ---
The warning was removed at r10-3027 with the removal of those two options so I
am just going to close as won't fix.
This might have been fixed in another way too anyways.

[Bug middle-end/48027] setmem pattern using undesirable RTL

2021-08-27 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=48027

Andrew Pinski  changed:

   What|Removed |Added

 Ever confirmed|0   |1
   Last reconfirmed||2021-08-28
   Keywords||internal-improvement
 Status|UNCONFIRMED |NEW

--- Comment #2 from Andrew Pinski  ---
Confirmed.

avr.md is an example still:
(define_insn "*clrmemqi"
  [(set (mem:BLK (match_operand:HI 0 "register_operand" "e"))
(const_int 0))

pa.md too:
(define_insn "clrmemsi_prereload"
  [(set (mem:BLK (match_operand:SI 0 "register_operand" "r,r"))
(const_int 0))

s390.md:
(define_insn "*clrmem_short"
  [(set (match_operand:BLK 0 "memory_operand" "=Q,Q,Q,Q")
(const_int 0))

[Bug plugins/59335] Plugin doesn't build on trunk

2021-08-27 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=59335

Andrew Pinski  changed:

   What|Removed |Added

 CC||sje at cup dot hp.com

--- Comment #31 from Andrew Pinski  ---
*** Bug 45346 has been marked as a duplicate of this bug. ***

[Bug plugins/45346] hard-reg-set.h needs to be in the plugin include directory

2021-08-27 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=45346

Andrew Pinski  changed:

   What|Removed |Added

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

--- Comment #4 from Andrew Pinski  ---
Dup of bug 59335 and many others.

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

[Bug middle-end/46143] __attribute__((optimize)) emits wrong code

2021-08-27 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=46143

Andrew Pinski  changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 Resolution|--- |FIXED
   Target Milestone|--- |8.0

--- Comment #8 from Andrew Pinski  ---
Closing as fixed.

[Bug target/45478] __attribute__((__target__())) causes crashes at various places

2021-08-27 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=45478

Andrew Pinski  changed:

   What|Removed |Added

 Resolution|--- |FIXED
   Keywords||ice-on-valid-code
 Status|UNCONFIRMED |RESOLVED
   Target Milestone|--- |5.0

--- Comment #6 from Andrew Pinski  ---
These have been fixed for a long time. At least since GCC 5.
Many were fixed in GCC 4.6.  I am not going to go through each one and anonate
which testcase was fixed when but they all work for GCC 5 which was released 6
years ago.

[Bug c/45881] bit offset of bitfields

2021-08-27 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=45881

Andrew Pinski  changed:

   What|Removed |Added

 Ever confirmed|0   |1
 Status|UNCONFIRMED |NEW
   Last reconfirmed||2021-08-28

--- Comment #1 from Andrew Pinski  ---
I thought I saw a paper about adding this and even bit sized types.

[Bug target/65373] [SH] Implement bit counting built-in functions

2021-08-27 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65373

Andrew Pinski  changed:

   What|Removed |Added

   Keywords||missed-optimization
 Status|UNCONFIRMED |NEW
   Last reconfirmed||2021-08-28
 Ever confirmed|0   |1
   Severity|normal  |enhancement

--- Comment #1 from Andrew Pinski  ---
Confirmed.

[Bug target/65266] [SH] Use rotcl for bit reversals

2021-08-27 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65266

Andrew Pinski  changed:

   What|Removed |Added

   Keywords||missed-optimization
   Severity|normal  |enhancement

[Bug preprocessor/31186] -I/usr/include not taken into account

2021-08-27 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=31186

Andrew Pinski  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |INVALID

--- Comment #5 from Andrew Pinski  ---
The remaining environment variables apply only when preprocessing the
particular language indicated. Each specifies a list of directories to be
searched as if specified with -isystem, but after any paths given with -isystem
options on the command line.

If a standard system include directory, or a directory specified with -isystem,
is also specified with -I, the -I option is ignored. The directory is still
searched but as a system directory at its normal position in the system include
chain. This is to ensure that GCC’s procedure to fix buggy system headers and
the ordering for the #include_next directive are not inadvertently changed. If
you really need to change the search order for system directories, use the
-nostdinc and/or -isystem options. See System Headers.


This part specifically:
 If you really need to change the search order for system directories, use the
-nostdinc and/or -isystem options.

[Bug preprocessor/31763] cc1plus fails to find some headers when include paths are duplicated

2021-08-27 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=31763

Andrew Pinski  changed:

   What|Removed |Added

 Resolution|--- |INVALID
 Status|UNCONFIRMED |RESOLVED

--- Comment #4 from Andrew Pinski  ---
Invalid as documented.

[Bug preprocessor/31763] cc1plus fails to find some headers when include paths are duplicated

2021-08-27 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=31763

--- Comment #3 from Andrew Pinski  ---
(In reply to Joseph S. Myers from comment #2)
> This is user error setting environment variables in a way that interferes
> with the ordering of the compiler's internal directories.  However, I'm
> not sure if it's deliberate that the environment variables do not act
> like -I options in this regard, or whether these settings should have been
> ignored just like -I/usr/include is ignored.

that is because C_INCLUDE_PATH is like isystem and not -I. And this is
documented too:
The remaining environment variables apply only when preprocessing the
particular language indicated. Each specifies a list of directories to be
searched as if specified with -isystem, but after any paths given with -isystem
options on the command line.

[Bug target/39123] x86-32 asm *(a+b) input causes out of registers above -O0

2021-08-27 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=39123

Andrew Pinski  changed:

   What|Removed |Added

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

--- Comment #2 from Andrew Pinski  ---
>above -O0 one of the inputs in the second version is combined into a complex 
>memory operand

There are so few registers existing for i?86, this inline-asm will never work.

This is a won't fix.

[Bug middle-end/36735] incomplete tree dump with "-fdump-tree-original-raw"

2021-08-27 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=36735

Andrew Pinski  changed:

   What|Removed |Added

 Ever confirmed|0   |1
 Status|UNCONFIRMED |NEW
   Last reconfirmed||2021-08-28
   Keywords||internal-improvement

--- Comment #6 from Andrew Pinski  ---
Confirmed, still an issue today.

[Bug c++/96309] Substitution failure doesn't propagate through the typename of a template value parameter

2021-08-27 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96309

Andrew Pinski  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2021-08-28
 Ever confirmed|0   |1

--- Comment #1 from Andrew Pinski  ---
Confirmed.

[Bug c++/71954] template partial specialization for constexpr error

2021-08-27 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71954

Andrew Pinski  changed:

   What|Removed |Added

   Keywords||rejects-valid

--- Comment #4 from Andrew Pinski  ---
Reduced testcase from the other bug:

struct Struct {
template 
constexpr static bool use_cond = false;
template 
constexpr static bool use_cond = true;
};

[Bug c++/71954] template partial specialization for constexpr error

2021-08-27 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71954

Andrew Pinski  changed:

   What|Removed |Added

 CC||redbeard0531 at gmail dot com

--- Comment #3 from Andrew Pinski  ---
*** Bug 90031 has been marked as a duplicate of this bug. ***

[Bug c++/90031] Bogus parse error trying to explicitly specialize a template variable inside class scope

2021-08-27 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90031

Andrew Pinski  changed:

   What|Removed |Added

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

--- Comment #3 from Andrew Pinski  ---
Dup of bug 71954.

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

[Bug c++/39906] Accepted invalid member template specialization in derived class

2021-08-27 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=39906

--- Comment #3 from Andrew Pinski  ---
Even more shocking this works on all compilers:
int t1;
Derived::Kind::type  = t1;
Base::Kind::type  = t1;

[Bug c++/67228] Template partial ordering failure ambiguous overload

2021-08-27 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67228

Andrew Pinski  changed:

   What|Removed |Added

   See Also||https://gcc.gnu.org/bugzill
   ||a/show_bug.cgi?id=58354

--- Comment #2 from Andrew Pinski  ---
(In reply to Alisdair Meredith from comment #1)
the testcase in comment #1 is a dup of bug 58354. The testcase in comment #0
still fails on the trunk.

[Bug c++/58354] variadic template ambiguous

2021-08-27 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=58354

Andrew Pinski  changed:

   What|Removed |Added

 CC||vexocide at gmail dot com

--- Comment #7 from Andrew Pinski  ---
*** Bug 59135 has been marked as a duplicate of this bug. ***

[Bug c++/59135] Incorrect ambiguity in constexpr function overloads

2021-08-27 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=59135

Andrew Pinski  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |DUPLICATE

--- Comment #4 from Andrew Pinski  ---
Dup of bug 58354.

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

[Bug c++/58354] variadic template ambiguous

2021-08-27 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=58354

Andrew Pinski  changed:

   What|Removed |Added

 CC||oknenavin at outlook dot com

--- Comment #6 from Andrew Pinski  ---
*** Bug 90642 has been marked as a duplicate of this bug. ***

[Bug c++/90642] g++ fails to resolve template function overload

2021-08-27 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90642

Andrew Pinski  changed:

   What|Removed |Added

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

--- Comment #6 from Andrew Pinski  ---
Dup of bug 58354.

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

[Bug c++/58354] variadic template ambiguous

2021-08-27 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=58354

Andrew Pinski  changed:

   What|Removed |Added

 CC||lumosimann at gmail dot com

--- Comment #5 from Andrew Pinski  ---
*** Bug 89085 has been marked as a duplicate of this bug. ***

[Bug c++/89085] call of overload is ambiguous with parameter packs

2021-08-27 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89085

Andrew Pinski  changed:

   What|Removed |Added

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

--- Comment #3 from Andrew Pinski  ---
Dup of bug 58354

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

[Bug c++/58354] variadic template ambiguous

2021-08-27 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=58354

Andrew Pinski  changed:

   What|Removed |Added

 CC||rbock at eudoxos dot de

--- Comment #4 from Andrew Pinski  ---
*** Bug 77449 has been marked as a duplicate of this bug. ***

[Bug c++/77449] False ambiguity for variadic function with non-deduced template parameter

2021-08-27 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77449

Andrew Pinski  changed:

   What|Removed |Added

 Resolution|--- |DUPLICATE
 Status|NEW |RESOLVED

--- Comment #4 from Andrew Pinski  ---
Dup of bug 58354.

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

[Bug c++/89156] Templated member function has DEFAULT visibility although instantiating class has not

2021-08-27 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89156

Andrew Pinski  changed:

   What|Removed |Added

   Last reconfirmed||2021-08-28
 Status|UNCONFIRMED |NEW
 Ever confirmed|0   |1

--- Comment #2 from Andrew Pinski  ---
Confirmed; this seems wrong and could cause classes crossing over between "ODR"
boundaries which is what hidden is supposed to solve.

[Bug target/102105] x86_64: ABI break with vector in union and -mno-mmx -mavx

2021-08-27 Thread hjl.tools at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102105

H.J. Lu  changed:

   What|Removed |Added

Version|unknown |9.4.1
Summary|[10/11/12 Regression]   |x86_64: ABI break with
   |x86_64: ABI break with  |vector in union and
   |vector in union and |-mno-mmx -mavx
   |-mno-mmx -mavx  |

--- Comment #2 from H.J. Lu  ---
I consider this is a GCC 9 bug:

[hjl@gnu-cfl-2 pr102105]$ cat foo.c
extern __attribute__((__vector_size__(8))) long long g_v1di;
void pass_v1di( __attribute__((__vector_size__(8))) long long);
void test_v1di() { pass_v1di(g_v1di); }
[hjl@gnu-cfl-2 pr102105]$ /usr/gcc-9.3.1-x32/bin/gcc -S -O2 foo.c
[hjl@gnu-cfl-2 pr102105]$ cat foo.s
.file   "foo.c"
.text
.p2align 4
.globl  test_v1di
.type   test_v1di, @function
test_v1di:
.LFB0:
.cfi_startproc
movqg_v1di(%rip), %xmm0
jmp pass_v1di
.cfi_endproc
.LFE0:
.size   test_v1di, .-test_v1di
.ident  "GCC: (GNU) 9.3.1 20200312"
.section.note.GNU-stack,"",@progbits
[hjl@gnu-cfl-2 pr102105]$ /usr/gcc-9.3.1-x32/bin/gcc -S -O2 foo.c -mno-mmx
[hjl@gnu-cfl-2 pr102105]$ cat foo.s
.file   "foo.c"
.text
.p2align 4
.globl  test_v1di
.type   test_v1di, @function
test_v1di:
.LFB0:
.cfi_startproc
movqg_v1di(%rip), %rdi
jmp pass_v1di
.cfi_endproc
.LFE0:
.size   test_v1di, .-test_v1di
.ident  "GCC: (GNU) 9.3.1 20200312"
.section.note.GNU-stack,"",@progbits
[hjl@gnu-cfl-2 pr102105]$ 

Since MMX register isn't used, -mno-mmx shouldn't change ABI.

[Bug c++/84075] Template parameter not resolved: invalid application of ‘sizeof’ to incomplete type ‘boost::serialization::U’

2021-08-27 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84075

--- Comment #11 from Andrew Pinski  ---
(In reply to ensadc from comment #4)
> Further reduced:
> 
> template < int > struct b { };
> template < typename n > struct g {
>   typedef b< sizeof(n) > l;
> };
> template < typename h, typename = typename g< h >::l > class aa {};
> template < typename h, typename bz >
> void bj(aa< h, bz >, int);
> template < template < class > class ct > void bj(ct< class U >);
> void f() {
>   bj(aa(), 0);
> }
> 

Hmm, it comes with -std=c++11 and -std=c++14 but not -std=c++17.

[Bug c++/89299] __attribute__ cleanup does not accept template function

2021-08-27 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89299

--- Comment #7 from Andrew Pinski  ---
The issue is we don't do any overload resolution for the function in cleanup
attribute; most likely because the attribute was originally added for C.  Also
in C++ you could just use a wrapper class to do the same thing.

take:
void cu_char( char** s ) {
if ( s && *s ) { free ( *s ); }
}
void cu_char( int** s ) {
if ( s && *s ) { free ( *s ); }
}
int main() {
__attribute__((cleanup(cu_char))) char* s = nullptr;
return 0;
}

For C++ you could something like:
#include 

template 
struct cleanup_class
{
  T a;
  void (*f)(T*);
  cleanup_class(void (*f1)(T*))
  : a{}, f(f1) {  }
  cleanup_class(T , void (*f1)(T*))
  : a(b), f(f1) {  }
  cleanup_class(cleanup_class&) = delete;
  cleanup_class(cleanup_class&&) = delete;
  ~cleanup_class() { f();}
  operator T&() { return a; }
  T  =(const T ) { return a = b;}
};


template 
void cu( T** p ) {
if ( p && *p ) { free( *p ); }
}

int main() {
cleanup_class t(cu);
t = 0;
return 0;
}

Note this is not the best code, just the quick I wrote up.

[Bug c++/98637] Changing active union member via assignment expression should require trivial default constructor in constexpr context

2021-08-27 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98637

Andrew Pinski  changed:

   What|Removed |Added

 Ever confirmed|0   |1
 Status|UNCONFIRMED |NEW
   Last reconfirmed||2021-08-28

--- Comment #1 from Andrew Pinski  ---
Confirmed.

[Bug bootstrap/100490] gcc 11.1.0 hangs forever while building its own libstdc++ (c++17 floating_from_chars.cc) on aarch64 linux

2021-08-27 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100490

Andrew Pinski  changed:

   What|Removed |Added

 Resolution|--- |WORKSFORME
 Status|WAITING |RESOLVED

--- Comment #2 from Andrew Pinski  ---
No feedback in over 3 months and the build has been working for me and others 
GMP and MPFR are known to have been miscompiled before too.

[Bug c++/99901] [9 Regression] static const class var implemented with constexpr doesn't emit symbols in C++17 mode

2021-08-27 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99901

Andrew Pinski  changed:

   What|Removed |Added

 CC||m101010a at gmail dot com

--- Comment #9 from Andrew Pinski  ---
*** Bug 90161 has been marked as a duplicate of this bug. ***

[Bug c++/90161] GCC does not always dllexport constexpr member variables in C++17 mode

2021-08-27 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90161

Andrew Pinski  changed:

   What|Removed |Added

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

--- Comment #1 from Andrew Pinski  ---
Fixed in GCC 9.5.  See dup PR 99901.

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

[Bug c++/55004] [meta-bug] constexpr issues

2021-08-27 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=55004
Bug 55004 depends on bug 96182, which changed state.

Bug 96182 Summary: GCC accepts constexpr function with no return-statement
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96182

   What|Removed |Added

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

[Bug c++/96182] GCC accepts constexpr function with no return-statement

2021-08-27 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96182

Andrew Pinski  changed:

   What|Removed |Added

 Blocks||55004
 Resolution|--- |FIXED
 Status|NEW |RESOLVED
   Target Milestone|--- |11.0

--- Comment #8 from Andrew Pinski  ---
Fixed so closing.


Referenced Bugs:

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=55004
[Bug 55004] [meta-bug] constexpr issues

[Bug c++/55004] [meta-bug] constexpr issues

2021-08-27 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=55004
Bug 55004 depends on bug 93668, which changed state.

Bug 93668 Summary: constexpr delete[]
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93668

   What|Removed |Added

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

[Bug c++/95808] Can mismatch non-array new/delete with array new/delete during constant evaluation

2021-08-27 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95808

Andrew Pinski  changed:

   What|Removed |Added

 CC||euloanty at live dot com

--- Comment #5 from Andrew Pinski  ---
*** Bug 93668 has been marked as a duplicate of this bug. ***

[Bug c++/93668] constexpr delete[]

2021-08-27 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93668

Andrew Pinski  changed:

   What|Removed |Added

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

--- Comment #8 from Andrew Pinski  ---
This is a dup of bug 95808 which is fixed for GCC 11.

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

[Bug c++/90814] gcc accept invalid constexpr defaulted constructor

2021-08-27 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90814

Andrew Pinski  changed:

   What|Removed |Added

   Last reconfirmed|2020-01-28 00:00:00 |2021-8-27

--- Comment #2 from Andrew Pinski  ---
Reduced testcase down to just this:
struct A {
  A() {}
};

struct D : A
{
  int& r;
  constexpr D() = default;
};

That is template does not matter.

[Bug c++/88201] lambda function fails to compile, when deactivated by a constexpr and deduced return type

2021-08-27 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88201

Andrew Pinski  changed:

   What|Removed |Added

   See Also||https://gcc.gnu.org/bugzill
   ||a/show_bug.cgi?id=93442
 Resolution|--- |FIXED
 Status|UNCONFIRMED |RESOLVED

--- Comment #1 from Andrew Pinski  ---
Fixed for GCC 9.3.0 and GCC 10+ by the patch which fixes PR 93442.

[Bug c++/55004] [meta-bug] constexpr issues

2021-08-27 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=55004
Bug 55004 depends on bug 54483, which changed state.

Bug 54483 Summary: undefined reference to static constexpr in .so
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=54483

   What|Removed |Added

 Status|REOPENED|RESOLVED
 Resolution|--- |INVALID

[Bug c++/54483] undefined reference to static constexpr in .so

2021-08-27 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=54483

Andrew Pinski  changed:

   What|Removed |Added

 Status|REOPENED|RESOLVED
 Resolution|--- |INVALID

--- Comment #11 from Andrew Pinski  ---
(In reply to Mitsuru Kariya from comment #9)
> (In reply to Juisoo from comment #8)
> > However, if I add another data member which is initialized with val by
> > default, I still get the "undefined reference" error, see second attachment.
> 
> The second testcase is reduced like below.
> 
> == testcase ==
> struct A {
> static constexpr float val = 0.08;
> A(const float& = val) {}
> };
> 
> int main()
> {
> A{};
> }
> == testcase ==
> cf. http://melpon.org/wandbox/permlink/ZCbNwLlPQakWjluY

You still need:
constexpr float A::val;

[Bug c++/80507] [C++17] static variable definition not emitted with -std=c++1z when defined as constexpr

2021-08-27 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80507

--- Comment #5 from Andrew Pinski  ---
(In reply to Andrew Pinski from comment #4)
> This is a dup of bug 99901.
> 
> *** This bug has been marked as a duplicate of bug 99901 ***

I should say it will be fixed for 10.4.0 and GCC 11+.

[Bug c++/99901] [9 Regression] static const class var implemented with constexpr doesn't emit symbols in C++17 mode

2021-08-27 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99901

Andrew Pinski  changed:

   What|Removed |Added

 CC||arnaud02 at users dot 
sourceforge.
   ||net

--- Comment #8 from Andrew Pinski  ---
*** Bug 80507 has been marked as a duplicate of this bug. ***

[Bug c++/80507] [C++17] static variable definition not emitted with -std=c++1z when defined as constexpr

2021-08-27 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80507

Andrew Pinski  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |DUPLICATE

--- Comment #4 from Andrew Pinski  ---
This is a dup of bug 99901.

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

[Bug fortran/102112] New: Cannot associate with component of associate target

2021-08-27 Thread everythingfunctional at protonmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102112

Bug ID: 102112
   Summary: Cannot associate with component of associate target
   Product: gcc
   Version: 11.1.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: fortran
  Assignee: unassigned at gcc dot gnu.org
  Reporter: everythingfunctional at protonmail dot com
  Target Milestone: ---

I'm using version Ubuntu 11.1.0-1ubuntu1~21.04 on Pop!OS.

The compiler is rejecting valid code using associate, in this instance when
trying to associate to a component of a target in an associate. Note that this
also occurs when calling a type-bound procedure of the target.

program main
implicit none

type :: sub_t
integer :: val
end type

type :: obj_t
type(sub_t) :: sub_obj
end type

associate(initial_sub => sub_t(42))
associate(obj => obj_t(initial_sub))
associate(sub_obj => obj%sub_obj)
end associate
end associate
end associate
end program

gives

app/main.f90:14:33:

   14 | associate(sub_obj => obj%sub_obj)
  | 1
Error: Invalid association target at (1)

[Bug c++/90189] Spurious "error: parameter packs not expanded" when a dependent name coincides

2021-08-27 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90189

Andrew Pinski  changed:

   What|Removed |Added

 CC||jonathan.poelen at gmail dot 
com

--- Comment #3 from Andrew Pinski  ---
*** Bug 100718 has been marked as a duplicate of this bug. ***

[Bug c++/100718] parameter packs not expanded error with a type member which has the same name as a pack

2021-08-27 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100718

Andrew Pinski  changed:

   What|Removed |Added

 Resolution|--- |DUPLICATE
 Status|NEW |RESOLVED

--- Comment #2 from Andrew Pinski  ---
Dup of bug 90189.

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

[Bug c++/102097] Error in selecting more specialized function in case of ambiguity

2021-08-27 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102097

Andrew Pinski  changed:

   What|Removed |Added

   Keywords||rejects-valid
 Ever confirmed|0   |1
 Status|UNCONFIRMED |NEW
   Last reconfirmed||2021-08-27

--- Comment #1 from Andrew Pinski  ---
Here is a C++11 version of the same problem:
template
void fun(T&){}
template
void fun(T&&){}
int main() { void(*ptr)(int&) =  }

ICC accepts this one.

MSVC accepts both the original and this C++ version.

[Bug libfortran/102111] Segfault with associate to derived type with allocatable component

2021-08-27 Thread everythingfunctional at protonmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102111

--- Comment #2 from Brad Richardson  ---
Thanks for the for the confirmation. Glad to hear it is fixed in later
versions.

[Bug libfortran/102111] Segfault with associate to derived type with allocatable component

2021-08-27 Thread kargl at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102111

kargl at gcc dot gnu.org changed:

   What|Removed |Added

 CC||kargl at gcc dot gnu.org

--- Comment #1 from kargl at gcc dot gnu.org ---
(In reply to Brad Richardson from comment #0)
> I'm using version Ubuntu 11.1.0-1ubuntu1~21.04 on Pop!OS.
> 
> I suspect this is related to 102106, but fails every time instead of just
> intermittently.
> 
> program main
> type :: example_t
> integer, allocatable :: vals(:)
> end type
> 
> associate(example => example_t([42]))
> end associate
> end program

This appears to be fixed in HEAD.  I added 

   print *, example%vals

within the associate statement.  With gfortran 10.someversion, I
get

% gfortran10 -o z a.f90
% ./z

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

Backtrace for this error:
#0  0x80081f6bb in ???
#1  0x80081e876 in ???
#2  0x7192 in ???
#3  0x801093fa1 in ???
#4  0x400d8a in ???
#5  0x400e37 in ???
#6  0x40083f in ???

With HEAD, I get

% gfcx -o z a.f90
% ./z
  42

[Bug target/83143] [SH]: Assembler messages: invalid operands (*UND* and .text sections) for `-'

2021-08-27 Thread giulio.benetti at benettiengineering dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83143

--- Comment #16 from Giulio Benetti  ---
Thank you. Yes I've just tested "-freorder-blocks-algorithm=simple" solution of
gcc 9.x and 11.x with -Os enabled and it works perfectly.

By the way, is it useful for you if I provide .i and .s file with -save-temps?

[Bug c++/89580] overload resolution for pointers fails to consider conversion operator

2021-08-27 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89580

Andrew Pinski  changed:

   What|Removed |Added

 Ever confirmed|0   |1
   Last reconfirmed||2021-08-27
 Status|UNCONFIRMED |NEW

--- Comment #1 from Andrew Pinski  ---
Confirmed here is a C++98 version which shows this has always been an issue:
struct Foo {
  template  operator T() const;
};
Foo *a;
Foo t;
bool R = (t == a);

[Bug libfortran/102111] New: Segfault with associate to derived type with allocatable component

2021-08-27 Thread everythingfunctional at protonmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102111

Bug ID: 102111
   Summary: Segfault with associate to derived type with
allocatable component
   Product: gcc
   Version: 11.1.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: libfortran
  Assignee: unassigned at gcc dot gnu.org
  Reporter: everythingfunctional at protonmail dot com
  Target Milestone: ---

I'm using version Ubuntu 11.1.0-1ubuntu1~21.04 on Pop!OS.

I suspect this is related to 102106, but fails every time instead of just
intermittently.

program main
type :: example_t
integer, allocatable :: vals(:)
end type

associate(example => example_t([42]))
end associate
end program

[Bug c++/89287] [n3323] Array declaration fails to use template conversion operator

2021-08-27 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89287

--- Comment #4 from Andrew Pinski  ---
Looks like only part of n3323 was implemented.

[Bug c++/89287] [n3323] Array declaration fails to use template conversion operator

2021-08-27 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89287

Andrew Pinski  changed:

   What|Removed |Added

Summary|Array declaration fails to  |[n3323] Array declaration
   |use template conversion |fails to use template
   |operator|conversion operator

--- Comment #3 from Andrew Pinski  ---
Looks like n3323 was never implemented.

http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2012/n3323.pdf

Also note there is DR 1464 too.

[Bug c/101766] Microblaze gcc misses symver but __has_attribute(symver) returns true

2021-08-27 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101766

Andrew Pinski  changed:

   What|Removed |Added

 CC||hjl.tools at gmail dot com

--- Comment #4 from Andrew Pinski  ---
*** Bug 102110 has been marked as a duplicate of this bug. ***

[Bug target/102110] microblaze-linux doesn't use elfos.h

2021-08-27 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102110

Andrew Pinski  changed:

   What|Removed |Added

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

--- Comment #1 from Andrew Pinski  ---
Dup of bug 101766.

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

[Bug c++/89287] Array declaration fails to use template conversion operator

2021-08-27 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89287

Andrew Pinski  changed:

   What|Removed |Added

   Last reconfirmed||2021-08-27
 Ever confirmed|0   |1
 Status|UNCONFIRMED |NEW

--- Comment #2 from Andrew Pinski  ---
Confirmed.  Looks like C++14 changed it to do a conversion to size_t.

Obvious workaround:
new char[(size_t)S()];

The other thing I noticed is ICC accepts it for C++11 while rejects it for
C++98 which is unlike clang which rejects it for both C++98 and C++11.

There must have been a C++ defect report ...

[Bug target/102110] New: microblaze-linux doesn't use elfos.h

2021-08-27 Thread hjl.tools at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102110

Bug ID: 102110
   Summary: microblaze-linux doesn't use elfos.h
   Product: gcc
   Version: 12.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: target
  Assignee: unassigned at gcc dot gnu.org
  Reporter: hjl.tools at gmail dot com
  Target Milestone: ---
Target: microblaze-linux

Since microblaze-linux doesn't use elfos.h, some ELF features aren't enabled:

There are

config/elfos.h:#define ASM_OUTPUT_SYMVER_DIRECTIVE(FILE, NAME, NAME2)  \
varasm.c:#ifdef ASM_OUTPUT_SYMVER_DIRECTIVE
varasm.c:  ASM_OUTPUT_SYMVER_DIRECTIVE (asm_out_file,

For

void
__attribute__ ((symver ("foo@VERSION.1")))
foo ()
{
}

microblaze-linux GCC generates:

error: symver is only supported on ELF platforms

[Bug fortran/102109] New: Associate to construct compound object results in incorrect type inferred

2021-08-27 Thread everythingfunctional at protonmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102109

Bug ID: 102109
   Summary: Associate to construct compound object results in
incorrect type inferred
   Product: gcc
   Version: 11.1.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: fortran
  Assignee: unassigned at gcc dot gnu.org
  Reporter: everythingfunctional at protonmail dot com
  Target Milestone: ---

Using version Ubuntu 11.1.0-1ubuntu1~21.04 on Pop!OS

Using nested associate constructs to construct a compound object of derived
type results in the compiler rejecting the code with what it thinks is a type
mismatch. Example code below

program main
type :: sub_obj_t
integer :: val
end type

type :: compound_obj_t
type(sub_obj_t) :: sub_obj
end type

associate(initial_sub_obj => sub_obj_t(42))
associate(obj => compound_obj_t(initial_sub_obj))
print *, obj%sub_obj%val
end associate
end associate
end program

app/main.f90:11:40:

   11 | associate(obj => compound_obj_t(initial_sub_obj))
  |1
Error: Cannot convert INTEGER(4) to TYPE(sub_obj_t) at (1)


Note: for a fun twist, if you remove the print statement, this does compile and
run.

[Bug c++/89050] [8 Regression] GCC sometimes requires this to be captured when doing overload resolution but selecting a static member function

2021-08-27 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89050

Andrew Pinski  changed:

   What|Removed |Added

Summary|GCC sometimes requires this |[8 Regression] GCC
   |to be captured when doing   |sometimes requires this to
   |overload resolution but |be captured when doing
   |selecting a static member   |overload resolution but
   |function|selecting a static member
   ||function
   See Also||https://gcc.gnu.org/bugzill
   ||a/show_bug.cgi?id=86610
 Status|NEW |RESOLVED
 Resolution|--- |FIXED
   Target Milestone|--- |8.3

--- Comment #2 from Andrew Pinski  ---
Fixed for GCC 8.3.0.  Most likely Due to the patch for PR 86610.

Note this was a regression in GCC 8.1.0 and 8.2.0 only; most likely caused by
r255605 .

[Bug target/102105] [10/11/12 Regression] x86_64: ABI break with vector in union and -mno-mmx -mavx

2021-08-27 Thread hjl.tools at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102105

H.J. Lu  changed:

   What|Removed |Added

 Ever confirmed|0   |1
   Last reconfirmed||2021-08-27
 CC|hjl at gcc dot gnu.org |hjl.tools at gmail dot 
com
 Status|UNCONFIRMED |NEW

[Bug target/83143] [SH]: Assembler messages: invalid operands (*UND* and .text sections) for `-'

2021-08-27 Thread glaubitz at physik dot fu-berlin.de via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83143

--- Comment #15 from John Paul Adrian Glaubitz  ---
(In reply to Giulio Benetti from comment #14)
> This bug still shows up in gcc version 9.x and 11.x. But not on version 10.x
> I've found the simple work-around to disable the optimization(override
> CFLAGS with -O0) and it works.

That removes too many optimizations. As explained in comment 5 [1], it should
be enough to add "-freorder-blocks-algorithm=simple" instead of just removing
all optimizations.

> [1] https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83143#c5

[Bug c++/102092] [C++2b] Passing argument to auto template parameter modifies the value of argument inside function

2021-08-27 Thread davveston at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102092

--- Comment #3 from David Friberg  ---
(In reply to David Friberg from comment #2)
> I believe your program has UB as it contains an odr-violation due to the
> friend declaration of the stream operator function , as its in-class
> definition ("hidden friend") makes use of the non-type template parameter
> 'Degree'. 
> 
> The hidden friend, albeit being inline (protection against multiple-TU
> odr-violations, given token-by-token identical definitions), will have
> multiple definitions that are not the same as soon as two specializations of
> the class template 'Polynomial' are instantiated if these two
> specializations differ in the 'Degree' template parameter.
> 
> Recall that a non-template friend of a class template is in itself not a
> templated entity, but a namespace-scope function.

Never mind, I realized the hidden friend uses the class template as an
argument, though, so each specialization will instantiate a separate overload,
so I guess there will be no odr-violation Nafter all.

[Bug target/102108] New: [meta] ABI change due to SSE emulation of MMX

2021-08-27 Thread hjl.tools at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102108

Bug ID: 102108
   Summary: [meta] ABI change due to SSE emulation of MMX
   Product: gcc
   Version: 12.0
Status: UNCONFIRMED
  Keywords: meta-bug
  Severity: normal
  Priority: P3
 Component: target
  Assignee: unassigned at gcc dot gnu.org
  Reporter: hjl.tools at gmail dot com
Depends on: 102027, 102105
  Target Milestone: ---
Target: x86-64

There are calls to vector_mode_supported_p in stor-layout which changes the
TYPE_MODE of the RECORD_TYPE depending on if vector_mode_supported_p returns
true or not and classify_argument depends on TYPE_MODE in some cases.

Most back-ends moved away from looking at TYPE_MODE for argument passing long
time ago. I can understand why you might want to stay with that I don't think
anyone should depend on TYPE_MODE for argument passing any more.


Referenced Bugs:

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102027
[Bug 102027] [11/12 Regression] ABI break when using vector type in function
arg/return value
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102105
[Bug 102105] [10/11/12 Regression] x86_64: ABI break with vector in union and
-mno-mmx -mavx

[Bug target/83143] [SH]: Assembler messages: invalid operands (*UND* and .text sections) for `-'

2021-08-27 Thread giulio.benetti at benettiengineering dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83143

--- Comment #14 from Giulio Benetti  ---
This bug still shows up in gcc version 9.x and 11.x. But not on version 10.x
I've found the simple work-around to disable the optimization(override CFLAGS
with -O0) and it works.

[Bug c++/102092] [C++2b] Passing argument to auto template parameter modifies the value of argument inside function

2021-08-27 Thread davveston at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102092

David Friberg  changed:

   What|Removed |Added

 CC||davveston at gmail dot com

--- Comment #2 from David Friberg  ---
I believe your program has UB as it contains an odr-violation due to the friend
declaration of the stream operator function , as its in-class definition
("hidden friend") makes use of the non-type template parameter 'Degree'. 

The hidden friend, albeit being inline (protection against multiple-TU
odr-violations, given token-by-token identical definitions), will have multiple
definitions that are not the same as soon as two specializations of the class
template 'Polynomial' are instantiated if these two specializations differ in
the 'Degree' template parameter.

Recall that a non-template friend of a class template is in itself not a
templated entity, but a namespace-scope function.

[Bug c++/86431] defining static member cannot be used in sizeof/decltype while initializing

2021-08-27 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86431

Andrew Pinski  changed:

   What|Removed |Added

   Last reconfirmed|2018-07-07 00:00:00 |2021-8-27

--- Comment #2 from Andrew Pinski  ---
Another example:


 struct A { 
 static int const B = decltype(B){0}; 
 };

Note ICC and MSVC both reject these examples for the same reason as GCC does
...

[Bug target/102107] protocol register (r12) corrupted before a tail call

2021-08-27 Thread pc at us dot ibm.com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102107

--- Comment #2 from Paul Clarke  ---
Created attachment 51369
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=51369=edit
creduced version (tiny, but ugly)

[Bug target/102107] protocol register (r12) corrupted before a tail call

2021-08-27 Thread pc at us dot ibm.com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102107

Paul Clarke  changed:

   What|Removed |Added

  Attachment #51367|0   |1
is obsolete||

--- Comment #1 from Paul Clarke  ---
Created attachment 51368
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=51368=edit
preprocessed source (large)

Attach correct file. :-/

[Bug target/102107] New: protocol register (r12) corrupted before a tail call

2021-08-27 Thread pc at us dot ibm.com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102107

Bug ID: 102107
   Summary: protocol register (r12) corrupted before a tail call
   Product: gcc
   Version: 11.2.1
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: target
  Assignee: unassigned at gcc dot gnu.org
  Reporter: pc at us dot ibm.com
  Target Milestone: ---

Created attachment 51367
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=51367=edit
preprocessed source (large)

I've been working on an effort to improve Python performance, and hit an issue
when running with a libpython.so that was built with "-mcpu=power10". The
problem appears to be not correctly setting up (and preserving) register 12
before calling into a dynamically loaded, non-PCrel Python module in the form
of a shared object.

GDB shows the following instruction stream:
=> 0x77d25014 :ld  r12,0(r9)
=> 0x77d25018 :addir1,r1,112
r120x7fffe921af60  140737104686944
=> 0x77d2501c :std r10,0(r30)
=> 0x77d25020 :ld  r3,8(r9)
=> 0x77d25024 :ld  r9,0(r31)
=> 0x77d25028 :ld  r29,-24(r1)
=> 0x77d2502c :ld  r30,-16(r1)
=> 0x77d25030 :mtctr   r12
=> 0x77d25034 :lwz r12,8(r1)
r120x4000  16384
=> 0x77d25038 :addir9,r9,1
=> 0x77d2503c :std r9,0(r31)
=> 0x77d25040 :ld  r31,-8(r1)
=> 0x77d25044 :mtocrf  8,r12
=> 0x77d25048 :bctr
=> 0x7fffe921af60 :addis   r2,r12,4  
=> 0x7fffe921af64 :  addir2,r2,-12384
=> 0x7fffe921af68 :  nop
=> 0x7fffe921af6c : ld  r3,-32728(r2)
Program received signal SIGSEGV, Segmentation fault.
0x7fffe921af6c in _Py_INCREF (op=) at
../Python-3.9.6/Include/object.h:408
408 op->ob_refcnt++;

After setting r12 to the address of the caller (0x77d25014), the load at
0x77d25034 overwrites it with the CR save value just before the tail call
(bctr) at 0x77d25048, resulting in the badness when setting up and using
the TOC.

I suspect some sort of instruction scheduling issue?

I've attached a rather large pre-processed C file. It's complicated to reduce
because of functions calling other functions. I gave "creduce" a shot at it,
but it's challenging (for me, at least) to craft a script that knows what to
look for. I'll also attach the best I could get from creduce, but shield your
eyes before looking at it.

[Bug libfortran/102106] New: Intermittent Segfault with associate to derived type with polymorphic component

2021-08-27 Thread everythingfunctional at protonmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102106

Bug ID: 102106
   Summary: Intermittent Segfault with associate to derived type
with polymorphic component
   Product: gcc
   Version: 11.1.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: libfortran
  Assignee: unassigned at gcc dot gnu.org
  Reporter: everythingfunctional at protonmail dot com
  Target Milestone: ---

I'm using version Ubuntu 11.1.0-1ubuntu1~21.04 on Pop!OS.

The following program segfaults sometimes. I believe this bug specifically has
to do with the association to a return value with a polymorphic component, but
I occasionally see similar errors when associating to more complicated derived
types (i.e. derived types with derived type components, with derived type
components, etc.), even if they aren't polymorphic. I think it only happens if
there is an allocatable component somewhere in the hierarchy though.

I've been encountering this bug (and possibly other related ones) occasionally
for a while now, and was finally able to reproduce it in something small to
hopefully be able to isolate it.

program main
type :: sub_class_t
end type

type :: with_polymorphic_component_t
class(sub_class_t), allocatable :: sub_obj_
end type

associate(obj => with_polymorphic_component_t(sub_class_t()))
end associate
end program

Note: in my testing this segfaults about 1 out of every 10 executions

[Bug c++/58820] lambda multiple inheritance operator() not ambiguous

2021-08-27 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=58820

Andrew Pinski  changed:

   What|Removed |Added

 Resolution|--- |INVALID
 Blocks|54367   |
 Status|NEW |RESOLVED

--- Comment #6 from Andrew Pinski  ---
Unrelated to lambdas really.  Here is a C++98 code which shows the same issue
with clang:
template
struct i
{
t operator()(t i);
};
struct overload_set1 : i, i
{
  overload_set1() {}
};
int main(void)
{
  double d1 = 10;
  overload_set1 tt;
  tt(d1);
}


To make the original code work (you need C++17 really):
Adding
  using Fs::operator()...;
allows GCC (and ICC) to work.

So this is a bug in clang.
I don't think we need a testcase as we must likely already have a C++98 one
even.


Referenced Bugs:

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=54367
[Bug 54367] [meta-bug] lambda expressions

[Bug fortran/99819] [9/10/11/12 Regression] ICE in gfc_defer_symbol_init, at fortran/trans-decl.c:841

2021-08-27 Thread anlauf at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99819

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 ---
Paul, are you planning to backport?

This one would also (supposedly) fix pr92065.

[Bug c++/64228] compile error not accurate expected ; before string constant

2021-08-27 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64228

Andrew Pinski  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |WONTFIX

--- Comment #3 from Andrew Pinski  ---
>The caret location is enough to help programmer fix the build error.

So I am going to close this as won't fix.  I do think GCC can improve in other
areas dealing with error messages and there are many other open bugs dealing
those.

[Bug c++/90189] Spurious "error: parameter packs not expanded" when a dependent name coincides

2021-08-27 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90189

Andrew Pinski  changed:

   What|Removed |Added

URL|https://godbolt.org/z/UuwYK |
   |4   |
 Status|UNCONFIRMED |NEW
 Ever confirmed|0   |1
   Last reconfirmed||2021-08-27

--- Comment #2 from Andrew Pinski  ---
Confirmed.


https://godbolt.org/z/UuwYK4

[Bug target/102105] [10/11/12 Regression] x86_64: ABI break with vector in union and -mno-mmx -mavx

2021-08-27 Thread mpolacek at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102105

--- Comment #1 from Marek Polacek  ---
diff between r271212 and r271213:

$ diff -up ~/y12.s ~/y13.s
--- /home/mpolacek/y12.s2021-08-27 16:25:46.0 -0400
+++ /home/mpolacek/y13.s2021-08-27 16:25:53.0 -0400
@@ -87,8 +87,8 @@ test_v1di:
movq%rsp, %rbp
 .LCFI10:
movqg_v1di(%rip), %rax
-   movq%rax, %rdi
-   movl$0, %eax
+   vmovq   %rax, %xmm0
+   movl$1, %eax
callpass_v1di
nop
popq%rbp

[Bug c++/64228] compile error not accurate expected ; before string constant

2021-08-27 Thread jg at jguk dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64228

--- Comment #2 from Jonny Grant  ---
(In reply to Andrew Pinski from comment #1)
> The trunk show:
> : In function 'int main()':
> :7:30: error: expected ';' before string constant
> 7 | std::cout << "oops " << i " number" << endl;
>   |  ^~
>   |  ;
> 
> Error recovery is always hard even saying << might be wrong when you want +.

Hi Andrew
You're right. The suggestion might not be what was desired. The caret location
is enough to help programmer fix the build error.

[Bug c++/79094] Pack expansion in using-declaration rejects an attempt to inherit a pack of constructors

2021-08-27 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79094

--- Comment #4 from Andrew Pinski  ---
Seems fixed in GCC 11+.

[Bug c++/79094] Pack expansion in using-declaration rejects an attempt to inherit a pack of constructors

2021-08-27 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79094

Andrew Pinski  changed:

   What|Removed |Added

  Known to work||11.1.0
  Known to fail||10.3.0

--- Comment #3 from Andrew Pinski  ---
(In reply to lucdanton from comment #1)
> Another case that wants a dependent type expanded alongside the bases, but
> where
> the declarator does not name a constructor:

I filed that as PR 102104 because it is unrelated to the original testcase
which has been fixed for GCC 11.

[Bug target/102105] [10/11/12 Regression] x86_64: ABI break with vector in union and -mno-mmx -mavx

2021-08-27 Thread mpolacek at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102105

Marek Polacek  changed:

   What|Removed |Added

   Target Milestone|--- |10.4
   Keywords||ABI
Summary|x86_64: ABI break with  |[10/11/12 Regression]
   |vector in union and |x86_64: ABI break with
   |-mno-mmx -mavx  |vector in union and
   ||-mno-mmx -mavx

[Bug target/102105] New: x86_64: ABI break with vector in union and -mno-mmx -mavx

2021-08-27 Thread mpolacek at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102105

Bug ID: 102105
   Summary: x86_64: ABI break with vector in union and -mno-mmx
-mavx
   Product: gcc
   Version: unknown
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: target
  Assignee: unassigned at gcc dot gnu.org
  Reporter: mpolacek at gcc dot gnu.org
  Target Milestone: ---

This looks like another ABI break.  Started with r271213.

-mno-mmx -mavx is an unusual combination I guess, but I'm filing this anyway.

$ cat m.c
void vector_1_x();
int main() { vector_1_x(); }
$ cat x.c
typedef int di;
typedef di __attribute__((vector_size(8))) v1di;
typedef union {
  v1di v;
  di a[1];
} u1di;
v1di g_v1di;
int pass_v1di_j;
di pass_v1di_a[1];
di pass_v1di_a_0;
u1di pass_v1di_u;
void test_v8qi();
void pass_v8qi() {}
void test_v1di();
void checkp_1di();
void pass_v1di(v1di v) {
  pass_v1di_u.v = v;
  pass_v1di_a_0 = pass_v1di_u.a[pass_v1di_j];
  checkp_1di(pass_v1di_a);
}
void vector_1_x() {
  test_v8qi();
  test_v1di();
}
$ cat y.c
typedef int qi;
typedef int __attribute__((mode(DI))) di;
int test_v8qi_i, checkp_1di_i;
extern __attribute__((__vector_size__(sizeof(di di g_v1di;
void abort();
typedef union {
  __attribute__((__vector_size__(2 * sizeof(qi qi v;
  qi a[8];
} u8qi;
void pass_v8qi();
void checkp_8qi(qi *p) {
  for (; 0;)
if (p)
  abort();
}
void test_v8qi() {
  u8qi u;
  qi *p = u.a;
  for (; test_v8qi_i;)
u.a[test_v8qi_i] = test_v8qi_i;
  pass_v8qi(u.v);
  checkp_8qi(p);
}
void pass_v1di();
void checkp_1di(di *p) {
  if (p[checkp_1di_i])
abort();
}
void test_v1di() { pass_v1di(g_v1di); }

And then:
$ xgcc-11 -c m.c
$ xgcc-11 -c x.c -mno-mmx -mavx
$ xgcc-9 -c y.c  -mno-mmx -mavx
$ xgcc-11 m.o x.o y.o -o foo
$ ./foo
Aborted (core dumped)
$ xgcc-10 -c y.c -mno-mmx -mavx
$ xgcc-11 m.o x.o y.o -o foo
$ ./foo && echo ok
ok

[Bug c++/102104] New: parameter packs not expanded with '...' for operator conversions

2021-08-27 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102104

Bug ID: 102104
   Summary: parameter packs not expanded with '...' for operator
conversions
   Product: gcc
   Version: 12.0
Status: UNCONFIRMED
  Keywords: rejects-valid
  Severity: normal
  Priority: P3
 Component: c++
  Assignee: unassigned at gcc dot gnu.org
  Reporter: pinskia at gcc dot gnu.org
  Target Milestone: ---

Originally the second testcase from PR 79094 but the first one has since been
fixed.


Take -std=c++17:
template
struct unvariadic: private A, private B {
// okay, provided A and B each declare appropriate
// target_type and operator target_type() members
using A::operator typename A::target_type,
  B::operator typename B::target_type;
};

template
struct variadic: private Bases... {
// error: parameter packs not expanded with '...':
using Bases::operator typename Bases::target_type...;
};

This should compile just as ICC and clang do.

[Bug fortran/87737] ICE tree check: expected ssa_name, have addr_expr in remap_gimple_op_r, at tree-inline.c:923

2021-08-27 Thread anlauf at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87737

anlauf at gcc dot gnu.org changed:

   What|Removed |Added

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

--- Comment #5 from anlauf at gcc dot gnu.org ---
Patch: https://gcc.gnu.org/pipermail/fortran/2021-August/056446.html

[Bug c++/82478] Rejects valid access to private member type that should be allowed by friend

2021-08-27 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82478

Andrew Pinski  changed:

   What|Removed |Added

  Known to fail||10.1.0, 11.1.0

--- Comment #7 from Andrew Pinski  ---
Seems to be fixed on the trunk.

[Bug c++/83470] [7 Regression] Type morphing nested lambda capture

2021-08-27 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83470

Andrew Pinski  changed:

   What|Removed |Added

 Resolution|--- |FIXED
Summary|Type morphing nested lambda |[7 Regression] Type
   |capture |morphing nested lambda
   ||capture
 Status|UNCONFIRMED |RESOLVED
   Target Milestone|--- |7.3

--- Comment #1 from Andrew Pinski  ---
A regression only in GCC 7.1.0 and 7.2.0.  Was fixed in GCC 7.3.0.

[Bug c++/71546] lambda capture fails with "was not declared in this scope"

2021-08-27 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71546

Andrew Pinski  changed:

   What|Removed |Added

 CC||alexandr.kolesov at gmail dot 
com

--- Comment #3 from Andrew Pinski  ---
*** Bug 83115 has been marked as a duplicate of this bug. ***

[Bug c++/83115] Capturing the local variable/function parameter by value generates a compilation error

2021-08-27 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83115

Andrew Pinski  changed:

   What|Removed |Added

 Resolution|--- |DUPLICATE
 Status|UNCONFIRMED |RESOLVED
   Target Milestone|--- |8.0

--- Comment #2 from Andrew Pinski  ---
Dup of bug 71546.  Fixed in GCC 8+.

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

[Bug c++/82756] Poor error message from control flow at global scope

2021-08-27 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82756

Andrew Pinski  changed:

   What|Removed |Added

   Last reconfirmed|2017-10-28 00:00:00 |2021-8-27
   Severity|normal  |enhancement

--- Comment #1 from Andrew Pinski  ---
clang:

:1:1: error: expected unqualified-id
while(true) {}
^

ICC:
(1): error: expected a declaration
  while(true) {}
  ^


GCC trunk:
:1:1: error: expected unqualified-id before 'while'
1 | while(true) {}
  | ^

MSVC:

(1): error C2059: syntax error: 'while'
(1): error C2143: syntax error: missing ';' before '{'
(1): error C2447: '{': missing function header (old-style formal list?)

All poor :).

[Bug c++/78704] operator-> pointer return type is not recognized as pointer type

2021-08-27 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78704

Andrew Pinski  changed:

   What|Removed |Added

   See Also||https://gcc.gnu.org/bugzill
   ||a/show_bug.cgi?id=81045
   Target Milestone|--- |7.2
 Status|NEW |RESOLVED
 Resolution|--- |FIXED

--- Comment #3 from Andrew Pinski  ---
Fixed for GCC 7.2 and GCC 8+; most likely by the patch which fixed PR 81045.

[Bug c++/78704] operator-> pointer return type is not recognized as pointer type

2021-08-27 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78704

Andrew Pinski  changed:

   What|Removed |Added

 CC||gcc at baszerr dot eu

--- Comment #2 from Andrew Pinski  ---
*** Bug 81182 has been marked as a duplicate of this bug. ***

[Bug c++/81182] result of ‘operator->()’ yields non-pointer result

2021-08-27 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81182

Andrew Pinski  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |DUPLICATE

--- Comment #9 from Andrew Pinski  ---
Dup of bug 78704.

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

[Bug c++/60815] prologue line is wrong for templates

2021-08-27 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=60815

Andrew Pinski  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
Summary|Inconsistent prologue line  |prologue line is wrong for
   |table location  |templates
 Ever confirmed|0   |1
   Last reconfirmed||2021-08-27

--- Comment #4 from Andrew Pinski  ---
Confirmed,
For templates, we should save off func_brace_location (somewhere) and set
DECL_STRUCT_FUNCTION (decl)->function_start_locus when the function gets
instantiated.

[Bug c/102103] missing warning for arrays

2021-08-27 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102103

Andrew Pinski  changed:

   What|Removed |Added

   See Also||https://gcc.gnu.org/bugzill
   ||a/show_bug.cgi?id=33925

--- Comment #1 from Andrew Pinski  ---
Related to PR 33925.

[Bug c++/62165] Misleading error messages when using "impossible" brace initializer list

2021-08-27 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=62165

Andrew Pinski  changed:

   What|Removed |Added

   Severity|normal  |enhancement
   Last reconfirmed|2014-08-17 00:00:00 |2021-8-27

--- Comment #5 from Andrew Pinski  ---
I don't know how important this is as the code in question is only invalid
C++11 (and C++98 but for other reasons) and is valid c++14 code.

clang and ICC (EDG) both have a similar error message as GCC does.

  1   2   3   >