From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fee84,ae6d7754224e7cfb X-Google-Attributes: gidfee84,public X-Google-Thread: 1164f8,ae6d7754224e7cfb X-Google-Attributes: gid1164f8,public From: "Gerald A. Feldman" Subject: Re: horrible "cc -O" bug (DU 3.2c) Date: 1997/05/11 Message-ID: <33763487.7250953E@highway1.com>#1/1 X-Deja-AN: 240921881 References: <5kvqsu$18d$1@news.iastate.edu> <5l33qi$6fg$1@news.nyu.edu> X-Priority: 3 (Normal) Organization: Boston Computer Solutions and Consulting Newsgroups: comp.unix.osf.osf1,comp.sys.dec Roy Smith wrote: Any compiler code generation bug is "really disturbing". This has to be any > programmer's worst nightmare. The thought of doing any kind of > software > developent on a compiler that isn't doing 100% rock-solid code > generation > gives me the willies. I can live with slow code. I can live with > missing > language features. I can live with parsers unable to handle > arbitrarily > complex expressions. But if it compiles, I have to *know* it compiled > > correctly. First of all, from looking at the code, it does not appear to be a code generation bug at all. It is only a bug if the code beyond the && would cause a side effect, such as invoke a function, modify a variable, or cause an exception. In this case, it works nicely because the alpha chips can dual issue the code. In the 5 years I have been in the Unix Development Environment group, I have not heard of a bug where the second argument is evaluated before the first. You could say the same thing about the way the Alpha compilers pass arguments to functions. The first 6 arguments are passed as registers, not pushed on the stack. > We're running DU-4.0B on our new alpha boxes. Is this a problem in > the > compiler that ships with that system? Should I be pointing my ftp > connection at MIT and downloading gcc if I want to be able to sleep > nights? DU 4.0B ships with DECC as the default compiler and ACC as a backup. GCC also ships with DU. I think you will find that code generated by gcc is slower than code generated by DECC or ACC.BTW: The newer Alpha chips quad issue instructions, which means that the chip can execute 4 instructions in parallel. All Digital compilers and assemblers schedule the generated code for optimal execution. The instructions are rearranged based on latencies and other interactions. The scheduler knows the issue rules, and tries to schedule the instructions to take advantage of this. This is over and above normal compiler optimizations. Both ACC and DECC go through a large number of tests and soaks. Not only their own suites, but they are tested in many different standards validation suites, and are fully certified by the appropriate standards bodies. Both are very stable in V3.2C as well as on 4.0B. If the bug that was described actually is a bug, I doubt that even the kernel could be built. -- +----------------------------------------------+ | Jerry Feldman | | Boston Computer Solutions and Consulting | | http://gaf.ne.highway1.com/ | +----------------------------------------------+