http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49310
--- Comment #4 from Joost VandeVondele <Joost.VandeVondele at pci dot uzh.ch> 2011-06-08 13:23:00 UTC --- (In reply to comment #3) > Using -g -O2 -fbounds-check instead of -g -O1 -fbounds-check cures it, > or e.g. -g -O1 -fbounds-check --param max-vartrack-expr-depth=5 > speeds it up. The programming style is very weird, and combined with > -fbounds-check which results in huge number of bbs doesn't help it, > plus the expression chains for the debug vars really seem to be very long (and > at the points where bounds checking failures are reported the relevant > registers > holding the expressions are reused for something else). Not so sure if I agree with your statement about my programming style ;-). sure timings explode with increasing max-vartrack-expr-depth, maybe the table below can help to pick a good default ? max-vartrack-expr-depth=2: var-tracking emit : 32.66 (33%) usr max-vartrack-expr-depth=3: var-tracking emit : 33.03 (34%) usr max-vartrack-expr-depth=4: var-tracking emit : 33.66 (34%) usr max-vartrack-expr-depth=5: var-tracking emit : 33.64 (34%) usr max-vartrack-expr-depth=6: var-tracking emit : 34.34 (35%) usr max-vartrack-expr-depth=7: var-tracking emit : 35.98 (35%) usr max-vartrack-expr-depth=8: var-tracking emit : 42.52 (37%) usr max-vartrack-expr-depth=9: var-tracking emit : 48.79 (39%) usr max-vartrack-expr-depth=10: var-tracking emit : 53.09 (42%) usr max-vartrack-expr-depth=12: var-tracking emit : 74.52 (46%) usr max-vartrack-expr-depth=14: var-tracking emit : 118.90 (63%) usr max-vartrack-expr-depth=16: var-tracking emit : 313.50 (81%) usr max-vartrack-expr-depth=18: var-tracking emit : 833.84 (91%) usr max-vartrack-expr-depth=20: var-tracking emit :2527.38 (97%) usr