-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
infinite loop optimized away unless function is exported #1658
Copy link
Copy link
Closed
Labels
backend-llvmThe LLVM backend outputs an LLVM IR Module.The LLVM backend outputs an LLVM IR Module.bugObserved behavior contradicts documented or intended behaviorObserved behavior contradicts documented or intended behaviorupstreamAn issue with a third party project that Zig uses.An issue with a third party project that Zig uses.
Milestone
Metadata
Metadata
Assignees
Labels
backend-llvmThe LLVM backend outputs an LLVM IR Module.The LLVM backend outputs an LLVM IR Module.bugObserved behavior contradicts documented or intended behaviorObserved behavior contradicts documented or intended behaviorupstreamAn issue with a third party project that Zig uses.An issue with a third party project that Zig uses.
Type
Fields
Give feedbackNo fields configured for issues without a type.
See asm output on goldbold.
As you said during live coding, it seems like the eternal loop is considered to have no side effects and is thus removed.
Expected behaviour would be to refuse compilation
eternitybeing declared as returningvoid, an implicitreturn;at the end of the function cannot be reached