2019-08-21 10:55 AEST

View Issue Details Jump to Notes ]
IDProjectCategoryView StatusLast Update
0000217mercuryBugpublic2011-09-21 17:23
Reporterdkononenko 
Assigned Tojuliensf 
PrioritynormalSeveritymajorReproducibilityalways
StatusresolvedResolutionno change required 
Product Version 
Target VersionFixed in Version 
Summary0000217: Can't compile simple program
Descriptioncat testlist.m

:- module testlist.
:- interface.
:- import_module io.

:- pred main(io::di, io::uo) is det.

:- implementation.
:- import_module list.

main(!IO) :- L=[1,2,3], io.write_list(L, "\n", io.write_int, !IO).

--------

wc -l testlist.m
      11 testlist.m

--------

mmc --make testlist
Making Mercury/os/testlist.o
testlist.m:26: error: initializer element is not constant
testlist.m:26: error: (near initialization for ‘testlist_scalar_common_1[0][1]’)
** Error making `Mercury/os/testlist.o'.

Additional Informationuname -a
Darwin MacBook-Pro-Denis-Kononenko.local 11.1.0 Darwin Kernel Version 11.1.0: Tue Jul 26 16:07:11 PDT 2011; root:xnu-1699.22.81~1/RELEASE_X86_64 x86_64

mmc --version
Mercury Compiler, version 11.01, configured for x86_64-apple-darwin10.8.0
Copyright (C) 1993-2011 The University of Melbourne

TagsNo tags attached.
Attached Files

-Relationships
+Relationships

-Notes

~0000360

dkononenko (reporter)

I solved this problem
I update MacOS from Leopard to Lion - in Lion for default
ls -l /usr/bin/gcc
lrwxr-xr-x 1 root wheel 12 19 ??? 06:32 /usr/bin/gcc -> llvm-gcc-4.2
I rebuild Mercury with parameter CC=gcc-4.2
+Notes

-Issue History
Date Modified Username Field Change
2011-09-20 01:52 dkononenko New Issue
2011-09-20 01:52 dkononenko File Added: testlist.m
2011-09-20 21:10 dkononenko Note Added: 0000360
2011-09-21 17:23 juliensf Status new => resolved
2011-09-21 17:23 juliensf Resolution open => no change required
2011-09-21 17:23 juliensf Assigned To => juliensf
+Issue History