|
From: | georg chambert |
Subject: | [avr-gcc-list] possible optimize bugg |
Date: | Tue, 16 Jan 2018 01:17:32 +0100 |
Hi,
I have been doing a bit uggly/lazy thing, which I
think the optimiztion guys thought was stupid enough to do something
to,
however I think they messed up;
// ON msg_on[0] = 0b10001000; // address msg_on[1] = 0b00000000; // PWZS Tmmm : (?) mmm = cool msg_on[2] = 0b10000100; // tttt,vvvv ; 23c , high vent msg_on[3] = 0b11000000; // pppp, 0 ; parity ----- etc for 6 more messages ---- further down I make the select to work on if (msg_nbr == 0) for (i=0;i<4;i++) seq[i] = msg_off[i]; // load a selected message to send (off) //if (msg_nbr == 1) for (i=0;i<4;i++) seq[i] = msg_on[i]; // //if (msg_nbr == 2) for (i=0;i<4;i++) seq[i] = msg_on26[i]; // //if (msg_nbr == 3) for (i=0;i<4;i++) seq[i] = msg_on1[i]; // //if (msg_nbr == 4) for (i=0;i<4;i++) seq[i] = msg_on2[i]; //if (msg_nbr == 5) for (i=0;i<4;i++) seq[i] = msg_on3[i]; if (msg_nbr == 6) for (i=0;i<4;i++) seq[i] = msg_on4[i];
When I comment out the inbetween statements the last one for 6, works, else the data in seq array is not what I just put the msg_on4 just before. It seems to me that some smarting-up of my stupid (simple) code is going on. Since it was just testing, I had the intention to re-do later, just saving some time.............. NOT.
|
[Prev in Thread] | Current Thread | [Next in Thread] |