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
Issue 14147 - Compiler crash on identical functions in a single module #7577
Conversation
@@ -120,6 +120,7 @@ static foreach(member;__traits(allMembers,S)){ | |||
} | |||
|
|||
// print prime numbers using overload sets as state variables. | |||
/+ | |||
static assert(is(typeof(bad57))); | |||
static assert(!is(typeof(bad53))); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure how I can "fix" this test. It generated bad57
a couple of times and AFAICT there's no break
for static foreach
yet.
CC @tgehr
bf511f9
to
1045399
Compare
93b6b04
to
44969df
Compare
If two extern (C) functions are just declared with different signatures, they don't conflict. extern(C): alias sigfn_t = void function(int); alias sigfn_t2 = void function(int) nothrow @nogc; sigfn_t bsd_signal(int sig, sigfn_t func); sigfn_t2 bsd_signal(int sig, sigfn_t2 func) nothrow @nogc; // no error This behavior must be reconsidered in the future.
So we are all good here? Anything blocking this? |
I'm just waiting for the tests to pass before giving this one last review |
FYI the Jenkins failure just means that the GCE has terminated the runner - it has nothing to do with this PR:
dlang/ci uses cheap preemptible GCE instances: https://cloud.google.com/compute/docs/instances/preemptible
|
This broke a subtler usage of |
Can we revert this, due to issue 18385? |
but yeah, it looks like this needs a deprecation cycle, so we should probably revert it for now and re-add it with deprecations. |
I don't see why it has to be deprecated. The actual code that hit the regression have different mangled names: class Foo
{
extern (C) static void callback(int) {}
extern (C) static void callback(char*) {}
} In the above example the mangled names of |
Well, let's go with #7969 for now. Once, that's in we can can still decide what is going to be deprecated with 2.080 and what not (the test cases of #7969 are definitely sth. that should be deprecated).
AFAICT the check already mangles the function signature and checks for that, but as said: "revert first, talk (in-depth) later". Sounds fair? |
Temporarily disable #7577, s.t. a proper deprecation cycle can be started
Isn't the regression caused by your special handling of extern(C) symbols? Therefore that special handling should just be removed outright. GDC has thrown errors about duplicate functions for a long time now, and it's surprising to see a couple of changes to the testsuite here that don't really cause symbol conflicts ( |
Yeah, I think so. IIRC, Walter has also, in the |
Revived #4396