[Bug c++/87269] New: [9 Regression] ICE in tsubst_copy, at cp/pt.c:15475 starting from r261802

classic Classic list List threaded Threaded
12 messages Options
Reply | Threaded
Open this post in threaded view
|

[Bug c++/87269] New: [9 Regression] ICE in tsubst_copy, at cp/pt.c:15475 starting from r261802

asolokha at gmx dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87269

            Bug ID: 87269
           Summary: [9 Regression] ICE in tsubst_copy, at cp/pt.c:15475
                    starting from r261802
           Product: gcc
           Version: 9.0
            Status: UNCONFIRMED
          Keywords: ice-on-valid-code
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: marxin at gcc dot gnu.org
  Target Milestone: ---

Created attachment 44675
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=44675&action=edit
unreduced test-case

Starting from the revision I see:

$ g++ ice.ii -c
In file included from
/home/abuild/rpmbuild/BUILD/webkitgtk-2.22.0/Source/JavaScriptCore/API/JSCallbackObject.h:244,
                 from
/home/abuild/rpmbuild/BUILD/webkitgtk-2.22.0/Source/JavaScriptCore/API/glib/JSAPIWrapperGlobalObject.cpp:30:
/home/abuild/rpmbuild/BUILD/webkitgtk-2.22.0/Source/JavaScriptCore/API/JSCallbackObjectFunctions.h:
In instantiation of ‘static JSC::EncodedJSValue
JSC::JSCallbackObject<Parent>::callbackGetter(JSC::ExecState*,
JSC::EncodedJSValue, JSC::PropertyName) [with Parent =
JSC::JSAPIWrapperGlobalObject; JSC::EncodedJSValue = long int]’:
/home/abuild/rpmbuild/BUILD/webkitgtk-2.22.0/Source/JavaScriptCore/API/JSCallbackObjectFunctions.h:162:21:
  required from ‘static bool
JSC::JSCallbackObject<Parent>::getOwnPropertySlot(JSC::JSObject*,
JSC::ExecState*, JSC::PropertyName, JSC::PropertySlot&) [with Parent =
JSC::JSAPIWrapperGlobalObject]’
/home/abuild/rpmbuild/BUILD/webkitgtk-2.22.0/Source/JavaScriptCore/API/glib/JSAPIWrapperGlobalObject.cpp:57:429:
  required from here
/home/abuild/rpmbuild/BUILD/webkitgtk-2.22.0/Source/JavaScriptCore/API/JSCallbackObjectFunctions.h:700:83:
internal compiler error: in tsubst_copy, at cp/pt.c:15513
0x645c85 tsubst_copy
        /home/marxin/Programming/gcc/gcc/cp/pt.c:15513
0x9f046f tsubst_copy_and_build(tree_node*, tree_node*, int, tree_node*, bool,
bool)
        /home/marxin/Programming/gcc/gcc/cp/pt.c:19039
0x9ef398 tsubst_copy_and_build(tree_node*, tree_node*, int, tree_node*, bool,
bool)
        /home/marxin/Programming/gcc/gcc/cp/pt.c:18309
0x9ef4ac tsubst_copy_and_build(tree_node*, tree_node*, int, tree_node*, bool,
bool)
        /home/marxin/Programming/gcc/gcc/cp/pt.c:18325
0x9ef4ac tsubst_copy_and_build(tree_node*, tree_node*, int, tree_node*, bool,
bool)
        /home/marxin/Programming/gcc/gcc/cp/pt.c:18325
0x9ef4ac tsubst_copy_and_build(tree_node*, tree_node*, int, tree_node*, bool,
bool)
        /home/marxin/Programming/gcc/gcc/cp/pt.c:18325
0x9d6fdb tsubst_expr(tree_node*, tree_node*, int, tree_node*, bool)
        /home/marxin/Programming/gcc/gcc/cp/pt.c:17455
0x9d4099 tsubst_expr(tree_node*, tree_node*, int, tree_node*, bool)
        /home/marxin/Programming/gcc/gcc/cp/pt.c:16646
0x9d4b54 tsubst_expr(tree_node*, tree_node*, int, tree_node*, bool)
        /home/marxin/Programming/gcc/gcc/cp/pt.c:16636
0x9d3fd9 tsubst_expr(tree_node*, tree_node*, int, tree_node*, bool)
        /home/marxin/Programming/gcc/gcc/cp/pt.c:16939
0xa054ae instantiate_decl(tree_node*, bool, bool)
        /home/marxin/Programming/gcc/gcc/cp/pt.c:24099
0xa094fb instantiate_pending_templates(int)
        /home/marxin/Programming/gcc/gcc/cp/pt.c:24215
0x920408 c_parse_final_cleanups()
        /home/marxin/Programming/gcc/gcc/cp/decl2.c:4709

I'm going to reduce the test-case.
Reply | Threaded
Open this post in threaded view
|

[Bug c++/87269] [9 Regression] ICE in tsubst_copy, at cp/pt.c:15475 starting from r261802

asolokha at gmx dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87269

Martin Liška <marxin at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2018-09-10
                 CC|                            |nathan at gcc dot gnu.org
      Known to work|                            |8.2.0
   Target Milestone|---                         |9.0
     Ever confirmed|0                           |1
      Known to fail|                            |9.0
Reply | Threaded
Open this post in threaded view
|

[Bug c++/87269] [9 Regression] ICE in tsubst_copy, at cp/pt.c:15475 starting from r261802

asolokha at gmx dot com
In reply to this post by asolokha at gmx dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87269

--- Comment #1 from Martin Liška <marxin at gcc dot gnu.org> ---
Reduced test-case:

$ cat ice2.ii
namespace {
void  operator"" a(const char *, unsigned long);
}
inline namespace b {
void operator"" a(unsigned long long );
}
namespace c {
struct d {
    using e = bool ;
    e f;
};
struct g {
    d h;
}                        ;
template < class > class i  {
    static const g k;
    static bool f();
};
template < class j > bool i< j >::f() {
    ""a;
}                      template <> const g i< int >::k {                      
f};
}
Reply | Threaded
Open this post in threaded view
|

[Bug c++/87269] [9 Regression] ICE in tsubst_copy, at cp/pt.c:15475 starting from r261802

asolokha at gmx dot com
In reply to this post by asolokha at gmx dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87269

--- Comment #2 from Martin Liška <marxin at gcc dot gnu.org> ---
Nathan any progress here please?
Reply | Threaded
Open this post in threaded view
|

[Bug c++/87269] [9 Regression] ICE in tsubst_copy, at cp/pt.c:15475 starting from r261802

asolokha at gmx dot com
In reply to this post by asolokha at gmx dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87269

Martin Liška <marxin at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |larsbj at gullik dot net

--- Comment #3 from Martin Liška <marxin at gcc dot gnu.org> ---
*** Bug 87463 has been marked as a duplicate of this bug. ***
Reply | Threaded
Open this post in threaded view
|

[Bug c++/87269] [9 Regression] ICE in tsubst_copy, at cp/pt.c:15475 starting from r261802

asolokha at gmx dot com
In reply to this post by asolokha at gmx dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87269

Martin Liška <marxin at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           See Also|                            |https://gcc.gnu.org/bugzill
                   |                            |a/show_bug.cgi?id=87814

--- Comment #4 from Martin Liška <marxin at gcc dot gnu.org> ---
Probably a related issue: PR87814.
Nathan can you please take a look?
Reply | Threaded
Open this post in threaded view
|

[Bug c++/87269] [9 Regression] ICE in tsubst_copy, at cp/pt.c:15475 starting from r261802

asolokha at gmx dot com
In reply to this post by asolokha at gmx dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87269

--- Comment #5 from Nathan Sidwell <nathan at gcc dot gnu.org> ---
Martin, this isn't icing now.
Reply | Threaded
Open this post in threaded view
|

[Bug c++/87269] [9 Regression] ICE in tsubst_copy, at cp/pt.c:15475 starting from r261802

asolokha at gmx dot com
In reply to this post by asolokha at gmx dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87269

--- Comment #6 from Martin Liška <marxin at gcc dot gnu.org> ---
I can still see it iceing:
https://godbolt.org/z/tvHnzW

Can you please also try the duplicate?
Reply | Threaded
Open this post in threaded view
|

[Bug c++/87269] [9 Regression] ICE in tsubst_copy, at cp/pt.c:15475 starting from r261802

asolokha at gmx dot com
In reply to this post by asolokha at gmx dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87269

--- Comment #7 from Martin Liška <marxin at gcc dot gnu.org> ---
Nathan?
Reply | Threaded
Open this post in threaded view
|

[Bug c++/87269] [9 Regression] ICE in tsubst_copy, at cp/pt.c:15475 starting from r261802

asolokha at gmx dot com
In reply to this post by asolokha at gmx dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87269

--- Comment #8 from Nathan Sidwell <nathan at gcc dot gnu.org> ---
Author: nathan
Date: Fri Nov 16 15:01:55 2018
New Revision: 266210

URL: https://gcc.gnu.org/viewcvs?rev=266210&root=gcc&view=rev
Log:
[PR c++/87269] Mark string operator overload in template defn.

https://gcc.gnu.org/ml/gcc-patches/2018-11/msg01458.html
        PR c++/87269
        * parser.c (lookup_literal_operator): Mark overload for keeping
        when inside template.  Refactor.

        * g++.dg/lookup/pr87269.C: New.

Added:
    trunk/gcc/testsuite/g++.dg/lookup/pr87269.C
Modified:
    trunk/gcc/cp/ChangeLog
    trunk/gcc/cp/parser.c
    trunk/gcc/testsuite/ChangeLog
Reply | Threaded
Open this post in threaded view
|

[Bug c++/87269] [9 Regression] ICE in tsubst_copy, at cp/pt.c:15475 starting from r261802

asolokha at gmx dot com
In reply to this post by asolokha at gmx dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87269

Nathan Sidwell <nathan at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |FIXED

--- Comment #9 from Nathan Sidwell <nathan at gcc dot gnu.org> ---
Fixed trunk.  87814 is different.
Reply | Threaded
Open this post in threaded view
|

[Bug c++/87269] [9 Regression] ICE in tsubst_copy, at cp/pt.c:15475 starting from r261802

asolokha at gmx dot com
In reply to this post by asolokha at gmx dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87269

--- Comment #10 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Author: jakub
Date: Fri Nov 16 23:18:13 2018
New Revision: 266225

URL: https://gcc.gnu.org/viewcvs?rev=266225&root=gcc&view=rev
Log:
        PR c++/87269
        * g++.dg/lookup/pr87269.C (std::size_t): New typedef.
        (operator"" _a) Change unsigned long type to std::size_t.

Modified:
    trunk/gcc/testsuite/ChangeLog
    trunk/gcc/testsuite/g++.dg/lookup/pr87269.C