<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://community.arm.com/utility/feedstylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>-O1 removes useful code</title><link>https://community.arm.com/developer/tools-software/tools/f/keil-forum/19220/-o1-removes-useful-code</link><description> I have the following snippet of code, which toggles one of the GPIO lines: 
 
 PINSEL1 &amp;amp;= ~(0x0000000C); 
 IO0SET |= MY_GPIO_MASK; 
 IO0CLR |= MY_GPIO_MASK; 
 PINSEL1 |= 0x00000008; 
 
This works fine as Thumb code at -O0. However, if I compile this</description><dc:language>en-US</dc:language><generator>Telligent Community 10</generator><item><title>RE: -O1 removes useful code</title><link>https://community.arm.com/thread/46150?ContentTypeID=1</link><pubDate>Tue, 30 May 2006 03:21:22 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:8a8b2405-b358-4eb5-9182-f06007b14bd6</guid><dc:creator>Keil Software Support Intl.</dc:creator><description>&lt;p&gt;Can you please send a test project to support.intl@keil.com&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>