GATE CSE 2017 Session 1 Q22: Static single assignment (SSA) form of three-address code
- Compiler Design
- 1 mark
- MCQ
- −1/3 if wrong
Syllabus topic: Intermediate code generation
Question
Consider the following intermediate program in three address code
p = a - b
q = p * c
p = u * v
q = p + qWhich one of the following corresponds to a static single assignment form of the above code?
Try it: multiple choice: exactly one correct option
Show answer and explanation
Answer: B (official GATE 2017 final answer key)
Concept used: In SSA form every variable is assigned exactly once, and each use refers to the version produced by the reaching definition.
First step: Check each option for (i) a fresh name on every assignment and (ii) each use naming the most recent definition.
Full step-by-step solution
Loading…
Answer from the official final answer key. Found a mistake? Use Report issue and we will fix it.
More questions on Intermediate code generation
Every PYQ on this topic →Share this question
Source: official GATE 2017 Session 1 CS question paper and final answer key, organised by IIT Roorkee. Question paper · Answer key
More Compiler Design PYQs
- 2026 Session 1 · Q27Classify errors in three C string declarations
- 2026 Session 1 · Q28True statements about LL(1) parsing
- 2026 Session 1 · Q42Redundant (common) subexpressions in blocks B4 and B5 of a CFG
- 2026 Session 1 · Q53Compare two SDDs for type declarations
- 2026 Session 2 · Q35Count tokens produced by a lexer for a given string
- 2026 Session 2 · Q41Shift-reduce conflicts in the LR(0) table of a grammar