Mercury Bugs - mercury
View Issue Details
0000217mercuryBugpublic2011-09-20 01:522011-09-21 17:23
Reporterdkononenko 
Assigned Tojuliensf 
PrioritynormalSeveritymajorReproducibilityalways
StatusresolvedResolutionno change required 
PlatformOSOS Version
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? testlist.m (205) 2011-09-20 01:52
https://bugs.mercurylang.org/file_download.php?file_id=127&type=bug

Notes
(0000360)
dkononenko   
2011-09-20 21:10   
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

Issue History
2011-09-20 01:52dkononenkoNew Issue
2011-09-20 01:52dkononenkoFile Added: testlist.m
2011-09-20 21:10dkononenkoNote Added: 0000360
2011-09-21 17:23juliensfStatusnew => resolved
2011-09-21 17:23juliensfResolutionopen => no change required
2011-09-21 17:23juliensfAssigned To => juliensf