Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dmd v2.109.1: static foreach over tuple: segfault #20551

Open
dlangBugzillaToGithub opened this issue Nov 23, 2024 · 1 comment
Open

dmd v2.109.1: static foreach over tuple: segfault #20551

dlangBugzillaToGithub opened this issue Nov 23, 2024 · 1 comment
Labels

Comments

@dlangBugzillaToGithub
Copy link

kdevel reported this on 2024-11-23T00:38:27Z

Transferred from https://issues.dlang.org/show_bug.cgi?id=24873

CC List

Description

crash.d:
```
import std;

void main ()
{
   auto tup = tuple!(string, string, string);
   static foreach (j, t; tup)
   {
   }
}
```
$ dmd crash.d 
Segmentation fault
$ dmd --version
DMD64 D Compiler v2.109.1
Copyright (C) 1999-2024 by The D Language Foundation, All Rights Reserved written by Walter Bright
@dlangBugzillaToGithub
Copy link
Author

nick (@ntrel) commented on 2024-11-23T13:24:22Z

Reduced:

struct Tuple(T...)
{
    T fields;
    alias fields this;
}

void main ()
{
   Tuple!(string) tup;
   static foreach (j, t; tup)
   {
   }
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant