Compiler engineer: Tooling and Diagnostics
Original interview scenarios on reproductions, reduction, fuzzing, compiler tests, diagnostics, caches, reproducible builds, profiling, performance evidence, and release debugging.
These prompts are original practice. They are not questions from a named employer or a live hiring loop.
1.A compiler bug report lacks source and flags. What is most useful next?
Show answer and explanation
- An assembly screenshot
- A reproducible case
- The optimized binary without inputs or invocation flags
- Only the final object size
Answer: A reproducible case
Diagnosis needs the inputs and conditions that reproduce the issue.
2.A crash appears only with one target feature enabled. What should a reproduction preserve?
Show answer and explanation
- Only source names
- Target flags
- The default configuration without the triggering feature
- Only the input's byte count
Answer: Target flags
Target options can change lowering and expose different invariants.
3.A reducer removes code until the failure disappears. What must its predicate enforce?
Show answer and explanation
- Any nonzero exit
- Bug identity
- The smallest source text regardless of the failure
- The fastest compilation time
Answer: Bug identity
Reduction must retain the relevant bug, not an unrelated failure.
4.A reduction predicate accepts syntax errors as success. What can result?
Show answer and explanation
- A better correctness oracle
- A guaranteed valid program with the same miscompilation
- An automatically verified fix
- A meaningless reduced case
Answer: A meaningless reduced case
An unrelated rejection can replace the original miscompilation or crash.
5.A nondeterministic failure occurs one run in fifty. What should reduction consider?
Show answer and explanation
- Repeated robust checks
- One execution only
- A passing run treated as proof the defect vanished
- Source length alone
Answer: Repeated robust checks
A flaky predicate can discard necessary code incorrectly.
6.A failure depends on uninitialized source behavior. What should the report distinguish?
Show answer and explanation
- Runtime speed alone
- Invalid source versus compiler defect
- A guarantee every output mismatch is an optimizer defect
- The shorter binary as the reference
Answer: Invalid source versus compiler defect
An undefined source execution may not support the claimed compiler violation.
7.A miscompilation is suspected. What is stronger than an output mismatch alone?
Show answer and explanation
- A smaller executable
- An unchanged error-message count
- A defined semantic oracle
- A faster compile with no expected result
Answer: A defined semantic oracle
A valid expected result makes the correctness claim assessable.
8.Two compilers disagree on a defined arithmetic case. What should investigation preserve?
Show answer and explanation
- Compiler names alone
- Binary lengths without matching execution contracts
- The older version as automatically correct
- Inputs, contracts, and outputs
Answer: Inputs, contracts, and outputs
Differential evidence requires comparable configurations and defined behavior.
9.A metamorphic test renames bound variables safely. What should remain invariant without reflection?
Show answer and explanation
- Exact file length
- The original identifier spellings
- Program behavior
- Identical physical-register allocation
Answer: Program behavior
Binding-preserving renaming should not change semantics under the stated conditions.
10.A test adds dead code containing undefined behavior under its source rules. What must be checked?
Show answer and explanation
- Source length alone
- Whether the transformation keeps the test valid
- A rule that unreachable undefined behavior invalidates every run
- The compiler's success as proof of defined execution
Answer: Whether the transformation keeps the test valid
A test transformation must preserve the intended semantic premise.
11.A fuzz generator creates mostly invalid programs. What may improve useful testing?
Show answer and explanation
- Valid generation
- More random bytes
- Silencing diagnostics without making source meaningful
- A guarantee invalid inputs exercise every optimization
Answer: Valid generation
Structured generation can reach meaningful compiler paths and defined executions.
12.A fuzzer targets parser robustness. What input class is still valuable?
Show answer and explanation
- Valid inputs only
- Only successful parses of already familiar programs
- Malformed and adversarial input
- Only programs with small binaries
Answer: Malformed and adversarial input
Robustness includes controlled handling of invalid source.
13.AddressSanitizer instruments the compiler process and reports a use-after-free while it compiles a source file. Which property is directly being tested?
Show answer and explanation
- Generated-program heap safety
- The source program's semantic type validity
- Compiler implementation memory safety
- The emitted instruction alignment
Answer: Compiler implementation memory safety
A tool finding in the compiler process concerns its implementation behavior.
14.A compiler crashes only during parallel compilation. A race detector reports unsynchronized writes to a shared symbol table. What area does that evidence identify for investigation?
Show answer and explanation
- Target arithmetic rules
- Shared mutable state
- The language's longest-token rule
- The final linker's symbol-visibility contract
Answer: Shared mutable state
Concurrency can expose races and invalid ownership assumptions.
15.A pass-bisection search narrows a bug to one transformation. What does that identify?
Show answer and explanation
- A complete proof of cause
- A useful failure boundary
- The final patch without further invariant analysis
- Guaranteed sole responsibility of that pass
Answer: A useful failure boundary
The first failing stage may expose an earlier broken invariant.
16.An IR dump is valid before pass A and invalid afterward. What is useful next?
Show answer and explanation
- Rename the pass
- Check A's invariant changes
- Delete the verifier that reports the problem
- Assume the source is necessarily invalid
Answer: Check A's invariant changes
A narrow boundary supports targeted analysis without proving every upstream fact.
17.An assertion is disabled to stop a crash, but wrong output remains. What is the issue?
Show answer and explanation
- The defect is repaired.
- Changed output is irrelevant once the assertion is gone.
- The assertion itself defined the source's result.
- The underlying defect persists.
Answer: The underlying defect persists.
Removing detection does not repair the violated invariant.
18.A diagnostic reports a backend assertion to an ordinary source error. What should improve?
Show answer and explanation
- More internal addresses
- The same assertion presented without source context
- A guarantee source errors cannot reach internal code
- Controlled source-level reporting
Answer: Controlled source-level reporting
Expected invalid inputs should receive appropriate diagnostics rather than internal failures.
19.A warning depends on hash iteration order. What property is affected?
Show answer and explanation
- Only executable size
- Diagnostic determinism
- Guaranteed deterministic inference from an unordered map
- Only the selected ABI
Answer: Diagnostic determinism
Incidental container order should not destabilize required user-facing behavior.
20.A regression checks an entire assembly listing unnecessarily. What can make it brittle?
Show answer and explanation
- The semantic specification
- The existence of a target architecture
- The fact the source is valid
- Incidental output details
Answer: Incidental output details
Tests should focus on required semantics or relevant patterns.
21.A pattern test matches a desirable instruction anywhere, including an unrelated function. What should be tightened?
Show answer and explanation
- Only the count of matching instructions anywhere
- The assertion's scope
- Only the total function count
- Only successful assembly of the output
Answer: The assertion's scope
An unscoped match can pass without testing the intended transformation.
22.A negative pattern excludes a string present in debug metadata. What needs review?
Show answer and explanation
- Match scope
- Only the selected target architecture
- Treating every matched string as emitted machine code
- Only the total instruction count
Answer: Match scope
Textual tests should distinguish relevant code from unrelated text.
23.A runtime regression verifies only process exit, not result. What can it miss?
Show answer and explanation
- A compilation failure
- Wrong successful output
- Whether the test process terminated
- Whether required input files exist
Answer: Wrong successful output
A successful exit does not establish correct computed behavior.
24.A test expects a crash but accepts any failure. What should be specified?
Show answer and explanation
- The intended failure signature
- Any nonzero exit
- Only elapsed time
- A presumption all failures have one cause
Answer: The intended failure signature
Specific predicates prevent unrelated errors from masquerading as regressions.
25.A minimized test depends on a private absolute path. What should be improved?
Show answer and explanation
- Only the reduced source's byte count
- Only whether the original machine can rerun it
- Only retaining the original directory's permissions
- Portability
Answer: Portability
A useful regression should run in the intended independent environment.
26.A compiler cache key omits target CPU features. What can occur?
Show answer and explanation
- Only cache growth
- Only slower parsing
- Guaranteed compatibility across target features
- Wrong artifact reuse
Answer: Wrong artifact reuse
Compilation results can differ with target configuration.
27.A cache key includes source but not included headers. What is missing?
Show answer and explanation
- Dependency content identity
- The main path alone
- The logging level
- A guarantee included files cannot change output
Answer: Dependency content identity
Included content can change semantics and must invalidate affected results.
28.A dependency scanner misses macro-generated includes. What risk arises?
Show answer and explanation
- Only a lower cache hit rate
- Only repeated clean compilation
- Guaranteed correctness because the main source is unchanged
- Stale incremental results
Answer: Stale incremental results
Incomplete dependency tracking can reuse obsolete compilation results.
29.A build succeeds cleanly but fails incrementally. What should be compared?
Show answer and explanation
- Only executable byte size
- Only the success of one clean build
- Dependency and invalidation behavior
- The newest compiler treated as a correctness oracle
Answer: Dependency and invalidation behavior
Incremental state can conceal missing rebuilds or invalid cache entries.
30.A distributed cache accepts artifacts without validating identity. What concern arises?
Show answer and explanation
- Integrity and trust
- Hit rate alone
- Only local lookup speed
- Automatic proof of reproducibility
Answer: Integrity and trust
Remote artifacts need appropriate identity and provenance checks.
31.A build embeds the current wall-clock time. What property can be harmed?
Show answer and explanation
- Only source type safety
- Bitwise reproducibility
- Only physical-register reuse
- Guaranteed lower compilation time
Answer: Bitwise reproducibility
Time-dependent output can differ despite identical semantic inputs.
32.Two builds differ only in embedded source paths. What should be investigated?
Show answer and explanation
- Only runtime speed
- Only the final instruction count
- Path remapping and build inputs
- A guarantee differing paths change program behavior
Answer: Path remapping and build inputs
Output differences can arise from metadata rather than semantic code changes.
33.Matching cryptographic hashes are used to compare two build artifacts. Under the assumed collision-resistance of that hash, what do matching hashes support about these artifacts?
Show answer and explanation
- Universal semantic correctness
- Complete build provenance
- Strong evidence that the artifact bytes match.
- Proof every compiler input was identical
Answer: Strong evidence that the artifact bytes match.
Under the stated cryptographic assumption, matching hashes strongly support byte equality. They do not prove semantic correctness, complete provenance, or identical inputs; hash collisions are not mathematically impossible.
34.A report calls two binaries equivalent because their sizes match. What is wrong?
Show answer and explanation
- Equal sizes are impossible.
- Equal size proves the same instructions are present.
- Only matching symbol counts can prove all behavior.
- Equal size does not establish behavioral equivalence.
Answer: Equal size does not establish behavioral equivalence.
Different programs can have the same byte length. Equal size neither proves equivalent behavior nor proves the binaries behave differently; the inference is unsupported.
35.A performance benchmark changes source and compiler simultaneously. What is confounded?
Show answer and explanation
- The timer unit alone
- Attribution of the observed difference
- Only the reproducibility of one configuration
- A guarantee the compiler caused every difference
Answer: Attribution of the observed difference
Multiple changed factors prevent simple causal attribution.
36.A benchmark runs on different hardware before and after. What should be controlled?
Show answer and explanation
- Only equal source paths
- Only final binary byte size
- Only matching compiler version strings
- Comparable execution conditions
Answer: Comparable execution conditions
Hardware differences can dominate measured performance.
37.A benchmark warms caches in only one configuration. What should be reviewed?
Show answer and explanation
- Only the number of timed repetitions
- A guarantee cold and warm runs measure the same conditions
- Only equal instruction counts
- Measurement fairness
Answer: Measurement fairness
Cache state can affect comparisons materially.
38.A runtime metric improves while memory use doubles. What should reporting include?
Show answer and explanation
- The best metric alone
- The relevant tradeoffs
- Only the compiler executable's size
- A guarantee the change benefits every user
Answer: The relevant tradeoffs
Performance assessment should disclose material costs and objectives.
39.Old runtime is 200 ms and new runtime 160 ms. What is time reduction?
Show answer and explanation
- 20%
- 80%
- 25%
- 40%
Answer: 20%
Forty divided by the original two hundred equals 20%.
40.A benchmark takes 200 ms before a change and 160 ms afterward. What is speedup, defined as old time divided by new time?
Show answer and explanation
- 2×
- 1.25×
- 0.8×
- 1.2×
Answer: 1.25×
200 divided by 160 equals 1.25.
41.Compilation time rises from 4 seconds to 5 seconds. What is the increase?
Show answer and explanation
- 1%
- 125%
- 20%
- 25%
Answer: 25%
One divided by the original four equals 25%.
42.A pass accounts for 3 of 12 compile seconds. What share is it?
Show answer and explanation
- 25%
- 40%
- 12%
- 3%
Answer: 25%
Three divided by twelve equals one-quarter.
43.A pass takes three of twelve compile seconds. A change halves that pass's time and leaves all other time unchanged. How many compile seconds are saved?
Show answer and explanation
- 6 seconds
- 10.5 seconds
- 1.5 seconds
- 3 seconds
Answer: 1.5 seconds
Half of three seconds is 1.5 seconds.
44.A profiler samples one long compilation. What limitation should be considered?
Show answer and explanation
- Only profile file size
- A guarantee one workload represents every program
- Only whether all samples name valid functions
- Sampling and workload representativeness
Answer: Sampling and workload representativeness
A profile reflects its sampling method and workload.
45.A compile-time optimization reduces allocations but increases repeated analysis. What should be measured?
Show answer and explanation
- Allocation count alone
- The shorter implementation source
- A guarantee fewer allocations always reduces total cost
- Total relevant resource cost
Answer: Total relevant resource cost
Local metric improvement may shift costs elsewhere.
46.A memoized analysis cache grows without bounds. What resource risk exists?
Show answer and explanation
- Only more parse errors
- Only external symbol-linkage changes
- Memory growth
- Automatic constant-space behavior
Answer: Memory growth
Caching can trade computation for substantial memory consumption.
47.A benchmark suite contains only small source files. What may be underrepresented?
Show answer and explanation
- Only small-program correctness
- Only startup overhead on tiny inputs
- A guarantee tiny files reveal every scaling cost
- Large-program scalability
Answer: Large-program scalability
Scale-dependent costs may not appear in tiny cases.
48.A quadratic pass looks fast on ten nodes. What should be tested?
Show answer and explanation
- Scale tests
- Another identical ten-node input
- Only the same input with a different random seed
- An assumption low cost at ten nodes proves linear scaling
Answer: Scale tests
Small examples may hide poor scaling.
49.An O(n²) work estimate grows n from 100 to 300. What is the approximate work multiplier?
Show answer and explanation
- 9
- 6
- 3
- 300
Answer: 9
Squaring the threefold input increase gives ninefold work.
50.A pass assumes a graph is acyclic but receives loops. What should be examined?
Show answer and explanation
- The graph's node names
- Only output formatting
- Preconditions
- A guarantee every control-flow graph is a tree
Answer: Preconditions
The chosen method must fit the actual graph structure.
51.A diagnostic fix-it edits text inside a macro expansion. What must tooling consider?
Show answer and explanation
- Source ownership and expansion mapping
- Display width alone
- Only the selected machine opcode
- A guarantee all expanded text is directly editable
Answer: Source ownership and expansion mapping
An edit must target actual writable source with correct provenance.
52.A source tool treats byte offsets as character columns. What can fail?
Show answer and explanation
- Only token kinds
- Highlighting and edit locations
- Only linker symbol resolution
- A guarantee ASCII position calculations fit all source text
Answer: Highlighting and edit locations
Encoding units must match the editor and source representation.
53.An IDE response refers to an older source revision. What should be attached or checked?
Show answer and explanation
- The path alone
- Only the symbol count
- A guarantee offsets survive arbitrary edits
- Version ID
Answer: Version ID
Version identity prevents stale diagnostics and edits.
54.A refactoring changes spelling without checking binding. What can it do incorrectly?
Show answer and explanation
- Rename unrelated declarations or uses
- Only shorten the source
- Only modify comments
- Automatically preserve every declaration binding
Answer: Rename unrelated declarations or uses
Semantic refactoring needs declaration identity, not text matching alone.
55.A language server crashes on incomplete syntax. What property is weak?
Show answer and explanation
- Error-tolerant analysis
- Only lexical coverage on complete files
- Only diagnostic text translation
- A guarantee users always submit complete syntax
Answer: Error-tolerant analysis
Interactive tooling must handle transient invalid source robustly.
56.A compiler diagnostic is technically accurate but gives no actionable location. What should improve?
Show answer and explanation
- Source attribution
- The error count alone
- Only generated binary size
- More internal stack frames without source context
Answer: Source attribution
Useful diagnostics connect the problem to relevant source.
57.A message exposes internal pointers as the only explanation. What would help users?
Show answer and explanation
- More raw addresses
- Only the generated register names
- Semantic context and stable diagnostics
- A claim that an internal address explains the language rule
Answer: Semantic context and stable diagnostics
Internal implementation details rarely explain the source issue by themselves.
58.A test localizes a bug to an optimization pipeline. What should a report include?
Show answer and explanation
- Only the final compiler executable's size
- Only the last pass's output without its inputs
- The relevant pass sequence and settings
- A guarantee pass order cannot affect reproduction
Answer: The relevant pass sequence and settings
Transformation order can affect assumptions and reproduction.
59.A bug disappears when logging is enabled. What should be investigated?
Show answer and explanation
- Only the log's verbosity level
- Only whether the logged run passes
- Timing, memory, or undefined implementation behavior
- A conclusion the uninstrumented failure never existed
Answer: Timing, memory, or undefined implementation behavior
Instrumentation can perturb races or memory errors.
60.A compiler assertion fires only in a release build. What should be checked?
Show answer and explanation
- Only the assertion's message text
- Configuration-dependent behavior
- Only whether debugging symbols are present
- A guarantee release builds cannot contain checks
Answer: Configuration-dependent behavior
Build settings can alter optimization, checks, layout, and timing.
61.A test uses a randomized seed but never records it. What is weakened?
Show answer and explanation
- Only source validity
- Only the output size
- A claim random testing has no value
- Reproduction of a failure
Answer: Reproduction of a failure
Recording seeds and inputs supports repeatable investigation.
62.A seed is recorded but dependencies changed. What else matters?
Show answer and explanation
- The seed alone
- Only the source length
- The full relevant environment
- A guarantee the seed encodes every external dependency
Answer: The full relevant environment
Reproducibility can depend on tools, versions, flags, and inputs.
63.A compiler update causes a workload regression. What can revision bisection locate?
Show answer and explanation
- A useful change boundary
- The complete root cause
- A final proof that the boundary change is defective
- An automatic repair without analysis
Answer: A useful change boundary
Bisection narrows investigation but still requires diagnosis.
64.A bisection predicate is flaky. What should be improved?
Show answer and explanation
- Only a longer revision range
- Only a smaller reproducer
- A guarantee binary search tolerates arbitrary classifications
- Reliability of pass/fail classification
Answer: Reliability of pass/fail classification
Unstable classification can send the search to the wrong boundary.
65.A bug report includes confidential customer source. What should be considered?
Show answer and explanation
- Only test duration
- Only the file length
- Sharing rights
- A presumption debugging waives confidentiality
Answer: Sharing rights
Useful evidence must be handled within legitimate sharing authority.
66.A reduced public case removes confidential content but preserves the defect. What benefit does it offer?
Show answer and explanation
- Reviewable safe reproduction
- Only smaller source files
- Only fewer generated symbols
- A guarantee the reproduced defect is already fixed
Answer: Reviewable safe reproduction
A suitable minimized example can support collaboration without unnecessary disclosure.
67.A compiler plugin executes arbitrary code during builds. What should be assessed?
Show answer and explanation
- Trust and build isolation
- Plugin size alone
- The supported syntax list without execution privileges
- A presumption compilation cannot execute extensions
Answer: Trust and build isolation
Build-time extensions can have broad execution and access effects.
68.A build script downloads an unpinned executable. What risk should be reviewed?
Show answer and explanation
- Download speed alone
- Only the tool's filename
- A guarantee source stability pins external tools
- Supply-chain reproducibility and trust
Answer: Supply-chain reproducibility and trust
External mutable tools can change behavior and provenance.
69.A compiler cache is shared across trust boundaries. What controls matter?
Show answer and explanation
- Cache size alone
- Artifact integrity and access policy
- The hit percentage without a trust policy
- A guarantee shared storage is automatically trusted
Answer: Artifact integrity and access policy
Cross-party reuse needs a suitable trust model.
70.A fuzzing crash is triaged as a code-execution vulnerability without analysis. What is appropriate?
Show answer and explanation
- Impact analysis
- Publish a certain exploit claim.
- Delete the input rather than investigate.
- Assume every crash proves code execution.
Answer: Impact analysis
A crash alone does not establish the full security impact.
71.A malformed source causes unbounded recursion. What should handling support?
Show answer and explanation
- Controlled resource failure
- Only increasing available memory
- Only emitting a longer diagnostic
- A guarantee malformed nesting is always shallow
Answer: Controlled resource failure
Robust tools should handle resource limits predictably.
72.A diagnostic output includes terminal control characters from source. What should be considered?
Show answer and explanation
- Safe presentation and escaping
- Message length alone
- Only optimization settings
- A presumption all source text is passive display data
Answer: Safe presentation and escaping
Untrusted text can affect how output is displayed or interpreted.
73.A test runner treats a timeout as semantic mismatch. What should be distinguished?
Show answer and explanation
- Only executable size
- Only compilation speed
- Correctness, nontermination, and harness limits
- A guarantee every timeout proves an incorrect value
Answer: Correctness, nontermination, and harness limits
Different failure categories require different conclusions.
74.A performance test times compilation and program execution together. What needs clarification?
Show answer and explanation
- The source name alone
- Which cost the metric measures
- Only output formatting
- A guarantee the sum is program execution time alone
Answer: Which cost the metric measures
Combined timing cannot be interpreted as one component without separation.
75.A test environment lacks required target features. What should the harness do?
Show answer and explanation
- Report a compiler defect automatically.
- Classify unsupported execution accurately
- Count unsupported execution as a passing run.
- Change the expected output to hide the failure.
Answer: Classify unsupported execution accurately
Environment limits should not become false correctness claims.
76.A backend output check passes but execution faults on hardware. What should investigation compare?
Show answer and explanation
- Generated code, ABI, and actual target conditions
- The successful assembly pattern alone
- Only the source-level type checker result
- A guarantee a text match proves runtime behavior
Answer: Generated code, ABI, and actual target conditions
Pattern checks do not establish full machine correctness.
77.A diagnostic regression checks translated wording exactly. What may be fragile?
Show answer and explanation
- Locale-dependent output
- The language's semantic rule
- The exact source span
- Whether an error was detected
Answer: Locale-dependent output
Stable tests should account for the intended locale and diagnostic contract.
78.An error-code test passes while the wrong source expression is highlighted. What is missing?
Show answer and explanation
- Only a new error code
- Location validation
- Only a faster build
- A guarantee the code validates every diagnostic detail
Answer: Location validation
Diagnostic correctness includes where the problem is attributed.
79.A benchmark reports only the best of many runs for one configuration. What should comparison review?
Show answer and explanation
- More displayed precision
- Only the number of attempted runs
- A guarantee the minimum run is typical performance
- Selection and reporting bias
Answer: Selection and reporting bias
Unequal selection methods can misrepresent performance.
80.Run times are 9, 10, and 20 ms. What is the median?
Show answer and explanation
- 13 ms
- 20 ms
- 10 ms
- 9 ms
Answer: 10 ms
The middle ordered observation is ten milliseconds.
81.Three equally weighted benchmark runtimes are 9, 10, and 20 ms. What is their arithmetic mean?
Show answer and explanation
- 10 ms
- 13 ms
- 39 ms
- 19 ms
Answer: 13 ms
Their sum is 39, divided by three equals thirteen.
82.A benchmark result changes after CPU frequency settings change. What is relevant?
Show answer and explanation
- Environmental confounding
- Only a different benchmark label
- Only the generated binary's byte size
- A guarantee timing reflects generated code alone
Answer: Environmental confounding
Runtime measurements depend on machine conditions.
83.A test suite passes after an optimizer change. What should not be claimed solely from that fact?
Show answer and explanation
- That the exercised cases passed
- That regression coverage exists
- Universal proof of correctness
- That additional reasoning may still be useful
Answer: Universal proof of correctness
Finite tests support evidence within their coverage, not all programs.
84.A formal checker covers only integer expressions. What should its result disclose?
Show answer and explanation
- The proof's semantic scope
- A guarantee for floating programs
- Only the checking duration
- A claim all memory effects were verified automatically
Answer: The proof's semantic scope
Verification evidence is limited by its encoded model.
85.A verifier validates malformed IR rejection. What is a separate concern?
Show answer and explanation
- Correct behavior for well-formed programs
- Only rejection speed
- Only the number of diagnostics
- A guarantee every valid optimization preserves semantics
Answer: Correct behavior for well-formed programs
Structural validation and semantic preservation are different properties.
86.A source reducer changes a target-dependent type width. What must be preserved?
Show answer and explanation
- Token count alone
- Only whether the reduced source still parses
- Relevant target semantics
- A guarantee integer widths match on all targets
Answer: Relevant target semantics
Reduction should retain the conditions that make the bug meaningful.
87.A machine-level reducer removes required ABI setup. What can happen?
Show answer and explanation
- Only a smaller valid case
- Automatic preservation of every ABI invariant
- An unrelated invalid test replaces the bug
- A guarantee the remaining fault is the original defect
Answer: An unrelated invalid test replaces the bug
Minimized machine tests still need relevant invariants.
88.A benchmark trains profile-guided optimization on its exact measured inputs. What should be disclosed?
Show answer and explanation
- Only source count
- Only binary size
- A guarantee training inputs represent every production workload
- Training and evaluation overlap
Answer: Training and evaluation overlap
Evaluation should explain representativeness and possible overfitting.
89.A performance gain holds only on the training workload. What needs review?
Show answer and explanation
- Only the best training run
- Generalization to intended workloads
- Only whether the training workload still passes
- A guarantee any measured gain is universal
Answer: Generalization to intended workloads
Target users may run materially different inputs and conditions.
90.A release changes a compiler default affecting semantics or diagnostics. What should accompany it?
Show answer and explanation
- Only a new version number
- Only aggregate benchmark charts
- Clear compatibility and migration information
- A promise all builds remain identical by default
Answer: Clear compatibility and migration information
Users need to understand material behavior and option changes.
91.A rollback restores compiler version but keeps incompatible cached artifacts. What should be reviewed?
Show answer and explanation
- Only the restored executable path
- Only the old version's label
- A guarantee rollback removes all persistent artifacts
- Cache compatibility and invalidation
Answer: Cache compatibility and invalidation
Persistent artifacts can outlive the tool version that created them.
92.A production issue is mitigated by disabling one pass. What should follow?
Show answer and explanation
- Close the report immediately.
- Only collect a faster benchmark.
- Assume the workaround proves the sole root cause.
- Root-cause work and regression coverage
Answer: Root-cause work and regression coverage
A workaround can restore service without fully explaining or fixing the defect.
93.A regression test reproduces only with undocumented flags. What should be corrected?
Show answer and explanation
- The input source alone
- Only the target triple without the required flags
- The recorded test configuration
- A presumption defaults contain every required option
Answer: The recorded test configuration
A test must preserve the settings required to exercise the issue.
94.A warning is suppressed globally to hide one false positive. What should be evaluated?
Show answer and explanation
- Only a lower warning count
- Only a shorter source test
- A narrower correct diagnostic fix
- A guarantee all suppressed warnings are false positives
Answer: A narrower correct diagnostic fix
Broad suppression may conceal genuine issues.
95.A candidate says a crash is fixed because it no longer occurs on one input. What further evidence helps?
Show answer and explanation
- Only a smaller patch
- Only a second run of the identical input
- Related cases and invariant reasoning
- A guarantee one passing input covers every relevant path
Answer: Related cases and invariant reasoning
A targeted result should be supported by the cause and relevant coverage.
96.A pipeline change moves the first failure later without repairing invalid IR. What is the concern?
Show answer and explanation
- All invariants are repaired.
- A later failure is necessarily correct.
- The defect was displaced, not resolved.
- The verifier must be defective.
Answer: The defect was displaced, not resolved.
The underlying violation can remain despite a changed symptom.
97.A reproducibility report omits environment variables that change compilation. What is missing?
Show answer and explanation
- Only the compiler executable's checksum
- Only the source file's timestamp
- A guarantee environment variables cannot affect compilation
- Relevant configuration inputs
Answer: Relevant configuration inputs
Configuration can affect semantics, paths, features, and output.
98.A compiler test accesses network data that can change. What should be assessed?
Show answer and explanation
- Download size alone
- External nondeterminism and isolation
- Only the source file's checksum
- A guarantee source identity fixes every external input
Answer: External nondeterminism and isolation
Mutable external dependencies can make tests unstable or irreproducible.
99.A diagnostics change improves wording but breaks tooling that parses undocumented text. What should be distinguished?
Show answer and explanation
- Supported interfaces and incidental output
- Only message length
- Only the consumer's parsing speed
- A presumption every text consumer has a supported contract
Answer: Supported interfaces and incidental output
Compatibility depends on the actual public interface commitments.
100.An original test compiles and runs, printing 11 when a defined semantic oracle expects 19. A reducer accepts any nonzero tool exit, and its minimized output is rejected for a syntax error. Which predicate better preserves the intended wrong-code bug?
Show answer and explanation
- Accept any nonzero compiler or program exit.
- Require valid compilation and the intended runtime output mismatch.
- Minimize source length without checking validity.
- Treat any diagnostic message as the original failure.
Answer: Require valid compilation and the intended runtime output mismatch.
The intended defect is wrong output from a defined program, not rejection of invalid syntax. The reducer must retain the relevant validity premise and distinguish the targeted mismatch from unrelated failures.
101.Compiler A is measured at 100 ms on machine X with cold caches. Compiler B is measured at 80 ms on machine Y with warm caches. The source input is identical. Which conclusion is supported?
Show answer and explanation
- B is proven to reduce runtime by 20% on matched hardware.
- B is proven to give 1.25× speedup for every workload.
- Using the same source cancels hardware and cache differences.
- The times differ, but a compiler-caused speedup is not established.
Answer: The times differ, but a compiler-caused speedup is not established.
The arithmetic ratio is 1.25, but hardware and cache state changed with the compiler. Those confounders prevent attributing the observed difference to compilation alone; matched conditions and reliable repeated measurement are needed.