Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

[clang] Crash instantiating static variable template specialization member of class template #135032

Copy link
Copy link
@katzdm

Description

@katzdm
Issue body actions

The following program crashes during codegen, and looks to have done so since Clang 9.

template <typename>
struct TCls {
  template <typename T>
  static auto var = T::smem;
};

struct S { static constexpr int smem = 1; };

int main() {
  (void) TCls<int>::var<S>;
}

https://godbolt.org/z/x9eYMKfrv

Metadata

Metadata

Assignees

No one assigned

    Labels

    clang:frontendLanguage frontend issues, e.g. anything involving "Sema"Language frontend issues, e.g. anything involving "Sema"confirmedVerified by a second partyVerified by a second partycrashPrefer [crash-on-valid] or [crash-on-invalid]Prefer [crash-on-valid] or [crash-on-invalid]

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.