Discussion:
FPC black list details
(too old to reply)
Maciej Izak
2016-12-08 11:07:45 UTC
Permalink
Raw Message
Hi again,

FPC has problems with examples attached with
http://bugs.freepascal.org/view.php?id=25607 . The bug is caused by
improper "calculation of distance" for methods with default parameter
(methods with default parameter are ignored for few scenarios so compiler
can't determine).
During my detailed research I discovered that Delphi implementation has
small bug (VMT is ignored for scenario E01 and E03 which is totally
improper).

I have made patch for this bug attached to #25607 :
http://bugs.freepascal.org/file_download.php?file_id=25047&type=bug

FPC black list details:

E01 source:
https://gist.github.com/maciej-izak/f312ff683406e2b16003ee67ee1a95d1#file-e01-pas
{E01 Delphi | FPC with calc_distance }
TA.Create | TB.Create
TB.Create | TB.Create
TB.Create | TB.Create

E02 source:
https://gist.github.com/maciej-izak/f312ff683406e2b16003ee67ee1a95d1#file-e02-pas
{E02 Delphi | FPC with calc_distance }
TA.Create | TA.Create
TA.Create | TA.Create
TA.Create | TA.Create

E03 source:
https://gist.github.com/maciej-izak/f312ff683406e2b16003ee67ee1a95d1#file-e03-pas
{E03 Delphi | FPC with calc_distance }
TA.Foo | TB.Foo
TB.Foo | TB.Foo
TB.Foo | TB.Foo

E04 source:
https://gist.github.com/maciej-izak/f312ff683406e2b16003ee67ee1a95d1#file-e04-pas
{E04 Delphi | FPC with calc_distance }
TA.Foo | TA.Foo
TA.Foo | TA.Foo
TA.Foo | TA.Foo

E05 source:
https://gist.github.com/maciej-izak/f312ff683406e2b16003ee67ee1a95d1#file-e05-pas
{E05 Delphi | FPC with calc_distance }
TB.Foo | TB.Foo

E06 source:
https://gist.github.com/maciej-izak/f312ff683406e2b16003ee67ee1a95d1#file-e06-pas
{E06 Delphi | FPC with calc_distance }
TA.Foo | TA.Foo
--
Best regards,
Maciej Izak
Jonas Maebe
2016-12-08 11:15:41 UTC
Permalink
Raw Message
Post by Maciej Izak
http://bugs.freepascal.org/file_download.php?file_id=25047&type=bug
Does this version of the patch fix the issue from
http://bugs.freepascal.org/view.php?id=31081 ? Or is your change
(probably) unrelated to that?


Jonas
_______________________________________________
fpc-devel maillist - fpc-***@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel
Maciej Izak
2016-12-08 11:23:30 UTC
Permalink
Raw Message
Post by Jonas Maebe
Does this version of the patch fix the issue from
http://bugs.freepascal.org/view.php?id=31081 ? Or is your change
(probably) unrelated to that?
I think it is unrelated but we need to wait for report from Alf. If it is
caused by calc_distance I will try to improve the patch (btw. the patch is
almost from beginning with NewPascal and it works perfect without any
regressions for tests. Also calc_distance works with all tested platforms
and for all cross compilers, so I have hope that #31081 is unrelated).
--
Best regards,
Maciej Izak
Jonas Maebe
2016-12-08 12:04:50 UTC
Permalink
Raw Message
Post by Maciej Izak
I think it is unrelated but we need to wait for report from Alf. If it
is caused by calc_distance I will try to improve the patch (btw. the
patch is almost from beginning with NewPascal and it works perfect
without any regressions for tests. Also calc_distance works with all
tested platforms and for all cross compilers, so I have hope that #31081
is unrelated).
The problem is that the bug report is about resolving calls specific to
Objective-Pascal, which is only supported (and hence tested) on
Darwin-based platforms by FPC (Mac OS X/OS X/macOS, iOS). So your
testing probably did not cover this. If Alf confirms it works fine with
trunk, I'll check your patch.


Jonas
_______________________________________________
fpc-devel maillist - fpc-***@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel
Maciej Izak
2016-12-09 21:19:40 UTC
Permalink
Raw Message
Post by Jonas Maebe
The problem is that the bug report is about resolving calls specific to
Objective-Pascal, which is only supported (and hence tested) on
Darwin-based platforms by FPC (Mac OS X/OS X/macOS, iOS). So your testing
probably did not cover this. If Alf confirms it works fine with trunk, I'll
check your patch.
You were right... I was so close :\. Now I need to find some mac for better
testing experience. Thanks for improved version.
--
Best regards,
Maciej Izak
Maciej Izak
2016-12-08 11:29:13 UTC
Permalink
Raw Message
Post by Jonas Maebe
Does this version of the patch fix the issue
Ouch I read "cause" instead of "fix". Only Alf knows that. :)
--
Best regards,
Maciej Izak
Sven Barth
2016-12-08 13:34:45 UTC
Permalink
Raw Message
http://bugs.freepascal.org/file_download.php?file_id=25047&type=bug

Small formal note: you should check the coding style of your patch again.
There are superfluous spaces among some expressions. ;) (also we tend to
use assigned() instead of a check for nil with (in)equality)

Regards,
Sven
Maciej Izak
2016-12-08 13:48:15 UTC
Permalink
Raw Message
Post by Sven Barth
Small formal note: you should check the coding style of your patch again.
There are superfluous spaces among some expressions. ;) (also we tend to
use assigned() instead of a check for nil with (in)equality)
True, thanks for note. Even spaces around "=" are wrong, and useless
"objdef: tobjectdef;" local variable. The patch is much older than MO
(almost 2 years old, was created before my more serious compiler work), I
forgot to rework this part. :\ Should I rework this patch again?
--
Best regards,
Maciej Izak
Sven Barth
2016-12-08 16:13:24 UTC
Permalink
Raw Message
Post by Maciej Izak
Post by Sven Barth
Small formal note: you should check the coding style of your patch
again. There are superfluous spaces among some expressions. ;) (also we
tend to use assigned() instead of a check for nil with (in)equality)
Post by Maciej Izak
True, thanks for note. Even spaces around "=" are wrong, and useless
"objdef: tobjectdef;" local variable. The patch is much older than MO
(almost 2 years old, was created before my more serious compiler work), I
forgot to rework this part. :\ Should I rework this patch again?

Also parameter declarations should have no spaces while local variables
have should a space before and after the colon...

If it isn't too much of an effort for you, then yes, rework it please.
Otherwise the one who commits that will have to remember that. :)

Regards,
Sven
Jonas Maebe
2016-12-08 16:52:19 UTC
Permalink
Raw Message
Post by Sven Barth
If it isn't too much of an effort for you, then yes, rework it please.
Otherwise the one who commits that will have to remember that. :)
I will do it while fixing the Objective Pascal issue. I think I already
know what the problem is.


Jonas
_______________________________________________
fpc-devel maillist - fpc-***@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel
Loading...