public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/97900] New: g++ crashes when instantiating a templated function with a template-type vector parameter
@ 2020-11-19  0:46 Jonathan.Strobl at gmx dot de
  2020-11-19  0:49 ` [Bug c++/97900] " Jonathan.Strobl at gmx dot de
                   ` (11 more replies)
  0 siblings, 12 replies; 13+ messages in thread
From: Jonathan.Strobl at gmx dot de @ 2020-11-19  0:46 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 97900
           Summary: g++ crashes when instantiating a templated function
                    with a template-type vector parameter
           Product: gcc
           Version: 10.2.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: Jonathan.Strobl at gmx dot de
  Target Milestone: ---

Dear GCC maintainers, I have managed to crash the compiler with the following
template instantiation. This happens on version 10.2.0 (on Debian Testing), as
well as on 11.0.0 20201114 (experimental) on compiler explorer:
https://godbolt.org/z/57xYb7

g++ -x c++ - <<EOF  
template<typename T>
T test(T __attribute__((vector_size(2 * sizeof(T)))) vec) {
    return vec[0] + vec[1];
}
typedef int v2si __attribute__((vector_size(2 * sizeof(int))));
int run(v2si vec) {
    return test<int>(vec);
}
EOF


I have attached the output of "gcc -v" as well as the full backtrace. Thank you
very much for your support.

Yours sincerely,
Jonathan Strobl

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

end of thread, other threads:[~2023-07-07  9:12 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-19  0:46 [Bug c++/97900] New: g++ crashes when instantiating a templated function with a template-type vector parameter Jonathan.Strobl at gmx dot de
2020-11-19  0:49 ` [Bug c++/97900] " Jonathan.Strobl at gmx dot de
2020-11-19  1:25 ` mpolacek at gcc dot gnu.org
2020-11-19  1:26 ` [Bug c++/97900] [9/10/11 Regression] " mpolacek at gcc dot gnu.org
2020-11-19  1:26 ` mpolacek at gcc dot gnu.org
2021-04-02 18:35 ` jason at gcc dot gnu.org
2021-04-03  5:54 ` cvs-commit at gcc dot gnu.org
2021-04-04 15:56 ` [Bug c++/97900] [9/10 " jason at gcc dot gnu.org
2021-04-06  9:47 ` cvs-commit at gcc dot gnu.org
2021-06-01  8:18 ` rguenth at gcc dot gnu.org
2022-05-27  9:43 ` [Bug c++/97900] [10 " rguenth at gcc dot gnu.org
2022-06-28 10:42 ` jakub at gcc dot gnu.org
2023-07-07  9:12 ` rguenth 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).