------- Comment #2 from hjl dot tools at gmail dot com 2008-02-26 19:30 ------- (In reply to comment #1) > Could you suggest a more robust testcase? > > Or if that is not possible, there should be a way to only compile the testcase > for valid targets. Ideas? >
You can use /* { dg-add-options register } */ register int * volatile x asm REGISTER; /* { dg-warning "optimization may eliminate reads and/or writes to register variables" } */ You need to define add_options_for_register to add proper -DREGITSR=. ... -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35382