GCC 4.6 was too smart. It saw we didn't actually use the a[] ever
so never stored its contents. Now we actually use the array so a
(constant) expresion location is put in the dwarf output.
unsigned long long i;
};
-void
+int
t1 (int i)
{
int a[] = { 17, 23 };
STAP_PROBE(test, t1);
c.i = i;
srandom (c.i + 4);
+ return a[0] + a[1];
}
-void
+int
t2 (unsigned int i)
{
int a[] = { 17, 23 };
STAP_PROBE(test, t2);
c.i = i;
srandom (c.i + 4);
+ return a[0] + a[1];
}
-void
+int
t3 (unsigned long long i)
{
int a[] = { 17, 23 };
STAP_PROBE(test, t3);
c.i = i;
srandom (c.i + 4);
+ return a[0] + a[1];
}
int
main (int argc, char **argv)
{
- t1 (42);
- t2 (42);
- t3 (42);
- return 0;
+ int i1 = t1 (42);
+ int i2 = t2 (42);
+ int i3 = t3 (42);
+ return 2*i1 - i2 - i3;
}