https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77353

Georg-Johann Lay <gjl at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |missed-optimization
             Target|AVR                         |avr
                 CC|                            |gjl at gcc dot gnu.org
      Known to fail|                            |6.2.1

--- Comment #10 from Georg-Johann Lay <gjl at gcc dot gnu.org> ---
Here is a valid test case (avr/io.h is not available here):

#define PINA (*(unsigned char volatile*) 0x39)
#define PINB (*(unsigned char volatile*) 0x36)
#define PORTC (*(unsigned char volatile*) 0x35)

int main(void)
{
   if (PINA < PINB)
   {
      PORTC = 0;
   }
}

== Compile with 6.2 (trunk will work as expected) ==

avr-g++ -S -Os -mmcu=atmega128 main.cpp


Appears to be C++ related as avr-gcc 6.2 uses an 8-bit comparison as expected.

Reply via email to