View Issue Details

IDProjectCategoryView StatusLast Update
0038299FPCCompilerpublic2021-01-04 16:36
Reporterajax16384 Assigned ToFlorian  
PrioritynormalSeverityminorReproducibilityalways
Status resolvedResolutionfixed 
Platformwindows 
Product Version3.3.1 
Fixed in Version3.3.1 
Summary0038299: ansi concat broken for -O2
Descriptionrecent trunk changes broke -O2 string concatenation
Steps To Reproducefpc.exe -O2 -FcUTF8 -Mobjfpc fpc_bug.dpr
123456

fpc.exe -O- -FcUTF8 -Mobjfpc fpc_bug.dpr
123456789
TagsNo tags attached.
Fixed in Revision48021
FPCOldBugId
FPCTarget-
Attached Files

Activities

ajax16384

2021-01-03 15:37

reporter  

fpc_bug.dpr (256 bytes)   
program bug;
const
  cAnsiLineFeed = AnsiChar(#10);
  cAnsiCarriageReturn = AnsiChar(#13);
var
  test: RawByteString;
begin
  test := '123';
  test := test + UTF8Encode('456') + '789' + cAnsiCarriageReturn + cAnsiLineFeed;
  writeln(test);
end.
fpc_bug.dpr (256 bytes)   

Florian

2021-01-03 15:53

administrator   ~0128051

Made the last comment private as I am getting enough spam mails.

ajax16384

2021-01-04 16:36

reporter   ~0128073

@Florian thanks!

Issue History

Date Modified Username Field Change
2021-01-03 15:37 ajax16384 New Issue
2021-01-03 15:37 ajax16384 File Added: fpc_bug.dpr
2021-01-03 15:53 Florian Note Added: 0128051
2021-01-04 13:41 Florian Assigned To => Florian
2021-01-04 13:41 Florian Status new => resolved
2021-01-04 13:41 Florian Resolution open => fixed
2021-01-04 13:41 Florian Fixed in Version => 3.3.1
2021-01-04 13:41 Florian Fixed in Revision => 48021
2021-01-04 13:41 Florian FPCTarget => -
2021-01-04 16:36 ajax16384 Note Added: 0128073