Bug in Optimizer at CompareBlock?

  • 1
  • 2
  • 3
  • Page 1 of 3
wsandor
Benutzer
Avatar
Gender: n/a
Age: 53
Posts: 18
Registered: 07 / 2012
Subject:

Bug in Optimizer at CompareBlock?

 · 
Posted: 21.10.2024 - 16:54  ·  #1
Hi,

In my program, I use CompareBlock. It works normally until I run the Optimizer. With the optimized code, it always gives a False result.
I've checked the generated asm files and find that with the optimizer, only the first variable's addres is set, so it will always compare with a rendom memory area.
I atttached a very simple test program and the 2 asm outputs.
I use compiler ver. 6.00.00, optimizer ver. 3.6.12.0

Do I something wrong or it isreally a bug?

And a smaller error in PED32new: If I open the About dialog a second time, then it doesn't write the compiler version and the dialog couldn't be closed, so it hangs the whole program.
Attachments
Filename: CompTest.zip
Filesize: 8.68 KB
Title:
Download counter: 13
Merlin
Administrator
Avatar
Gender:
Age: 24
Posts: 1402
Registered: 03 / 2005
Subject:

Re: Bug in Optimizer at CompareBlock?

 · 
Posted: 22.10.2024 - 10:22  ·  #2
It sounds like a bug.

I will take a look. But 6.00.00 is not the latest version.

The latest released version of the optimiser is 3.6.13.2
Merlin
Administrator
Avatar
Gender:
Age: 24
Posts: 1402
Registered: 03 / 2005
Subject:

Re: Bug in Optimizer at CompareBlock?

 · 
Posted: 22.10.2024 - 11:39  ·  #3
PEDnew is very beta with many bugs. For that reason I reverted to the original PED as the default IDE in the latest release.
Merlin
Administrator
Avatar
Gender:
Age: 24
Posts: 1402
Registered: 03 / 2005
Subject:

Re: Bug in Optimizer at CompareBlock?

 · 
Posted: 22.10.2024 - 11:48  ·  #4
@WSandor, could you provide the .dsm file for this simple project please? It will make it easier for me. Or the complete project directory would be even better.

Thanks.
wsandor
Benutzer
Avatar
Gender: n/a
Age: 53
Posts: 18
Registered: 07 / 2012
Subject:

Re: Bug in Optimizer at CompareBlock?

 · 
Posted: 22.10.2024 - 17:14  ·  #5
Hi Merlin,

Thanks for your answer!
I've tried with the newest version (Compiler V6.00.05, Optimizer V3.6.13.2), the result is the same.
I've attached all the project files.

Best regards,

Sandor Wortmann
Attachments
Filename: comptest.zip
Filesize: 26.26 KB
Title:
Download counter: 6
Merlin
Administrator
Avatar
Gender:
Age: 24
Posts: 1402
Registered: 03 / 2005
Subject:

Re: Bug in Optimizer at CompareBlock?

 · 
Posted: 22.10.2024 - 18:33  ·  #6
Thanks Sandor
Merlin
Administrator
Avatar
Gender:
Age: 24
Posts: 1402
Registered: 03 / 2005
Subject:

Re: Bug in Optimizer at CompareBlock?

 · 
Posted: 23.10.2024 - 10:09  ·  #7
Hallo Sandor.

I have examined your code and cannot see an error there.

I am not disputing that the error exists but is seems that in creating a 'small example displaying the error' you have removed the error. This can often happen with the optimiser.

Rolf always insisted on a small demo program, but I do not. If you can send me your original project where you noticed the error via pm, I will examine that. You may depend on it that I will maintain confidentiality of the code.

Please note, in case you ran this in the simulator, that the optimiser is aware that the variable b is not used and so will remove all updates to it. So the value of b will not change in the simulator.

Regards
wsandor
Benutzer
Avatar
Gender: n/a
Age: 53
Posts: 18
Registered: 07 / 2012
Subject:

Re: Bug in Optimizer at CompareBlock?

 · 
Posted: 24.10.2024 - 09:27  ·  #8
Dear Merlin,

Thanks for your answer again.
I attachaed a "working" example. When I compile it without optimization, it blinks a LED - this is the normal behavior. When I optimize it, the LED doesn't blinks.
Unfortunately I run to a bigger problem: as you advised I reverted back to the original PED32 from PED32New, but I realised I can't program any projects from there. The Programmer always drop an error window that it doesn't find the project's hex file. I attached a screen capture from it. If I do the same from PED32New it works normally. Could you help me please, what could be the problem, because before the update everithing worked fine.

Sándor Wortmann
Attachments
Bug in Optimizer at CompareBlock?
Filename: avrprog.jpg
Filesize: 356.63 KB
Title:
Download counter: 75
Filename: CompTest_working.zip
Filesize: 30.15 KB
Title:
Download counter: 9
  • 1
  • 2
  • 3
  • Page 1 of 3
Selected quotes for multi-quoting:   0

Registered users in this topic

Currently no registered users in this section

The statistic shows who was online during the last 5 minutes. Updated every 90 seconds.
MySQL Queries: 18 · Cache Hits: 15   139   154 · Page-Gen-Time: 0.028429s · Memory Usage: 2 MB · GZIP: on · Viewport: SMXL-HiDPI