View Issue Details

IDProjectCategoryView StatusLast Update
0037779FPCCompilerpublic2020-09-21 22:49
ReporterC Western Assigned ToSven Barth  
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionfixed 
Platformx86_64OSlinux 
Product Version3.3.1 
Fixed in Version3.3.1 
Summary0037779: Attached code generates invalid assembly
DescriptionWith current trunk:
fpc uref.pas
Free Pascal Compiler version 3.3.1 [2020/09/20] for x86_64
Copyright (c) 1993-2020 by Florian Klaempfl and others
Target OS: Linux for x86-64
Compiling uref.pas
Linking uref
/usr/bin/ld: uref.o: in function `main':
uref.pas:(.text.n_main+0x71): undefined reference to `RTTI_$P$PROGRAM_$$_def00000007'
Error: Error while linking
Fatal: There were 1 errors compiling module, stopping
Fatal: Compilation aborted
Error: /home/ctcmw/usr64/bin/ppcx64 returned an error exitcode
TagsNo tags attached.
Fixed in Revision46915
FPCOldBugId
FPCTarget-
Attached Files

Activities

C Western

2020-09-20 10:28

reporter  

uref.pas (259 bytes)   
type
  Complex = record
    re : Double;
    im : Double;
  end;
  TComplexArray = array of Complex;
  TComplexArrayArray = array of TComplexArray;

var
  MC: array of array of array of array of TComplexArrayArray;

begin
  MC := nil;
  MC := Copy(MC);
end.
uref.pas (259 bytes)   

Bart Broersma

2020-09-20 11:54

reporter   ~0125654

Nice one.
However do you come up with such code?
(This is meant as a compliment)

C Western

2020-09-20 12:15

reporter   ~0125657

It is part of code for handling groups, starting from a pascal translation of http://www.ccl.net/cca/software/MATLAB/Irreducible_representatives

jamie philbrook

2020-09-20 12:30

reporter   ~0125660

Cryptic looking code and the use of MC := Copy(MC) is a little strange and senseless,

But , I can say this, it compiles fine with 3.0.4. Not sure about 3.2.x

C Western

2020-09-20 14:02

reporter   ~0125663

Note the bug report specifically mentions trunk; it compiled OK until recently.

This is a stripped down example; the original copied to a different place.

jamie philbrook

2020-09-20 15:30

reporter   ~0125671

yes. I was just making comments about the twisted looking code and yes I does compile with other versions, can't say if it executes properly, that is another mystery.

Sven Barth

2020-09-21 22:19

manager   ~0125741

Please test and close if okay.

C Western

2020-09-21 22:49

reporter   ~0125742

Now works for me - thanks

Issue History

Date Modified Username Field Change
2020-09-20 10:28 C Western New Issue
2020-09-20 10:28 C Western File Added: uref.pas
2020-09-20 11:54 Bart Broersma Note Added: 0125654
2020-09-20 12:15 C Western Note Added: 0125657
2020-09-20 12:30 jamie philbrook Note Added: 0125660
2020-09-20 14:02 C Western Note Added: 0125663
2020-09-20 15:30 jamie philbrook Note Added: 0125671
2020-09-21 21:35 Sven Barth Assigned To => Sven Barth
2020-09-21 21:35 Sven Barth Status new => assigned
2020-09-21 22:19 Sven Barth Status assigned => resolved
2020-09-21 22:19 Sven Barth Resolution open => fixed
2020-09-21 22:19 Sven Barth Fixed in Version => 3.3.1
2020-09-21 22:19 Sven Barth Fixed in Revision => 46915
2020-09-21 22:19 Sven Barth FPCTarget => -
2020-09-21 22:19 Sven Barth Note Added: 0125741
2020-09-21 22:49 C Western Status resolved => closed
2020-09-21 22:49 C Western Note Added: 0125742