https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119214
Robert Dubner <rdubner at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |ASSIGNED Last reconfirmed| |2025-03-14 Ever confirmed|0 |1 --- Comment #14 from Robert Dubner <rdubner at gcc dot gnu.org> --- (In reply to Richard Biener from comment #13) > (In reply to Robert Dubner from comment #7) > > Yes. IMO the least invasive way is to instead use labels. > At the present time, I think I want to simply implement the if( !optimize ) solution. It won't be the final solution. But currently, the ASM_EXPR method, for all of its potential warts, works with the matching logic in GDB-COBOL. Currently the only way to get it is to use the .deb package on the cobolworx.com web site. But it is there, and it does work, and I'd like it to keep working even after we do what we decide to do here. It took me weeks to sort out the changes to the compiler and to gdb to get it working. My guess is that switching to something else like LABEL_DECL might take several weeks again to keep all of my test cases working. As an expedient and temporary means of getting rid of the "-O -ftracer" bug, and with your concurrence, I will propose a patch with the -if( !optimize ) code. And I am adding to my pile of index cards "USE LABEL_DECL instead of ASM_EXPR", and at some point I will do that research. But I don't think that right now is the right time to spend that time, and I want to get rid of the "-O ftracer" bug, and I want my nascent debugger to keep working. However: Rest assured I believe you are correct. I agree LABEL_DECL is the right way to go. It gives me all the pieces I need in ways I already understand, and thank you for those insights. But I have fifteen other bugs to look at here, and at the rate I am clearing them, it will take forever. Literally forever: it's been two days, and I have cleared exactly zero bugs. Incidentally: To make all that work, I need a NOP -- an instruction that gets a ".loc 1 xxx" location but doesn't do anything, and I couldn't figure out how to create a NOP. I am doing the equivalent of a NOP by creating an integer with global scope in libgcobol.so, and I generate gg_assign(var_decl_nop, build_int_cst_type(INT, 106)); at the points in the executable where I need a NOP. (Yes, I am solving a problem with a write-only variable. If you let me hang around, you'll likely see more goofy stuff like that. It's not my fault; that stuff comes and finds *me*.) Is there a proper way of generating a NOP? It would just be neater.