Comments (1)
This is probably going to be tricky to solve. The problem is that we have two S[1]
static array allocas for the implicit array literals, one for each branch, but the compiler generates temporaries for the S
elements, and those have a custom dtor expression, so that they are only destructed if that branch was taken (i.e., the first S
temporary gets a a && tmp1.~this()
edtor, the 2nd one a a || tmp2.~this()
).
What we do is emplace the element temporaries into the static array directly. The lvalues of the temporaries are thus GEPs into the static array allocas, not allocas directly (which would definitely dominate all uses). And those GEPs are created in the respective branches only, so don't dominate all uses in the cleanups (even though the dtor call would be disabled anyway if that branch wasn't taken).
from ldc.
Related Issues (20)
- No error when using params in @naked functions HOT 4
- Shadowed static assert error in the compiler output HOT 8
- musl libc requires `-link-defaultlib-debug -frame-pointer=all` to show line information in backtrace
- Support CMAKE_INSTALL_LIBDIR ? HOT 1
- LLVM ERROR when cross-compiling to arm64 with -g -flto HOT 1
- Reduce output of `ldc2 --version`
- `core.atomic.atomicStore` and `core.atomic.atomicLoad` calls itself recursively HOT 4
- ldc expects shared libraries even thought explicitly asks for a static build HOT 2
- remove or de-UB --release from the CLI HOT 13
- Support for newer LLVM versions for C++ bootstrap branch? HOT 7
- Wish: implement %ldccurrentpath% variable for ldc2.conf HOT 3
- Incorrect LLVM type for struct with single align(1) member HOT 6
- Incorrect ELF file for mips64el HOT 5
- Regression from LDC 1.30 to 1.38 on referencing template instances symbols HOT 6
- Please include Xtensa arch in standard distro? HOT 11
- ImportC + wasm = bug? HOT 2
- Make it easier to build static libraries HOT 4
- Implement merging of static libraries via `-lib` on Posix too
- Wish: accept *.obj on par with *.o for non-Windows targets HOT 3
- Wrong struct layout (alignment related), followup #4719 HOT 8
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ldc.