public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/101180] New: [12 Regression] Rejected code since r12-299-ga0fdff3cf33f7284
@ 2021-06-23 13:05 marxin at gcc dot gnu.org
  2021-06-23 13:05 ` [Bug c++/101180] " marxin at gcc dot gnu.org
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: marxin at gcc dot gnu.org @ 2021-06-23 13:05 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101180

            Bug ID: 101180
           Summary: [12 Regression] Rejected code since
                    r12-299-ga0fdff3cf33f7284
           Product: gcc
           Version: 12.0
            Status: UNCONFIRMED
          Keywords: rejects-valid
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: marxin at gcc dot gnu.org
                CC: jason at gcc dot gnu.org
  Target Milestone: ---

The code is reduced from Skia (part of chromium package):

$ cat enc.ii
#pragma GCC target "avx"
template <typename> struct Simd {};
#pragma GCC push_options
#pragma GCC target "avx,avx2,bmi,bmi2,fma,f16c"
template <typename T> using Full256 = Simd<T>;
template <typename> struct BitCastFromInteger256;
template <> struct BitCastFromInteger256<float> {
  __attribute__((always_inline)) float operator()(long) { return .0f; }
};
long BitCastFromByte_v_0;
template <typename T> void BitCastFromByte(Full256<T>) {
  T{BitCastFromInteger256<T>()(BitCastFromByte_v_0)};
}
template <typename T, typename FromT> void BitCast(T d, FromT) {
  BitCastFromByte(d);
}
int EstimateEntropy___trans_tmp_3;
void EstimateEntropy() {
  Simd<float> df;
  BitCast(df, EstimateEntropy___trans_tmp_3);
}
#pragma GCC pop_options

$ g++ enc.ii -c 
enc.ii: In function ‘void BitCastFromByte(Full256<T>) [with T = float]’:
enc.ii:8:40: error: inlining failed in call to ‘always_inline’ ‘float
BitCastFromInteger256<float>::operator()(long int)’: target specific option
mismatch
    8 |   __attribute__((always_inline)) float operator()(long) { return .0f; }
      |                                        ^~~~~~~~
enc.ii:12:31: note: called from here
   12 |   T{BitCastFromInteger256<T>()(BitCastFromByte_v_0)};
      |     ~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2021-11-25  7:42 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-23 13:05 [Bug c++/101180] New: [12 Regression] Rejected code since r12-299-ga0fdff3cf33f7284 marxin at gcc dot gnu.org
2021-06-23 13:05 ` [Bug c++/101180] " marxin at gcc dot gnu.org
2021-11-18 18:01 ` jakub at gcc dot gnu.org
2021-11-18 18:26 ` jakub at gcc dot gnu.org
2021-11-19 21:10 ` cvs-commit at gcc dot gnu.org
2021-11-21 20:07 ` cvs-commit at gcc dot gnu.org
2021-11-22  9:58 ` jakub at gcc dot gnu.org
2021-11-25  7:42 ` cvs-commit at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).