public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH] Add testcase for PR c++/105229: ICE in lookup_template_class_1
       [not found] <3DE8D973-B0A4-4137-A161-F877CF8829E3@nasilyan.com>
@ 2024-05-24 12:16 ` Simon Martin
  2024-05-24 19:04   ` Jason Merrill
  0 siblings, 1 reply; 2+ messages in thread
From: Simon Martin @ 2024-05-24 12:16 UTC (permalink / raw)
  To: gcc-patches

Hi,

The test case in PR c++/105229 has been fixed since 11.4 (via PR 
c++/106024) - the attached patch simply adds the case to the test suite.

Successfully tested on x86_64-pc-linux-gnu. OK for trunk?

Thanks! Simon


         PR c++/105229

gcc/testsuite/ChangeLog:

         * g++.dg/parse/crash72.C: New test.

---
  gcc/testsuite/g++.dg/parse/crash72.C | 12 ++++++++++++
  1 file changed, 12 insertions(+)
  create mode 100644 gcc/testsuite/g++.dg/parse/crash72.C

diff --git a/gcc/testsuite/g++.dg/parse/crash72.C 
b/gcc/testsuite/g++.dg/parse/crash72.C
new file mode 100644
index 00000000000..df469e20f28
--- /dev/null
+++ b/gcc/testsuite/g++.dg/parse/crash72.C
@@ -0,0 +1,12 @@
+// PR c++/105229
+// { dg-do compile { target c++20 } }
+// { dg-additional-options "-Wno-missing-template-keyword" }
+
+template <typename> void bar ()
+{
+  [] <int> {}.operator () <> (); // { dg-error "expected 
primary-expression" }
+}
+void foo ()
+{
+  bar<int> ();
+}
--
2.44.0

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

* Re: [PATCH] Add testcase for PR c++/105229: ICE in lookup_template_class_1
  2024-05-24 12:16 ` [PATCH] Add testcase for PR c++/105229: ICE in lookup_template_class_1 Simon Martin
@ 2024-05-24 19:04   ` Jason Merrill
  0 siblings, 0 replies; 2+ messages in thread
From: Jason Merrill @ 2024-05-24 19:04 UTC (permalink / raw)
  To: Simon Martin, gcc-patches

On 5/24/24 08:16, Simon Martin wrote:
> The test case in PR c++/105229 has been fixed since 11.4 (via PR
> c++/106024) - the attached patch simply adds the case to the test suite.
> 
> Successfully tested on x86_64-pc-linux-gnu. OK for trunk?

OK, thanks.

BTW, the patch was corrupted by your mail client wrapping long lines; 
can you use git send-email instead in the future?

> Thanks! Simon
> 
> 
>           PR c++/105229
> 
> gcc/testsuite/ChangeLog:
> 
>           * g++.dg/parse/crash72.C: New test.
> 
> ---
>    gcc/testsuite/g++.dg/parse/crash72.C | 12 ++++++++++++
>    1 file changed, 12 insertions(+)
>    create mode 100644 gcc/testsuite/g++.dg/parse/crash72.C
> 
> diff --git a/gcc/testsuite/g++.dg/parse/crash72.C
> b/gcc/testsuite/g++.dg/parse/crash72.C
> new file mode 100644
> index 00000000000..df469e20f28
> --- /dev/null
> +++ b/gcc/testsuite/g++.dg/parse/crash72.C
> @@ -0,0 +1,12 @@
> +// PR c++/105229
> +// { dg-do compile { target c++20 } }
> +// { dg-additional-options "-Wno-missing-template-keyword" }
> +
> +template <typename> void bar ()
> +{
> +  [] <int> {}.operator () <> (); // { dg-error "expected
> primary-expression" }
> +}
> +void foo ()
> +{
> +  bar<int> ();
> +}
> --
> 2.44.0
> 


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

end of thread, other threads:[~2024-05-24 19:04 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <3DE8D973-B0A4-4137-A161-F877CF8829E3@nasilyan.com>
2024-05-24 12:16 ` [PATCH] Add testcase for PR c++/105229: ICE in lookup_template_class_1 Simon Martin
2024-05-24 19:04   ` Jason Merrill

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).