Missing metadata for volatile variables

Hi everyone,

I am using the dragonegg plugin to produce bitcode for the following
small C program:

int main() {
1: int x = -5;
2: x = 6;
3: return 0;
}

The assignments on lines 1 and 2 are removed even when no optimization
flags are specified. I tried making variable "x" volatile, which
prevents the assignments from being removed, however I am no longer
able to recover the original name of the variable "x". Below is the
bitcode generated. It seems like the metadata does not mention "x"
anywhere. Am I missing something?

Thank you,
Cindy

Hi Cindy,

I am using the dragonegg plugin to produce bitcode for the following
small C program:

int main() {
1: int x = -5;
2: x = 6;
3: return 0;
}

The assignments on lines 1 and 2 are removed even when no optimization
flags are specified.

as the value of x is never used the compiler doesn't bother outputting it
as you noticed.

  I tried making variable "x" volatile, which

prevents the assignments from being removed, however I am no longer
able to recover the original name of the variable "x". Below is the
bitcode generated. It seems like the metadata does not mention "x"
anywhere. Am I missing something?

Unfortunately dragonegg doesn't currently output *any* debug info for variables.
This would probably be easy enough to fix but no one got around to it yet.
Please feel free to open a bug report.

Ciao, Duncan.