This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

optimization/7155: AVR Build of GCC - Problem with optimizing


>Number:         7155
>Category:       optimization
>Synopsis:       AVR Build of GCC - Problem with optimizing
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Fri Jun 28 05:56:02 PDT 2002
>Closed-Date:
>Last-Modified:
>Originator:     t.nossmann@web.de
>Release:        gcc version 3.2 20020616 (experimental)
>Organization:
>Environment:
Win 2000, avrfreaks.net Build
>Description:
avr-gcc -c -g -Os -Wall -Wstrict-prototypes -Wa,-ahlms=bridge.lst  -mmcu=at90s8515 -I. bridge.c -o bridge.o
bridge.c: In function `testfunction':
bridge.c:214: error: unable to generate reloads for:
(insn:QI 56 55 57 12 00712540 (set (cc0)
        (compare (sign_extend:HI (reg/v:QI 25 r25 [41]))
            (const_int -128 [0xffffff80]))) 94 {*cmpqi_sign_extend} (nil)

!!!This Error occours only with optimization enabled!!!
    (nil))
bridge.c:214: internal compiler error: Internal compiler error in find_reloads, at gcc/reload.c:3564
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://www.gnu.org/software/gcc/bugs.html> for instructions.
make: *** [bridge.o] Error 1
>How-To-Repeat:
void testfunction( void )
{
    char ist_speed = 0;
    bool mo_dir_up;
	bool mo_power;


	// Die Drehgeschwindigkeit des Motors langsam an die Vorgabe anpassen
    if (soll_speed > ist_speed)
    	ist_speed++;

    if (soll_speed < ist_speed)
    	ist_speed--;

    mo_dir_up = (ist_speed > 0);

	// aktuellen Motorstatus ermitteln und merken
    mo_power = mo_port != mo_break;

	// Motor ist ausgeschalten und minimale Geschwindigkeit erreicht
	if ( !mo_power && ( ist_speed == 0 ) )
		return;

	// Motor ist eingeschalten und maximale Geschwindigkeit erreicht
    if (  mo_power && ( (ist_speed==0x7f) || (~ist_speed==0x7f) ) )
		return;

    // Neuen Timer-Wert berechnen und laden
   		outp( ((mo_power)? (ist_speed << 1) : (~ist_speed << 1) ) , TCNT0 );

    // kurz alle Brückentransistoren ausschalten, um Kurzschlüsse zu verhindern

	mo_port = mo_stop;
	delay(1);

	// wenn motor eingeschalten, dann ausschalten und umgekehrt ( DREHRICHTUNG beachten !!! )
	if (mo_power)
		mo_port = mo_break;
	else
		mo_port = (mo_dir_up)? mo_up : mo_down;
}
>Fix:
none
>Release-Note:
>Audit-Trail:
>Unformatted:


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]