Fix #21619 - ICE core.exception.AssertError@src/dmd/pragmasem.d(456): Assertion failure - #21624
Merged
Merged
Conversation
|
Thanks for your pull request, @ibuclaw! Bugzilla referencesYour PR doesn't reference any Bugzilla issue. If your PR contains non-trivial changes, please reference a Bugzilla issue or create a manual changelog.
|
Member
Author
|
Needs loads of tests, as I lost count of so many examples where // second argument ignored - spec says one must be symbol
pragma(mangle, "name", "eman")
struct S {}
// second argument also ignored - spec says there must be one argument only
pragma(mangle, "name", "eman")
S fun() { return S(); }
// accepts call expr with return type aggregate - this is neither a string literal nor type symbol
pragma(mangle, fun(), "name")
class C {}
// likewise, accepts var expression of type aggregate
S var;
pragma(mangle, var, "name")
class D {}
// ignored aggregate declarations wrapped around an attribute declaration
pragma(mangle, "function")
extern(C++) struct _function {}
extern(C++) void cppfun(ref _function); // mangled as `_function&`, not `function&`. |
ibuclaw
force-pushed
the
fix_pragma_mangle
branch
from
July 30, 2025 18:15
bc8953e to
c276f24
Compare
ibuclaw
commented
Jul 30, 2025
| /* | ||
| REQUIRED_ARGS: -ignore -v | ||
| TRANSFORM_OUTPUT: remove_lines("^(predefs|binary|version|config|DFLAG|parse|import|\(imported|semantic|entry|library|function object|function core|\s*$)") | ||
| TRANSFORM_OUTPUT: remove_lines("^(predefs|binary|version|config|DFLAG|parse|inline|.*_d_newarrayU|import|\(imported|semantic|entry|library|function object|function core|\s*$)") |
Member
Author
There was a problem hiding this comment.
This isn't related. Failure was introduced by e33c664.
ibuclaw
commented
Jul 30, 2025
ibuclaw
commented
Jul 30, 2025
ibuclaw
force-pushed
the
fix_pragma_mangle
branch
from
August 2, 2025 13:43
c276f24 to
3bac874
Compare
ibuclaw
marked this pull request as ready for review
August 2, 2025 13:44
ibuclaw
force-pushed
the
fix_pragma_mangle
branch
4 times, most recently
from
August 2, 2025 14:00
cfe2df9 to
194a372
Compare
ibuclaw
commented
Aug 2, 2025
thewilsonator
approved these changes
Aug 2, 2025
…456): Assertion failure pragma(mangle) in a declaration and statement context had two diverging semantics, and in some cases differing error messages for the same kind of invalid case. This change merges the two implementation together into one function so that semantic is consistently applied.
ibuclaw
force-pushed
the
fix_pragma_mangle
branch
from
August 2, 2025 14:15
194a372 to
bb7e34b
Compare
Closed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
pragma(mangle) in a declaration and statement context had two diverging semantics, and in some cases differing error messages for the same kind of invalid case.
This change merges the two implementation together into one function so that semantic is consistently applied.