------- Additional Comments From amacleod at redhat dot com 2005-01-12 17:46 ------- Created an attachment (id=7940) --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=7940&action=view) proposed patch
Give this a try. I havent checked it in, Im running it through the testsuites. I'm unlikely to be able to check it in until next week. This is likely to change the debug info quite a bit, but it should be more detailed. Let me know if you think it is OK, and if not, what it is doing wrong. for the specified testcase I get: [a.c : 8] D.1150 = [a.c : 8] add2 (3, 4); [a.c : 13] printf (&"%d\n"[0], [a.c : 8] D.1150 + 2) [tail call]; [a.c : 14] return; so that looks reasonable. something artificial and slightly more complex gives me: x = a + b; y = x * 3; z = y << 2 + x; x = z * 10; printf ("%d\n", x * 44); [d.c : 6] x = a + b; [d.c : 10] printf (&"%d\n"[0], ([d.c : 8] [d.c : 7] x * 3 << x + 2) * 440) [tail call]; [d.c : 13] return; which looks like it ought to be about right, but is a little tricky to read :-) anyway, give it a shot and let me know if you think this is better. Andrew -- What |Removed |Added ---------------------------------------------------------------------------- AssignedTo|unassigned at gcc dot gnu |amacleod at redhat dot com |dot org | Status|NEW |ASSIGNED http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19192